1 #ifndef PACKETPP_IPV6_EXTENSION 2 #define PACKETPP_IPV6_EXTENSION 51 virtual inline size_t getExtensionLen()
const {
return 8 * (getBaseHeader()->headerLen+1); }
70 struct ipv6_ext_base_header
77 IPv6Extension(IDataContainer* dataContainer,
size_t offset) :
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) {}
85 IPv6Extension& operator=(
const IPv6Extension& other);
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 inline void setNextHeader(IPv6Extension* nextHeader) { m_NextHeader = nextHeader; }
95 IPv6Extension* m_NextHeader;
99 IDataContainer* m_DataContainer;
101 uint8_t* m_ShadowData;
201 static const uint8_t Pad0OptionType = 0;
202 static const uint8_t PadNOptionType = 1;
220 return sizeof(uint8_t);
222 return (
size_t)(m_Data->
recordLen +
sizeof(uint16_t));
293 IPv6Option
getOption(uint8_t optionType);
415 IPv6RoutingHeader(uint8_t routingType, uint8_t segmentsLeft,
const uint8_t* additionalRoutingData,
size_t additionalRoutingDataLen);
491 IPv6AuthenticationHeader(uint32_t securityParametersIndex, uint32_t sequenceNumber,
const uint8_t* integrityCheckValue,
size_t integrityCheckValueLen);
527 #endif // PACKETPP_IPV6_EXTENSION uint8_t recordLen
Definition: TLVData.h:33
uint8_t routingType
Definition: IPv6Extensions.h:401
Definition: IPv6Extensions.h:185
uint8_t recordType
Definition: TLVData.h:31
IPv6DestinationHeader(const std::vector< IPv6TLVOptionBuilder > &options)
Definition: IPv6Extensions.h:371
size_t getRoutingAdditionalDataLength()
uint8_t nextHeader
Definition: IPv6Extensions.h:124
size_t getDataSize()
Definition: IPv6Extensions.h:225
Definition: IPv6Extensions.h:384
IPv6Address getRoutingAdditionalDataAsIPv6Address(size_t offset=0)
uint16_t fragOffsetAndFlags
Definition: IPv6Extensions.h:129
Definition: TLVData.h:333
IPv6Option getNextOption(IPv6Option &option)
Definition: IPv6Extensions.h:240
uint8_t * getRoutingAdditionalData()
IPv6HopByHopHeader(const std::vector< IPv6TLVOptionBuilder > &options)
Definition: IPv6Extensions.h:346
Definition: IPv6Layer.h:54
Definition: IPv6Extensions.h:457
uint8_t segmentsLeft
Definition: IPv6Extensions.h:403
uint16_t getFragmentOffset()
uint8_t headerLen
Definition: IPv6Extensions.h:126
IPv6Option(uint8_t *optionRawData)
Definition: IPv6Extensions.h:208
IPv6AuthenticationHeader(uint32_t securityParametersIndex, uint32_t sequenceNumber, const uint8_t *integrityCheckValue, size_t integrityCheckValueLen)
ipv6_authentication_header * getAuthHeader()
Definition: IPv6Extensions.h:498
IPv6FragmentationHeader(uint32_t fragId, uint16_t fragOffset, bool lastFragment)
IPv6ExtensionType getExtensionType()
Definition: IPv6Extensions.h:56
~IPv6Option()
Definition: IPv6Extensions.h:213
IPv6Option getFirstOption()
virtual size_t getExtensionLen() const
Definition: IPv6Extensions.h:51
Definition: IPv6Extensions.h:359
Definition: TLVData.h:189
uint8_t nextHeader
Definition: IPv6Extensions.h:397
Definition: IPv6Extensions.h:197
uint8_t headerLen
Definition: IPv6Extensions.h:473
Definition: IPv6Extensions.h:45
Definition: IPv6Extensions.h:394
uint16_t reserved
Definition: IPv6Extensions.h:475
uint32_t sequenceNumber
Definition: IPv6Extensions.h:479
IPv6TLVOptionBuilder(uint8_t optType, uint8_t optValue)
Definition: IPv6Extensions.h:260
size_t getTotalSize() const
Definition: IPv6Extensions.h:217
ipv6_routing_header * getRoutingHeader()
Definition: IPv6Extensions.h:422
Definition: IPv6Extensions.h:334
IPv6RoutingHeader(uint8_t routingType, uint8_t segmentsLeft, const uint8_t *additionalRoutingData, size_t additionalRoutingDataLen)
uint8_t nextHeader
Definition: IPv6Extensions.h:470
IPv6TLVOptionBuilder(uint8_t optType, uint16_t optValue)
Definition: IPv6Extensions.h:269
size_t getIntegrityCheckValueLength()
ipv6_frag_header * getFragHeader()
Definition: IPv6Extensions.h:148
Definition: IPv6Extensions.h:43
Definition: IpAddress.h:212
Definition: IPv6Extensions.h:467
uint32_t securityParametersIndex
Definition: IPv6Extensions.h:477
IPv6TLVOptionBuilder(uint8_t optType, const uint8_t *optValue, uint8_t optValueLen)
Definition: IPv6Extensions.h:251
IPv6TLVOptionHeader(const std::vector< IPv6TLVOptionBuilder > &options)
uint32_t id
Definition: IPv6Extensions.h:131
IPv6Option getOption(uint8_t optionType)
size_t getExtensionLen() const
Definition: IPv6Extensions.h:518
Definition: IPv6Extensions.h:41
Definition: IPv6Extensions.h:37
uint8_t headerLen
Definition: IPv6Extensions.h:399
Definition: IPv6Extensions.h:35
IPv6TLVOptionBuilder(const IPv6TLVOptionBuilder &other)
Definition: IPv6Extensions.h:277
uint8_t * getIntegrityCheckValue()
Definition: IPv6Extensions.h:121
IPv6Extension * getNextHeader()
Definition: IPv6Extensions.h:66
Definition: IPv6Extensions.h:23
Definition: IPv6Extensions.h:39
The main namespace for the PcapPlusPlus lib.
IPv6ExtensionType
Definition: IPv6Extensions.h:32
Definition: IPv6Extensions.h:111