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;
286 TLVRecordBuilder::operator=(other);
303 IPv6Option getOption(uint8_t optionType)
const;
324 size_t getOptionCount()
const;
425 IPv6RoutingHeader(uint8_t routingType, uint8_t segmentsLeft,
const uint8_t* additionalRoutingData,
size_t additionalRoutingDataLen);
438 uint8_t* getRoutingAdditionalData()
const;
443 size_t getRoutingAdditionalDataLength()
const;
454 IPv6Address getRoutingAdditionalDataAsIPv6Address(
size_t offset = 0)
const;
501 IPv6AuthenticationHeader(uint32_t securityParametersIndex, uint32_t sequenceNumber,
const uint8_t* integrityCheckValue,
size_t integrityCheckValueLen);
514 uint8_t* getIntegrityCheckValue()
const;
519 size_t getIntegrityCheckValueLength()
const;
537 #endif // PACKETPP_IPV6_EXTENSION The main namespace for the PcapPlusPlus lib.
IPv6ExtensionType
Definition: IPv6Extensions.h:32
Definition: IPv6Extensions.h:23
Definition: TLVData.h:351
virtual size_t getExtensionLen() const
Definition: IPv6Extensions.h:51
Definition: IPv6Extensions.h:45
Definition: IPv6Extensions.h:37
Definition: TLVData.h:197
Definition: IPv6Layer.h:66
Definition: IPv6Extensions.h:35
Definition: IPv6Extensions.h:39
Definition: IpAddress.h:160
IPv6ExtensionType getExtensionType() const
Definition: IPv6Extensions.h:56
IPv6Extension * getNextHeader() const
Definition: IPv6Extensions.h:66
Definition: IPv6Extensions.h:41
Definition: IPv6Extensions.h:43