PcapPlusPlus
22.11
|
#include <IcmpV6Layer.h>
Public Member Functions | |
IcmpV6Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
IcmpV6Layer (ICMPv6MessageType msgType, uint8_t code, const uint8_t *data, size_t dataLen) | |
bool | isMessageOfType (ICMPv6MessageType type) const |
ICMPv6MessageType | getMessageType () const |
uint8_t | getCode () const |
uint16_t | getChecksum () const |
void | parseNextLayer () |
size_t | getHeaderLen () const |
void | computeCalculateFields () |
OsiModelLayer | getOsiModelLayer () const |
std::string | toString () 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 |
Static Public Member Functions | |
static Layer * | parseIcmpV6Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
Base class for ICMPv6 protocol layers which provides common logic for ICMPv6 messages.
|
inline |
A constructor that creates the layer from an existing packet raw data
data | A pointer to the raw data |
dataLen | Size of the data in bytes |
prevLayer | A pointer to the previous layer |
packet | A pointer to the Packet instance where layer will be stored in |
pcpp::IcmpV6Layer::IcmpV6Layer | ( | ICMPv6MessageType | msgType, |
uint8_t | code, | ||
const uint8_t * | data, | ||
size_t | dataLen | ||
) |
A constructor that allocates a new ICMPv6 layer with type, code and data
[in] | msgType | Message type of the ICMPv6 layer |
[in] | code | Code field of the ICMPv6 layer |
[in] | data | A pointer to the payload to set |
[in] | dataLen | The length of the payload |
|
virtual |
Calculate ICMPv6 checksum field
Implements pcpp::Layer.
uint16_t pcpp::IcmpV6Layer::getChecksum | ( | ) | const |
uint8_t pcpp::IcmpV6Layer::getCode | ( | ) | const |
|
inlinevirtual |
Implements pcpp::Layer.
ICMPv6MessageType pcpp::IcmpV6Layer::getMessageType | ( | ) | const |
|
inlinevirtual |
Implements pcpp::Layer.
|
inline |
[in] | type | Type to check |
|
static |
A static method that creates an ICMPv6 layer from 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 |
|
inlinevirtual |
Does nothing for this layer. ICMPv6 is the last layer.
Implements pcpp::Layer.
|
virtual |
Implements pcpp::Layer.
Reimplemented in pcpp::NDPNeighborAdvertisementLayer, pcpp::ICMPv6EchoLayer, and pcpp::NDPNeighborSolicitationLayer.