PcapPlusPlus
|
#include <SipLayer.h>
Classes | |
class | SipRequestFirstLineException |
Public Member Functions | |
SipRequestLayer::SipMethod | getMethod () |
bool | setMethod (SipRequestLayer::SipMethod newMethod) |
std::string | getUri () |
bool | setUri (std::string newUri) |
std::string | getVersion () |
int | getSize () |
bool | isComplete () |
Static Public Member Functions | |
static SipRequestLayer::SipMethod | parseMethod (char *data, size_t dataLen) |
Represents an SIP request first line. The first line includes 3 parameters: SIP method (e.g INVITE, ACK, BYE, etc.), URI (e.g sip:bla@b:12345) and SIP version (usually SIP/2.0). All these parameters are included in this class, and the user can retrieve or set them. This class cannot be instantiated by users, it's created inside la.c omSipRequestLayer and user can get a pointer to an instance of it. All "getters" of this class retrieve the actual data of the SIP request and the "setters" actually change the packet data. Since SIP is a textual protocol, most fields aren't of fixed size and this also applies to the first line parameters. So many "setter" methods of this class may need to shorten or extend the data in SipRequestLayer. These methods will return a false value if this action failed
|
inline |
|
inline |
std::string pcpp::SipRequestFirstLine::getUri | ( | ) |
|
inline |
|
inline |
As explained in SipRequestLayer, a SIP message can sometimes spread over more than 1 packet, so when looking at a single packet the header can be partial. Same goes for the first line - it can spread over more than 1 packet. This method returns an indication whether the first line is partial
|
static |
A static method for parsing the SIP method out of raw data
[in] | data | The raw data |
[in] | dataLen | The raw data length |
bool pcpp::SipRequestFirstLine::setMethod | ( | SipRequestLayer::SipMethod | newMethod | ) |
Set the SIP request method
[in] | newMethod | The method to set |
bool pcpp::SipRequestFirstLine::setUri | ( | std::string | newUri | ) |
Set the URI
[in] | newUri | The URI to set |