PcapPlusPlus  21.05
pcpp::IPv6TLVOptionHeader Class Reference

#include <IPv6Extensions.h>

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

Classes

class  IPv6Option
 
class  IPv6TLVOptionBuilder
 

Public Member Functions

IPv6Option getOption (uint8_t optionType) const
 
IPv6Option getFirstOption () const
 
IPv6Option getNextOption (IPv6Option &option) const
 
size_t getOptionCount () const
 
- Public Member Functions inherited from pcpp::IPv6Extension
virtual size_t getExtensionLen () const
 
IPv6ExtensionType getExtensionType () const
 
virtual ~IPv6Extension ()
 
IPv6ExtensiongetNextHeader () const
 

Protected Member Functions

 IPv6TLVOptionHeader (const std::vector< IPv6TLVOptionBuilder > &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< IPv6TLVOptionBuilder > &  options)
protected

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

Member Function Documentation

◆ getFirstOption()

IPv6Option pcpp::IPv6TLVOptionHeader::getFirstOption ( ) const
Returns
An IPv6Option that wraps the first option data or logical NULL (IPv6Option::isNull() == true) if no options exist

◆ getNextOption()

IPv6Option pcpp::IPv6TLVOptionHeader::getNextOption ( IPv6Option option) const

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

Parameters
[in]optionA pointer to an option instance
Returns
An IPv6Option object that wraps the option data. In the following cases logical NULL (IPv6Option::isNull() == true) is returned: (1) input parameter is out-of-bounds for this extension or (2) the next option doesn't exist or (3) the input option is NULL

◆ getOption()

IPv6Option pcpp::IPv6TLVOptionHeader::getOption ( uint8_t  optionType) const

Retrieve an option by its type

Parameters
[in]optionTypeOption type
Returns
An IPv6Option object that wraps the option data. If option isn't found a logical NULL is returned (IPv6Option::isNull() == true)

◆ getOptionCount()

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