PcapPlusPlus  21.05+
pcpp::IPv6TLVOptionHeader::IPv6Option Class Reference

#include <IPv6Extensions.h>

Inheritance diagram for pcpp::IPv6TLVOptionHeader::IPv6Option:
pcpp::TLVRecord< uint8_t, uint8_t >

Public Member Functions

 IPv6Option (uint8_t *optionRawData)
 ~IPv6Option ()
size_t getTotalSize () const
size_t getDataSize () const
- Public Member Functions inherited from pcpp::TLVRecord< uint8_t, uint8_t >
 TLVRecord (uint8_t *recordRawData)
 TLVRecord (const TLVRecord &other)
virtual ~TLVRecord ()
void assign (uint8_t *recordRawData)
TLVRecordoperator= (const TLVRecord &other)
bool operator== (const TLVRecord &rhs) const
bool operator!= (const TLVRecord &rhs) const
uint8_t getType () const
uint8_t * getValue () const
bool isNull () const
bool isNotNull () const
uint8_t * getRecordBasePtr () const
void purgeRecordData ()
getValueAs (size_t offset=0) const
bool setValue (T newValue, int valueOffset=0)

Detailed Description

A class representing a Type-Length-Value (TLV) options that are used inside Hop-By-Hop and Destinations IPv6 extensions. This class does not create or modify IPv6 option records, but rather serves as a wrapper and provides useful methods for retrieving data from them

Constructor & Destructor Documentation

◆ IPv6Option()

pcpp::IPv6TLVOptionHeader::IPv6Option::IPv6Option ( uint8_t *  optionRawData)

A c'tor for this class that gets a pointer to the option raw data (byte array)

[in]optionRawDataA pointer to the attribute raw data

◆ ~IPv6Option()

pcpp::IPv6TLVOptionHeader::IPv6Option::~IPv6Option ( )

A d'tor for this class, currently does nothing

Member Function Documentation

◆ getDataSize()

size_t pcpp::IPv6TLVOptionHeader::IPv6Option::getDataSize ( ) const
The size of the record value (meaning the size of the 'V' part in TLV)

Implements pcpp::TLVRecord< uint8_t, uint8_t >.

◆ getTotalSize()

size_t pcpp::IPv6TLVOptionHeader::IPv6Option::getTotalSize ( ) const
The total size of the TLV record (in bytes)

Implements pcpp::TLVRecord< uint8_t, uint8_t >.