PcapPlusPlus
Next
|
#include <IgmpLayer.h>
Public Member Functions | |
IgmpV2Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
IgmpV2Layer (IgmpType type, const IPv4Address &groupAddr=IPv4Address(), uint8_t maxResponseTime=0) | |
~IgmpV2Layer () override=default | |
A destructor for this layer (does nothing) | |
void | computeCalculateFields () override |
Calculate the IGMP checksum. | |
![]() | |
igmp_header * | getIgmpHeader () const |
IPv4Address | getGroupAddress () const |
void | setGroupAddress (const IPv4Address &groupAddr) |
IgmpType | getType () const |
void | setType (IgmpType type) |
void | parseNextLayer () override |
Does nothing for this layer (IGMP layer is always last) | |
size_t | getHeaderLen () const override |
std::string | toString () const override |
OsiModelLayer | getOsiModelLayer () const override |
![]() | |
~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 Public Member Functions | |
static bool | isDataValid (uint8_t const *data, size_t dataLen) |
![]() | |
static ProtocolType | getIGMPVerFromData (uint8_t *data, size_t dataLen, bool &isQuery) |
Additional Inherited Members | |
![]() | |
template<typename T , typename... Args> | |
Layer * | constructNextLayer (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, Packet *packet, Args &&... extraArgs) |
![]() | |
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 IGMPv2 (Internet Group Management Protocol ver 2) layer. This class represents all the different messages of IGMPv2
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data |
[in] | dataLen | Size of the data in bytes |
[in] | prevLayer | A pointer to the previous layer |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
|
inlineexplicit |
A constructor that allocates a new IGMPv2 header
[in] | type | The message type to set |
[in] | groupAddr | The multicast address to set. This is an optional parameter and has a default value of unspecified/zero IPv4 address |
[in] | maxResponseTime | The max response time to set. This is an optional parameter and has a default value of 0 if not provided |
|
inlinestatic |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of an IGMPv2 layer |
[in] | dataLen | The length of the byte stream |