PcapPlusPlus
pcpp::IgmpV1Layer Class Reference

#include <IgmpLayer.h>

Inheritance diagram for pcpp::IgmpV1Layer:
pcpp::IgmpLayer pcpp::Layer pcpp::IDataContainer

Public Member Functions

 IgmpV1Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
 IgmpV1Layer (IgmpType type, const IPv4Address &groupAddr=IPv4Address::Zero)
 
 ~IgmpV1Layer ()
 
void computeCalculateFields ()
 
- Public Member Functions inherited from pcpp::IgmpLayer
igmp_headergetIgmpHeader ()
 
IPv4Address getGroupAddress ()
 
void setGroupAddress (const IPv4Address &groupAddr)
 
IgmpType getType ()
 
void setType (IgmpType type)
 
void parseNextLayer ()
 
size_t getHeaderLen ()
 
std::string toString ()
 
OsiModelLayer getOsiModelLayer ()
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer ()
 
LayergetPrevLayer ()
 
ProtocolType getProtocol ()
 
uint8_t * getData ()
 
size_t getDataLen ()
 
uint8_t * getLayerPayload ()
 
size_t getLayerPayloadSize ()
 
bool isAllocatedToPacket ()
 
void copyData (uint8_t *toArr)
 
uint8_t * getDataPtr (size_t offset=0)
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::IgmpLayer
static ProtocolType getIGMPVerFromData (uint8_t *data, size_t dataLen, bool &isQuery)
 

Detailed Description

Represents IGMPv1 (Internet Group Management Protocol ver 1) layer. This class represents all the different messages of IGMPv1

Constructor & Destructor Documentation

◆ IgmpV1Layer() [1/2]

pcpp::IgmpV1Layer::IgmpV1Layer ( uint8_t *  data,
size_t  dataLen,
Layer prevLayer,
Packet packet 
)

A constructor that creates the layer from an existing packet raw data

Parameters
[in]dataA pointer to the raw data
[in]dataLenSize of the data in bytes
[in]prevLayerA pointer to the previous layer
[in]packetA pointer to the Packet instance where layer will be stored in

◆ IgmpV1Layer() [2/2]

pcpp::IgmpV1Layer::IgmpV1Layer ( IgmpType  type,
const IPv4Address groupAddr = IPv4Address::Zero 
)

A constructor that allocates a new IGMPv1 header

Parameters
[in]typeThe message type to set
[in]groupAddrThe multicast address to set. This is an optional parameter and has a default value of IPv4Address::Zero if not provided

◆ ~IgmpV1Layer()

pcpp::IgmpV1Layer::~IgmpV1Layer ( )
inline

A destructor for this layer (does nothing)

Member Function Documentation

◆ computeCalculateFields()

void pcpp::IgmpV1Layer::computeCalculateFields ( )
virtual

Calculate the IGMP checksum and set igmp_header::maxResponseTime to 0 (this field is unused in IGMPv1)

Implements pcpp::Layer.