PcapPlusPlus  24.09
pcpp::IPv6Extension Class Reference

#include <IPv6Extensions.h>

Inheritance diagram for pcpp::IPv6Extension:
pcpp::IPv6AuthenticationHeader pcpp::IPv6FragmentationHeader pcpp::IPv6RoutingHeader pcpp::IPv6TLVOptionHeader pcpp::IPv6DestinationHeader pcpp::IPv6HopByHopHeader

Classes

struct  ipv6_ext_base_header
 

Public Types

enum  IPv6ExtensionType {
  IPv6HopByHop = 0 , IPv6Routing = 43 , IPv6Fragmentation = 44 , IPv6AuthenticationHdr = 51 ,
  IPv6Destination = 60 , IPv6ExtensionUnknown = 255
}
 

Public Member Functions

virtual size_t getExtensionLen () const
 
IPv6ExtensionType getExtensionType () const
 
virtual ~IPv6Extension ()
 
IPv6ExtensiongetNextHeader () const
 

Detailed Description

A base class for all supported IPv6 extensions. This class is abstract, meaning it cannot be instantiated or copied (has private c'tor and copy c'tor)

Member Enumeration Documentation

◆ IPv6ExtensionType

An enum representing all supported IPv6 extension types

Enumerator
IPv6HopByHop 

Hop-By-Hop extension type

IPv6Routing 

Routing extension type

IPv6Fragmentation 

IPv6 fragmentation extension type

IPv6AuthenticationHdr 

Authentication Header extension type

IPv6Destination 

Destination extension type

IPv6ExtensionUnknown 

Unknown or unsupported extension type

Constructor & Destructor Documentation

◆ ~IPv6Extension()

virtual pcpp::IPv6Extension::~IPv6Extension ( )
virtual

A destructor for this class

Member Function Documentation

◆ getExtensionLen()

virtual size_t pcpp::IPv6Extension::getExtensionLen ( ) const
inlinevirtual
Returns
The size of extension in bytes, meaning (for most extensions): 8 * ([headerLen field] + 1)

Reimplemented in pcpp::IPv6AuthenticationHeader.

◆ getExtensionType()

IPv6ExtensionType pcpp::IPv6Extension::getExtensionType ( ) const
inline
Returns
The type of the extension

◆ getNextHeader()

IPv6Extension* pcpp::IPv6Extension::getNextHeader ( ) const
inline
Returns
A pointer to the next header or nullptr if the extension is the last one