|
| | SipRequestLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
| |
| | SipRequestLayer (SipMethod method, const std::string &requestUri, const std::string &version="SIP/2.0") |
| |
| | SipRequestLayer (const SipRequestLayer &other) |
| |
| SipRequestLayer & | operator= (const SipRequestLayer &other) |
| |
| SipRequestFirstLine * | getFirstLine () const |
| |
| std::string | toString () const override |
| |
| int | getContentLength () const |
| |
| HeaderField * | setContentLength (int contentLength, const std::string &prevFieldName="") |
| |
| OsiModelLayer | getOsiModelLayer () const override |
| |
| void | parseNextLayer () override |
| |
| void | computeCalculateFields () override |
| |
| HeaderField * | getFieldByName (std::string fieldName, int index=0) const |
| |
| HeaderField * | getFirstField () const |
| |
| HeaderField * | getNextField (HeaderField *prevField) const |
| |
| int | getFieldCount () const |
| |
| virtual HeaderField * | addField (const std::string &fieldName, const std::string &fieldValue) |
| |
| virtual HeaderField * | addField (const HeaderField &newField) |
| |
| HeaderField * | addEndOfHeader () |
| |
| virtual HeaderField * | insertField (HeaderField *prevField, const std::string &fieldName, const std::string &fieldValue) |
| |
| virtual HeaderField * | insertField (std::string prevFieldName, const std::string &fieldName, const std::string &fieldValue) |
| |
| virtual HeaderField * | insertField (HeaderField *prevField, const HeaderField &newField) |
| |
| bool | removeField (HeaderField *fieldToRemove) |
| |
| bool | removeField (std::string fieldName, int index=0) |
| |
| bool | isHeaderComplete () const |
| |
|
void | parseNextLayer () override |
| | Currently set only PayloadLayer for the rest of the data.
|
| |
| size_t | getHeaderLen () const override |
| |
|
void | computeCalculateFields () override |
| | Does nothing for this class.
|
| |
| | ~Layer () override |
| |
| Layer * | getNextLayer () const |
| |
| Layer * | getPrevLayer () const |
| |
| ProtocolType | getProtocol () const |
| |
| bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) 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 override |
| |
|
| static bool | isSipPort (uint16_t port) |
| |
| static SipLayer * | parseSipLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet, uint16_t srcPort, uint16_t dstPort) |
| |
| static SipLayer * | parseSipLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
| |
| Packet * | getAttachedPacket () |
| | Get a pointer to the Packet this layer is attached to (if any). More...
|
| |
| Packet const * | getAttachedPacket () const |
| | Get a pointer to the Packet this layer is attached to (if any). More...
|
| |
| template<typename T , typename... Args> |
| Layer * | constructNextLayer (uint8_t *data, size_t dataLen, Args &&... extraArgs) |
| | Construct the next layer in the protocol stack. No validation is performed on the data. More...
|
| |
| template<typename T , typename... Args> |
| Layer * | constructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| |
| template<typename TFactory , typename... Args> |
| Layer * | constructNextLayerFromFactory (TFactory factoryFn, uint8_t *data, size_t dataLen, Args &&... extraArgs) |
| | Construct the next layer in the protocol stack using a factory functor. More...
|
| |
| template<typename TFactory , typename... Args> |
| Layer * | constructNextLayerFromFactory (TFactory factoryFn, uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| | Construct the next layer in the protocol stack using a factory functor. More...
|
| |
| template<typename T , typename... Args> |
| Layer * | tryConstructNextLayer (uint8_t *data, size_t dataLen, Args &&... extraArgs) |
| |
| template<typename T , typename... Args> |
| Layer * | tryConstructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| |
| template<typename T , typename TFallback , typename... Args> |
| Layer * | tryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Args &&... extraArgs) |
| | Try to construct the next layer in the protocol stack with a fallback option. More...
|
| |
| template<typename T , typename TFallback , typename... Args> |
| Layer * | tryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| |
| template<typename TFallback , typename TFactory , typename... Args> |
| Layer * | tryConstructNextLayerFromFactoryWithFallback (TFactory factoryFn, uint8_t *data, size_t dataLen, Args &&... extraArgs) |
| | Try to construct the next layer in the protocol stack using a factory functor with a fallback option. More...
|
| |
| template<typename TFallback , typename TFactory , typename... Args> |
| Layer * | tryConstructNextLayerFromFactoryWithFallback (TFactory factoryFn, uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| | Try to construct the next layer in the protocol stack using a factory functor with a fallback option. More...
|
| |
| template<typename T > |
| static bool | canReinterpretAs (const uint8_t *data, size_t dataLen) |
| | Check if the data is large enough to reinterpret as a type. More...
|
| |
Represents a SIP request header and inherits all basic functionality of SipLayer and TextBasedProtocolMessage. The functionality that is added for this class is the SIP first line concept. A SIP request has the following first line: INVITE sip:bla@b.nosp@m.la.c.nosp@m.om:12345 SIP/2.0 Since it's not an "ordinary" header field, it requires a special treatment and gets a class of it's own: SipRequestFirstLine. In most cases a SIP request will be contained in a single packet but for cases it is not, only the first packet will be identified as SIP request layer. You can find out whether the header is complete by using SipLayer::isHeaderComplete()