PcapPlusPlus
pcpp::IPv6TLVOptionHeader Class Reference

#include <IPv6Extensions.h>

Inheritance diagram for pcpp::IPv6TLVOptionHeader:
pcpp::IPv6Extension pcpp::IPv6DestinationHeader pcpp::IPv6HopByHopHeader

Classes

struct  TLVOption
 
class  TLVOptionBuilder
 

Public Member Functions

TLVOptiongetOption (uint8_t optionType)
 
TLVOptiongetFirstOption ()
 
TLVOptiongetNextOption (TLVOption *option)
 
size_t getOptionCount ()
 
- Public Member Functions inherited from pcpp::IPv6Extension
virtual size_t getExtensionLen () const
 
IPv6ExtensionType getExtensionType ()
 
virtual ~IPv6Extension ()
 

Protected Member Functions

 IPv6TLVOptionHeader (const std::vector< TLVOptionBuilder > &options)
 

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

An abstract base class for Hop-By-Hop and Destination IPv6 extensions which their structure contains Type-Length-Value (TLV) options. This class provides access to these options and their data as well as methods to create new options. Notice this class is abstract and cannot be instantiated

Constructor & Destructor Documentation

◆ IPv6TLVOptionHeader()

pcpp::IPv6TLVOptionHeader::IPv6TLVOptionHeader ( const std::vector< TLVOptionBuilder > &  options)
protected

A private c'tor to keep this object from being constructed

Member Function Documentation

◆ getFirstOption()

TLVOption* pcpp::IPv6TLVOptionHeader::getFirstOption ( )
Returns
A pointer to the first option or NULL if option cannot be found

◆ getNextOption()

TLVOption* pcpp::IPv6TLVOptionHeader::getNextOption ( TLVOption option)

Returns a pointer to the option that comes after the option given as the parameter

Parameters
[in]optionA pointer to an option instance
Returns
A pointer to the option that comes next or NULL if: (1) input parameter is out-of-bounds for this extension or (2) if the next option doesn't exist or (3) if input option is NULL

◆ getOption()

TLVOption* pcpp::IPv6TLVOptionHeader::getOption ( uint8_t  optionType)

Retrieve an option by its type

Parameters
[in]optionTypeOption type
Returns
A pointer to the option data or NULL if option cannot be found

◆ getOptionCount()

size_t pcpp::IPv6TLVOptionHeader::getOptionCount ( )
Returns
The number of options this IPv6 extension contains