PcapPlusPlus
|
#include <IgmpLayer.h>
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 | ) |
Get the IPV4 source address in a certain index
[in] | index | The requested index of the source address |
uint16_t pcpp::IgmpV3QueryLayer::getSourceAddressCount | ( | ) |
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 |