1 #ifndef PACKETPP_IPV6_EXTENSION 2 #define PACKETPP_IPV6_EXTENSION 51 virtual size_t getExtensionLen()
const {
return 8 * (getBaseHeader()->headerLen+1); }
70 struct ipv6_ext_base_header
78 m_NextHeader(NULL), m_ExtType(
IPv6ExtensionUnknown), m_DataContainer(dataContainer), m_Offset(offset), m_ShadowData(NULL) {}
82 m_NextHeader(NULL), m_ExtType(
IPv6ExtensionUnknown), m_DataContainer(NULL), m_Offset(0), m_ShadowData(NULL) {}
87 uint8_t* getDataPtr()
const;
89 void initShadowPtr(
size_t size);
91 ipv6_ext_base_header* getBaseHeader()
const {
return (ipv6_ext_base_header*)getDataPtr(); }
93 void setNextHeader(
IPv6Extension* nextHeader) { m_NextHeader = nextHeader; }
101 uint8_t* m_ShadowData;
153 bool isFirstFragment()
const;
158 bool isLastFragment()
const;
163 bool isMoreFragments()
const;
168 uint16_t getFragmentOffset()
const;
201 static const uint8_t Pad0OptionType = 0;
202 static const uint8_t PadNOptionType = 1;
219 if (m_Data ==
nullptr)
222 if (m_Data->recordType == Pad0OptionType)
223 return sizeof(uint8_t);
225 return (
size_t)(m_Data->recordLen +
sizeof(uint16_t));
230 if (m_Data ==
nullptr || m_Data->recordType == Pad0OptionType)
233 return (
size_t)m_Data->recordLen;
288 TLVRecordBuilder::operator=(other);
305 IPv6Option getOption(uint8_t optionType)
const;
326 size_t getOptionCount()
const;
427 IPv6RoutingHeader(uint8_t routingType, uint8_t segmentsLeft,
const uint8_t* additionalRoutingData,
size_t additionalRoutingDataLen);
440 uint8_t* getRoutingAdditionalData()
const;
445 size_t getRoutingAdditionalDataLength()
const;
456 IPv6Address getRoutingAdditionalDataAsIPv6Address(
size_t offset = 0)
const;
503 IPv6AuthenticationHeader(uint32_t securityParametersIndex, uint32_t sequenceNumber,
const uint8_t* integrityCheckValue,
size_t integrityCheckValueLen);
516 uint8_t* getIntegrityCheckValue()
const;
521 size_t getIntegrityCheckValueLength()
const;
539 #endif // PACKETPP_IPV6_EXTENSION The main namespace for the PcapPlusPlus lib.
IPv6ExtensionType
Definition: IPv6Extensions.h:32
Definition: IPv6Extensions.h:23
Definition: TLVData.h:376
virtual size_t getExtensionLen() const
Definition: IPv6Extensions.h:51
Definition: IPv6Extensions.h:45
Definition: IPv6Extensions.h:37
Definition: TLVData.h:217
Definition: IPv6Layer.h:56
Definition: IPv6Extensions.h:35
Definition: IPv6Extensions.h:39
Definition: IpAddress.h:192
IPv6ExtensionType getExtensionType() const
Definition: IPv6Extensions.h:56
IPv6Extension * getNextHeader() const
Definition: IPv6Extensions.h:66
Definition: IPv6Extensions.h:41
Definition: IPv6Extensions.h:43