PcapPlusPlus
19.12
|
#include <IgmpLayer.h>
Public Member Functions | |
IgmpV3QueryLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
IgmpV3QueryLayer (const IPv4Address &multicastAddr=IPv4Address::Zero, uint8_t maxResponseTime=0, uint8_t s_qrv=0) | |
igmpv3_query_header * | getIgmpV3QueryHeader () const |
uint16_t | getSourceAddressCount () const |
IPv4Address | getSourceAddressAtIndex (int index) const |
bool | addSourceAddress (const IPv4Address &addr) |
bool | addSourceAddressAtIndex (const IPv4Address &addr, int index) |
bool | removeSourceAddressAtIndex (int index) |
bool | removeAllSourceAddresses () |
void | computeCalculateFields () |
size_t | getHeaderLen () const |
Public Member Functions inherited from pcpp::IgmpLayer | |
igmp_header * | getIgmpHeader () const |
IPv4Address | getGroupAddress () const |
void | setGroupAddress (const IPv4Address &groupAddr) |
IgmpType | getType () const |
void | setType (IgmpType type) |
void | parseNextLayer () |
std::string | toString () const |
OsiModelLayer | getOsiModelLayer () const |
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 |
Additional Inherited Members | |
Static Public Member Functions inherited from pcpp::IgmpLayer | |
static ProtocolType | getIGMPVerFromData (uint8_t *data, size_t dataLen, bool &isQuery) |
Represents an IGMPv3 (Internet Group Management Protocol ver 3) membership query message
pcpp::IgmpV3QueryLayer::IgmpV3QueryLayer | ( | uint8_t * | data, |
size_t | dataLen, | ||
Layer * | prevLayer, | ||
Packet * | packet | ||
) |
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 |
pcpp::IgmpV3QueryLayer::IgmpV3QueryLayer | ( | const IPv4Address & | multicastAddr = IPv4Address::Zero , |
uint8_t | maxResponseTime = 0 , |
||
uint8_t | s_qrv = 0 |
||
) |
A constructor that allocates a new IGMPv3 membership query
[in] | multicastAddr | The multicast address to set. This is an optional parameter and has a default value of IPv4Address::Zero if not provided |
[in] | maxResponseTime | The max response time to set. This is an optional parameter and has a default value of 0 if not provided |
[in] | s_qrv | A 1-byte value representing the value in Suppress Router-side Processing Flag + Querier's Robustness Variable (igmpv3_query_header::s_qrv field). This is an optional parameter and has a default value of 0 if not provided |
bool pcpp::IgmpV3QueryLayer::addSourceAddress | ( | const IPv4Address & | addr | ) |
Add a new source address at the end of the source address list. The igmpv3_query_header::numOfSources field will be incremented accordingly
[in] | addr | The IPv4 source address to add |
bool pcpp::IgmpV3QueryLayer::addSourceAddressAtIndex | ( | const IPv4Address & | addr, |
int | index | ||
) |
Add a new source address at a certain index of the source address list. The igmpv3_query_header::numOfSources field will be incremented accordingly
[in] | addr | The IPv4 source address to add |
[in] | index | The index to add the new source address at |
|
virtual |
Calculate the IGMP checksum
Implements pcpp::Layer.
|
virtual |
Reimplemented from pcpp::IgmpLayer.
|
inline |
Get a pointer to the raw IGMPv3 membership query header. Notice this points directly to the data, so every change will change the actual packet data
IPv4Address pcpp::IgmpV3QueryLayer::getSourceAddressAtIndex | ( | int | index | ) | const |
Get the IPV4 source address in a certain index
[in] | index | The requested index of the source address |
uint16_t pcpp::IgmpV3QueryLayer::getSourceAddressCount | ( | ) | const |
bool pcpp::IgmpV3QueryLayer::removeAllSourceAddresses | ( | ) |
Remove all source addresses in the message. The igmpv3_query_header::numOfSources field will be set to 0
bool pcpp::IgmpV3QueryLayer::removeSourceAddressAtIndex | ( | int | index | ) |
Remove a source address at a certain index. The igmpv3_query_header::numOfSources field will be decremented accordingly
[in] | index | The index of the source address to be removed |