1 #ifndef PACKETPP_NDP_LAYER 2 #define PACKETPP_NDP_LAYER 26 NDP_OPTION_SOURCE_LINK_LAYER = 1,
27 NDP_OPTION_TARGET_LINK_LAYER = 2,
28 NDP_OPTION_PREFIX_INFORMATION = 3,
29 NDP_OPTION_REDIRECTED_HEADER = 4,
31 NDP_OPTION_UNKNOWN = 255
60 return NDPNeighborOptionTypes::NDP_OPTION_UNKNOWN;
72 return (
size_t)m_Data->recordLen * 8;
80 return (
size_t)m_Data->recordLen * 8 - (2 *
sizeof(uint8_t));
123 size_t getNdpOptionCount()
const;
162 bool removeAllNdpOptions();
173 virtual size_t getNdpHeaderLen()
const = 0;
174 virtual uint8_t *getNdpOptionsBasePtr()
const {
return m_Data + getNdpHeaderLen(); };
189 #pragma pack(push, 1) 195 uint8_t targetIP[16];
235 bool hasLinkLayerAddress()
const;
243 std::string toString()
const;
246 void initLayer(uint8_t code,
const IPv6Address &targetIP);
262 #pragma pack(push, 1) 265 #if (BYTE_ORDER == LITTLE_ENDIAN) 291 uint8_t targetIP[16];
316 bool routerFlag,
bool unicastFlag,
bool overrideFlag);
345 bool hasTargetMacInfo()
const;
362 std::string toString()
const;
365 void initLayer(uint8_t code,
const IPv6Address &targetIP,
bool routerFlag,
bool unicastFlag,
bool overrideFlag);
The main namespace for the PcapPlusPlus lib.
Definition: IcmpV6Layer.h:133
Definition: NdpLayer.h:263
NdpOption(uint8_t *optionRawData)
Definition: NdpLayer.h:46
Definition: TLVData.h:363
NDPNeighborOptionTypes getNdpOptionType() const
Definition: NdpLayer.h:57
Definition: NdpLayer.h:89
bool getUnicastFlag() const
Definition: NdpLayer.h:355
Definition: IcmpV6Layer.h:103
size_t getDataSize() const
Definition: NdpLayer.h:75
Definition: TLVData.h:207
IPv6Address getTargetIP() const
Definition: NdpLayer.h:229
bool getRouterFlag() const
Definition: NdpLayer.h:350
~NdpOption()
Definition: NdpLayer.h:51
Definition: IpAddress.h:167
NDPNeighborAdvertisementLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: NdpLayer.h:302
Definition: NdpLayer.h:115
Definition: NdpLayer.h:190
Definition: NdpLayer.h:255
Definition: NdpLayer.h:182
NdpOptionBuilder(NDPNeighborOptionTypes optionType, const uint8_t *optionValue, uint8_t optionValueLen)
Definition: NdpLayer.h:100
Definition: NdpLayer.h:39
bool getOverrideFlag() const
Definition: NdpLayer.h:360
IPv6Address getTargetIP() const
Definition: NdpLayer.h:340
uint32_t solicited
Definition: NdpLayer.h:268
size_t getTotalSize() const
Definition: NdpLayer.h:67
uint32_t reserved
Definition: NdpLayer.h:193
Definition: MacAddress.h:28
NDPNeighborOptionTypes
Definition: NdpLayer.h:24
NDPNeighborSolicitationLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: NdpLayer.h:206