PcapPlusPlus
22.11
|
#include <NdpLayer.h>
Classes | |
struct | ndpneighboradvertisementhdr |
Public Member Functions | |
NDPNeighborAdvertisementLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
NDPNeighborAdvertisementLayer (uint8_t code, const IPv6Address &targetIP, const MacAddress &targetMac, bool routerFlag, bool unicastFlag, bool overrideFlag) | |
NDPNeighborAdvertisementLayer (uint8_t code, const IPv6Address &targetIP, bool routerFlag, bool unicastFlag, bool overrideFlag) | |
MacAddress | getTargetMac () const |
IPv6Address | getTargetIP () const |
bool | hasTargetMacInfo () const |
bool | getRouterFlag () const |
bool | getUnicastFlag () const |
bool | getOverrideFlag () const |
std::string | toString () const |
Public Member Functions inherited from pcpp::NDPLayerBase | |
size_t | getNdpOptionCount () const |
NdpOption | getNdpOption (NDPNeighborOptionTypes option) const |
NdpOption | getFirstNdpOption () const |
NdpOption | getNextNdpOption (NdpOption &option) const |
NdpOption | addNdpOption (const NdpOptionBuilder &optionBuilder) |
bool | removeAllNdpOptions () |
Public Member Functions inherited from pcpp::IcmpV6Layer | |
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 |
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::IcmpV6Layer | |
static Layer * | parseIcmpV6Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
Represents a NDP Neighbor Advertisement protocol layer
|
inline |
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::NDPNeighborAdvertisementLayer::NDPNeighborAdvertisementLayer | ( | uint8_t | code, |
const IPv6Address & | targetIP, | ||
const MacAddress & | targetMac, | ||
bool | routerFlag, | ||
bool | unicastFlag, | ||
bool | overrideFlag | ||
) |
A constructor that allocates a new NDP Advertisement Layer with target link-layer address option
[in] | code | Code field |
[in] | targetIP | The target IP address from the Neighbor Solicitation message (solicited advertisements) or the address whose link-layer address has changed (unsolicited advertisement) |
[in] | targetMac | Adds the target link-layer address into the option field of the layer |
[in] | routerFlag | The router flag |
[in] | unicastFlag | The solicited flag |
[in] | overrideFlag | The override flag |
pcpp::NDPNeighborAdvertisementLayer::NDPNeighborAdvertisementLayer | ( | uint8_t | code, |
const IPv6Address & | targetIP, | ||
bool | routerFlag, | ||
bool | unicastFlag, | ||
bool | overrideFlag | ||
) |
A constructor that allocates a new NDP Advertisement Layer
code | Code field |
targetIP | The target IP address from the Neighbor Solicitation message (solicited advertisements) or the address whose link-layer address has changed (unsolicited advertisement) |
routerFlag | The router flag |
unicastFlag | The solicited flag |
overrideFlag | The override flag |
|
inline |
|
inline |
|
inline |
MacAddress pcpp::NDPNeighborAdvertisementLayer::getTargetMac | ( | ) | const |
|
inline |
bool pcpp::NDPNeighborAdvertisementLayer::hasTargetMacInfo | ( | ) | const |
|
virtual |
Reimplemented from pcpp::IcmpV6Layer.