51 return 8 * (getBaseHeader()->headerLen + 1);
76 struct ipv6_ext_base_header
83 IPv6Extension(IDataContainer* dataContainer,
size_t offset)
84 : m_NextHeader(nullptr), m_ExtType(
IPv6ExtensionUnknown), m_DataContainer(dataContainer), m_Offset(offset),
95 IPv6Extension& operator=(
const IPv6Extension& other);
97 uint8_t* getDataPtr()
const;
99 void initShadowPtr(
size_t size);
101 ipv6_ext_base_header* getBaseHeader()
const
103 return (ipv6_ext_base_header*)getDataPtr();
106 void setNextHeader(IPv6Extension* nextHeader)
108 m_NextHeader = nextHeader;
111 IPv6Extension* m_NextHeader;
115 IDataContainer* m_DataContainer;
117 uint8_t* m_ShadowData;
211 static const uint8_t Pad0OptionType = 0;
212 static const uint8_t PadNOptionType = 1;
233 static bool canAssign(
const uint8_t* recordRawData,
size_t tlvDataLen)
235 auto data = (TLVRawData*)recordRawData;
239 if (tlvDataLen <
sizeof(TLVRawData::recordType))
242 if (data->recordType == Pad0OptionType)
252 if (m_Data ==
nullptr)
255 if (m_Data->recordType == Pad0OptionType)
256 return sizeof(uint8_t);
258 return (
size_t)(m_Data->recordLen +
sizeof(uint16_t));
263 if (m_Data ==
nullptr || m_Data->recordType == Pad0OptionType)
266 return (
size_t)m_Data->recordLen;
322 TLVRecordBuilder::operator=(other);
461 IPv6RoutingHeader(uint8_t routingType, uint8_t segmentsLeft,
const uint8_t* additionalRoutingData,
462 size_t additionalRoutingDataLen);
549 const uint8_t* integrityCheckValue,
size_t integrityCheckValueLen);
581 return 4 * (getBaseHeader()->headerLen + 2);
Definition: IpAddress.h:199
Definition: IPv6Extensions.h:23
IPv6ExtensionType
Definition: IPv6Extensions.h:31
@ IPv6HopByHop
Definition: IPv6Extensions.h:33
@ IPv6Routing
Definition: IPv6Extensions.h:35
@ IPv6Fragmentation
Definition: IPv6Extensions.h:37
@ IPv6ExtensionUnknown
Definition: IPv6Extensions.h:43
@ IPv6Destination
Definition: IPv6Extensions.h:41
@ IPv6AuthenticationHdr
Definition: IPv6Extensions.h:39
IPv6Extension * getNextHeader() const
Definition: IPv6Extensions.h:70
IPv6ExtensionType getExtensionType() const
Definition: IPv6Extensions.h:57
virtual size_t getExtensionLen() const
Definition: IPv6Extensions.h:49
Definition: IPv6Layer.h:55
Definition: TLVData.h:413
static bool canAssign(const uint8_t *recordRawData, size_t tlvDataLen)
Definition: TLVData.h:79
Definition: TLVData.h:239
The main namespace for the PcapPlusPlus lib.