|
PcapPlusPlus
Next
|
#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 () override |
| Does nothing for this layer. ICMPv6 is the last layer. | |
| size_t | getHeaderLen () const override |
| void | computeCalculateFields () override |
| Calculate ICMPv6 checksum field. | |
| OsiModelLayer | getOsiModelLayer () const override |
| std::string | toString () const override |
Public Member Functions inherited from pcpp::Layer | |
| ~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 Layer * | parseIcmpV6Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
Additional Inherited Members | |
Protected Member Functions inherited from pcpp::Layer | |
| 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) |
Static Protected Member Functions inherited from pcpp::Layer | |
| 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... | |
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 |
| uint16_t pcpp::IcmpV6Layer::getChecksum | ( | ) | const |
| uint8_t pcpp::IcmpV6Layer::getCode | ( | ) | const |
|
inlineoverridevirtual |
Implements pcpp::Layer.
| ICMPv6MessageType pcpp::IcmpV6Layer::getMessageType | ( | ) | const |
|
inlineoverridevirtual |
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 |
|
overridevirtual |
Implements pcpp::Layer.
Reimplemented in pcpp::NDPNeighborAdvertisementLayer, pcpp::NDPNeighborSolicitationLayer, and pcpp::ICMPv6EchoLayer.