pcpp::IPv6AuthenticationHeader Class Reference

#include <IPv6Extensions.h>

Inheritance diagram for pcpp::IPv6AuthenticationHeader:


struct  ipv6_authentication_header

Public Member Functions

 IPv6AuthenticationHeader (uint32_t securityParametersIndex, uint32_t sequenceNumber, const uint8_t *integrityCheckValue, size_t integrityCheckValueLen)
ipv6_authentication_headergetAuthHeader ()
uint8_t * getIntegrityCheckValue ()
size_t getIntegrityCheckValueLength ()
size_t getExtensionLen () const
- Public Member Functions inherited from pcpp::IPv6Extension
IPv6ExtensionType getExtensionType ()
virtual ~IPv6Extension ()

Additional Inherited Members

- Public Types inherited from pcpp::IPv6Extension
enum  IPv6ExtensionType {
  IPv6HopByHop = 0, IPv6Routing = 43, IPv6Fragmentation = 44, IPv6AuthenticationHdr = 51,
  IPv6Destination = 60, IPv6ExtensionUnknown = 255

Detailed Description

Represents IPv6 authentication header extension (used in IPSec protocol) and allows easy access to all of its data

Constructor & Destructor Documentation

pcpp::IPv6AuthenticationHeader::IPv6AuthenticationHeader ( uint32_t  securityParametersIndex,
uint32_t  sequenceNumber,
const uint8_t *  integrityCheckValue,
size_t  integrityCheckValueLen 

A c'tor for creating a new IPv6 authentication header extension object not bounded to a packet. Useful for adding new extensions to an IPv6 layer with IPv6Layer::addExtension()

[in]securityParametersIndexSecurity Parameters Index (SPI) value (will be written to ipv6_authentication_header::securityParametersIndex field)
[in]sequenceNumberSequence number value (will be written to ipv6_authentication_header::sequenceNumber field)
[in]integrityCheckValueA pointer to a buffer containing the integrity check value (ICV) data for this extension. Notice this pointer is read-only and its content isn't modified in any way
[in]integrityCheckValueLenThe length of the integrity check value (ICV) buffer

Member Function Documentation

ipv6_authentication_header* pcpp::IPv6AuthenticationHeader::getAuthHeader ( )

Get a pointer to the fixed part of the authentication header. Notice the return pointer points directly to the data, so every change will modify the actual packet data

A pointer to the ipv6_authentication_header
size_t pcpp::IPv6AuthenticationHeader::getExtensionLen ( ) const

In the authentication header the extension length is calculated in a different way than other extensions. The calculation is: [ 4 * (ipv6_authentication_header::headerLen + 2) ]

The length of this extension

Reimplemented from pcpp::IPv6Extension.

uint8_t* pcpp::IPv6AuthenticationHeader::getIntegrityCheckValue ( )
A pointer to the buffer containing the integrity check value (ICV) for this extension. Notice that any change in this buffer will lead to a change in the extension data
size_t pcpp::IPv6AuthenticationHeader::getIntegrityCheckValueLength ( )
The length of the integrity check value (ICV) buffer