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->recordType == Pad0OptionType)
220 return sizeof(uint8_t);
222 return (
size_t)(m_Data->recordLen +
sizeof(uint16_t));
227 if (m_Data->recordType == Pad0OptionType)
230 return (
size_t)m_Data->recordLen;
285 TLVRecordBuilder::operator=(other);
302 IPv6Option getOption(uint8_t optionType)
const;
323 size_t getOptionCount()
const;
424 IPv6RoutingHeader(uint8_t routingType, uint8_t segmentsLeft,
const uint8_t* additionalRoutingData,
size_t additionalRoutingDataLen);
437 uint8_t* getRoutingAdditionalData()
const;
442 size_t getRoutingAdditionalDataLength()
const;
453 IPv6Address getRoutingAdditionalDataAsIPv6Address(
size_t offset = 0)
const;
500 IPv6AuthenticationHeader(uint32_t securityParametersIndex, uint32_t sequenceNumber,
const uint8_t* integrityCheckValue,
size_t integrityCheckValueLen);
513 uint8_t* getIntegrityCheckValue()
const;
518 size_t getIntegrityCheckValueLength()
const;
536 #endif // PACKETPP_IPV6_EXTENSION The main namespace for the PcapPlusPlus lib.
IPv6ExtensionType
Definition: IPv6Extensions.h:32
Definition: IPv6Extensions.h:23
Definition: TLVData.h:363
virtual size_t getExtensionLen() const
Definition: IPv6Extensions.h:51
Definition: IPv6Extensions.h:45
Definition: IPv6Extensions.h:37
Definition: TLVData.h:207
Definition: IPv6Layer.h:67
Definition: IPv6Extensions.h:35
Definition: IPv6Extensions.h:39
Definition: IpAddress.h:167
IPv6ExtensionType getExtensionType() const
Definition: IPv6Extensions.h:56
IPv6Extension * getNextHeader() const
Definition: IPv6Extensions.h:66
Definition: IPv6Extensions.h:41
Definition: IPv6Extensions.h:43