25 NDP_OPTION_SOURCE_LINK_LAYER = 1,
26 NDP_OPTION_TARGET_LINK_LAYER = 2,
27 NDP_OPTION_PREFIX_INFORMATION = 3,
28 NDP_OPTION_REDIRECTED_HEADER = 4,
30 NDP_OPTION_UNKNOWN = 255
60 if (m_Data ==
nullptr)
61 return NDPNeighborOptionTypes::NDP_OPTION_UNKNOWN;
70 if (m_Data ==
nullptr)
73 return (
size_t)m_Data->recordLen * 8;
78 if (m_Data ==
nullptr)
84 return (
size_t)m_Data->recordLen * 8 - (2 *
sizeof(uint8_t));
180 virtual size_t getNdpHeaderLen()
const = 0;
181 virtual uint8_t* getNdpOptionsBasePtr()
const
183 return m_Data + getNdpHeaderLen();
185 NdpOption addNdpOptionAt(
const NdpOptionBuilder& optionBuilder,
int offset);
199 #pragma pack(push, 1)
261 void initLayer(uint8_t code,
const IPv6Address& targetIP);
266 size_t getNdpHeaderLen()
const
268 return sizeof(ndpneighborsolicitationhdr);
283 #pragma pack(push, 1)
286 #if (BYTE_ORDER == LITTLE_ENDIAN)
338 bool routerFlag,
bool unicastFlag,
bool overrideFlag);
378 return getNdpHeader()->
router;
400 void initLayer(uint8_t code,
const IPv6Address& targetIP,
bool routerFlag,
bool unicastFlag,
bool overrideFlag);
405 size_t getNdpHeaderLen()
const
407 return sizeof(ndpneighboradvertisementhdr);
Definition: IpAddress.h:199
Definition: IcmpV6Layer.h:133
Definition: MacAddress.h:25
Definition: NdpLayer.h:121
NdpOption getFirstNdpOption() const
size_t getNdpOptionCount() const
bool removeAllNdpOptions()
NdpOption getNdpOption(NDPNeighborOptionTypes option) const
NdpOption addNdpOption(const NdpOptionBuilder &optionBuilder)
NdpOption getNextNdpOption(NdpOption &option) const
Definition: NdpLayer.h:277
MacAddress getTargetMac() const
bool hasTargetMacInfo() const
IPv6Address getTargetIP() const
Definition: NdpLayer.h:363
NDPNeighborAdvertisementLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: NdpLayer.h:323
std::string toString() const
bool getRouterFlag() const
Definition: NdpLayer.h:376
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)
bool getUnicastFlag() const
Definition: NdpLayer.h:384
bool getOverrideFlag() const
Definition: NdpLayer.h:392
Definition: NdpLayer.h:193
bool hasLinkLayerAddress() const
NDPNeighborSolicitationLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: NdpLayer.h:216
IPv6Address getTargetIP() const
Definition: NdpLayer.h:241
NDPNeighborSolicitationLayer(uint8_t code, const IPv6Address &targetIP)
MacAddress getLinkLayerAddress() const
std::string toString() const
NDPNeighborSolicitationLayer(uint8_t code, const IPv6Address &targetIP, const MacAddress &srcMac)
Definition: NdpLayer.h:94
NdpOptionBuilder(NDPNeighborOptionTypes optionType, const uint8_t *optionValue, uint8_t optionValueLen)
Definition: NdpLayer.h:104
Definition: NdpLayer.h:39
NDPNeighborOptionTypes getNdpOptionType() const
Definition: NdpLayer.h:58
~NdpOption()
Definition: NdpLayer.h:51
size_t getTotalSize() const
Definition: NdpLayer.h:68
size_t getDataSize() const
Definition: NdpLayer.h:76
NdpOption(uint8_t *optionRawData)
Definition: NdpLayer.h:45
Definition: TLVData.h:413
Definition: TLVData.h:239
The main namespace for the PcapPlusPlus lib.
NDPNeighborOptionTypes
Definition: NdpLayer.h:24
Definition: NdpLayer.h:285
uint32_t override
Definition: NdpLayer.h:291
uint8_t targetIP[16]
Definition: NdpLayer.h:312
uint32_t solicited
Definition: NdpLayer.h:294
uint32_t router
Definition: NdpLayer.h:296
uint32_t reserved
Definition: NdpLayer.h:289
uint32_t reserved2
Definition: NdpLayer.h:298
Definition: NdpLayer.h:201
uint32_t reserved
Definition: NdpLayer.h:203
uint8_t targetIP[16]
Definition: NdpLayer.h:205
Definition: IcmpV6Layer.h:103