|
PcapPlusPlus
19.12
|
Go to the documentation of this file. 1 #ifndef PACKETPP_SIP_LAYER
2 #define PACKETPP_SIP_LAYER
17 #define PCPP_SIP_FROM_FIELD "From"
19 #define PCPP_SIP_TO_FIELD "To"
21 #define PCPP_SIP_VIA_FIELD "Via"
23 #define PCPP_SIP_CALL_ID_FIELD "Call-ID"
25 #define PCPP_SIP_CONTENT_TYPE_FIELD "Content-Type"
27 #define PCPP_SIP_CONTENT_LENGTH_FIELD "Content-Length"
29 #define PCPP_SIP_CONTENT_DISPOSITION_FIELD "Content-Disposition"
31 #define PCPP_SIP_CONTENT_ENCODING_FIELD "Content-Encoding"
33 #define PCPP_SIP_CONTENT_LANGUAGE_FIELD "Content-Language"
35 #define PCPP_SIP_CSEQ_FIELD "CSeq"
37 #define PCPP_SIP_CONTACT_FIELD "Contact"
39 #define PCPP_SIP_MAX_FORWARDS_FIELD "Max-Forwards"
41 #define PCPP_SIP_USER_AGENT_FIELD "User-Agent"
43 #define PCPP_SIP_ACCEPT_FIELD "Accept"
45 #define PCPP_SIP_ACCEPT_ENCODING_FIELD "Accept-Encoding"
47 #define PCPP_SIP_ACCEPT_LANGUAGE_FIELD "Accept-Language"
49 #define PCPP_SIP_ALLOW_FIELD "Allow"
51 #define PCPP_SIP_AUTHORIZATION_FIELD "Authorization"
53 #define PCPP_SIP_DATE_FIELD "Date"
55 #define PCPP_SIP_MIME_VERSION_FIELD "MIME-Version"
57 #define PCPP_SIP_REASON_FIELD "Reason"
59 #define PCPP_SIP_SUPPORTED_FIELD "Supported"
61 #define PCPP_SIP_SERVER_FIELD "Server"
63 #define PCPP_SIP_WWW_AUTHENTICATE_FIELD "WWW-Authenticate"
65 #define PCPP_SIP_RETRY_AFTER_FIELD "Retry-After"
67 #define PCPP_SIP_RECORD_ROUTE_FIELD "Record-Route"
117 SipLayer() : TextBasedProtocolMessage() {}
118 SipLayer(
const SipLayer& other) : TextBasedProtocolMessage(other) {}
119 SipLayer& operator=(
const SipLayer& other) { TextBasedProtocolMessage::operator=(other);
return *
this; }
122 char getHeaderFieldNameValueSeparator()
const {
return ':'; }
123 bool spacesAllowedBetweenHeaderFieldNameAndValue()
const {
return true; }
128 class SipRequestFirstLine;
231 class SipResponseFirstLine;
486 std::string
getUri()
const;
493 bool setUri(std::string newUri);
511 int getSize()
const {
return m_FirstLineEndOffset; }
531 void setMessage(std::string message) { m_Message = message; }
532 virtual const char* what()
const throw()
534 return m_Message.c_str();
537 std::string m_Message;
549 std::string m_Version;
552 int m_FirstLineEndOffset;
618 int getSize()
const {
return m_FirstLineEndOffset; }
638 void setMessage(std::string message) { m_Message = message; }
639 virtual const char* what()
const throw()
641 return m_Message.c_str();
644 std::string m_Message;
651 static std::string parseVersion(
char* data,
size_t dataLen);
656 std::string m_Version;
658 int m_FirstLineEndOffset;
665 #endif // PACKETPP_SIP_LAYER
Definition: SipLayer.h:348
int getContentLength() const
OsiModelLayer
Definition: ProtocolType.h:224
bool isComplete() const
Definition: SipLayer.h:626
void setVersion(std::string newVersion)
Definition: SipLayer.h:278
Definition: SipLayer.h:527
Definition: SipLayer.h:326
Definition: SipLayer.h:171
Definition: SipLayer.h:320
Definition: SipLayer.h:312
Definition: SipLayer.h:396
int getStatusCodeAsInt() const
int getSize() const
Definition: SipLayer.h:511
bool isComplete() const
Definition: SipLayer.h:519
Definition: SipLayer.h:310
Definition: SipLayer.h:346
Definition: SipLayer.h:332
Definition: SipLayer.h:364
bool setMethod(SipRequestLayer::SipMethod newMethod)
Definition: SipLayer.h:330
Definition: SipLayer.h:344
Definition: SipLayer.h:340
Definition: SipLayer.h:157
Definition: SipLayer.h:284
Definition: SipLayer.h:314
std::string getVersion() const
Definition: SipLayer.h:599
Definition: SipLayer.h:288
Definition: SipLayer.h:390
Definition: SipLayer.h:362
SipResponseLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SipLayer.h:173
Definition: SipLayer.h:151
Definition: SipLayer.h:270
OsiModelLayer getOsiModelLayer() const
Definition: SipLayer.h:102
Definition: SipLayer.h:243
Definition: SipLayer.h:366
Definition: SipLayer.h:292
SipResponseLayer::SipResponseStatusCode getStatusCode() const
Definition: SipLayer.h:576
Definition: SipLayer.h:302
SipResponseLayer & operator=(const SipResponseLayer &other)
SipRequestLayer::SipMethod getMethod() const
Definition: SipLayer.h:474
static SipRequestLayer::SipMethod parseMethod(char *data, size_t dataLen)
Definition: SipLayer.h:334
bool setUri(std::string newUri)
Definition: SipLayer.h:274
SipRequestFirstLine * getFirstLine() const
Definition: SipLayer.h:218
Definition: SipLayer.h:155
Definition: SipLayer.h:569
Definition: SipLayer.h:358
Definition: SipLayer.h:286
Definition: SipLayer.h:400
Definition: SipLayer.h:354
Definition: SipLayer.h:316
Definition: SipLayer.h:308
Definition: SipLayer.h:322
Definition: SipLayer.h:368
Definition: SipLayer.h:306
HeaderField * setContentLength(int contentLength, const std::string prevFieldName="")
Definition: SipLayer.h:378
Definition: SipLayer.h:324
Definition: SipLayer.h:266
Definition: SipLayer.h:74
Definition: SipLayer.h:300
Definition: SipLayer.h:386
Definition: SipLayer.h:256
Definition: SipLayer.h:140
Definition: SipLayer.h:163
std::string toString() const
SipRequestLayer & operator=(const SipRequestLayer &other)
Definition: SipLayer.h:294
Definition: SipLayer.h:376
Definition: SipLayer.h:282
static SipResponseLayer::SipResponseStatusCode parseStatusCode(char *data, size_t dataLen)
SipResponseStatusCode
Definition: SipLayer.h:251
Definition: SipLayer.h:388
Definition: SipLayer.h:177
Definition: SipLayer.h:318
Definition: SipLayer.h:167
Definition: SipLayer.h:380
Definition: TextBasedProtocol.h:106
Definition: SipLayer.h:258
Definition: SipLayer.h:336
The main namespace for the PcapPlusPlus lib.
Definition: SipLayer.h:254
Definition: ProtocolType.h:235
Definition: SipLayer.h:360
Definition: SipLayer.h:392
void computeCalculateFields()
std::string getUri() const
Definition: SipLayer.h:272
Definition: SipLayer.h:374
Definition: SipLayer.h:352
Definition: SipLayer.h:175
Definition: SipLayer.h:384
Definition: SipLayer.h:342
Definition: SipLayer.h:268
Definition: SipLayer.h:280
Definition: SipLayer.h:264
SipRequestLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
int getSize() const
Definition: SipLayer.h:618
Definition: SipLayer.h:260
Definition: SipLayer.h:402
std::string getStatusCodeString() const
Definition: SipLayer.h:338
SipResponseFirstLine * getFirstLine() const
Definition: SipLayer.h:444
std::string toString() const
Definition: SipLayer.h:382
bool setStatusCode(SipResponseLayer::SipResponseStatusCode newStatusCode, std::string statusCodeString="")
Definition: SipLayer.h:159
Definition: SipLayer.h:328
Definition: SipLayer.h:153
Definition: SipLayer.h:370
Definition: SipLayer.h:169
Definition: SipLayer.h:634
Definition: SipLayer.h:372
Definition: SipLayer.h:276
std::string getVersion() const
Definition: SipLayer.h:498
Definition: SipLayer.h:298
SipMethod
Definition: SipLayer.h:148
Definition: SipLayer.h:262
Definition: SipLayer.h:296
Definition: SipLayer.h:466
Definition: SipLayer.h:350
Definition: SipLayer.h:304
Definition: SipLayer.h:179
Definition: SipLayer.h:161
Definition: SipLayer.h:165
Definition: SipLayer.h:356
Definition: SipLayer.h:398
Definition: SipLayer.h:394
Definition: SipLayer.h:290