PcapPlusPlus
19.12
|
#include <SipLayer.h>
Public Member Functions | |
int | getContentLength () const |
HeaderField * | setContentLength (int contentLength, const std::string prevFieldName="") |
OsiModelLayer | getOsiModelLayer () const |
void | parseNextLayer () |
void | computeCalculateFields () |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const |
virtual std::string | toString () const =0 |
Represents a general SIP message. It's an abstract class and cannot be instantiated. It's inherited by SipRequestLayer and SipResponseLayer
|
virtual |
Set the content-length only if a content-length field already exists and if its current value is different than the total length of the next layer(s)
Reimplemented from pcpp::TextBasedProtocolMessage.
int pcpp::SipLayer::getContentLength | ( | ) | const |
The length of the body of many SIP response messages is determined by a SIP header field called "Content-Length". This method parses this field, extracts its value and return it. If this field doesn't exist 0 is returned
|
inlinevirtual |
Implements pcpp::Layer.
|
virtual |
Currently identifies only SDP if content-length field exists and set to a value greater than zero. If content-length field doesn't exist or set to zero and still there is data after this layer, a PayloadLayer will be created
Reimplemented from pcpp::TextBasedProtocolMessage.
HeaderField* pcpp::SipLayer::setContentLength | ( | int | contentLength, |
const std::string | prevFieldName = "" |
||
) |
The length of the body of many SIP messages is determined by a header field called "Content-Length". This method sets The content-length field value. The method supports several cases:
[in] | contentLength | The content length value to set |
[in] | prevFieldName | Optional parameter, if specified and "Content-Length" field doesn't exist, it will be created after this field |