PcapPlusPlus
pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder Class Reference

#include <IPv6Extensions.h>

Inheritance diagram for pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder:
pcpp::TLVRecordBuilder

Public Member Functions

 IPv6TLVOptionBuilder (uint8_t optType, const uint8_t *optValue, uint8_t optValueLen)
 
 IPv6TLVOptionBuilder (uint8_t optType, uint8_t optValue)
 
 IPv6TLVOptionBuilder (uint8_t optType, uint16_t optValue)
 
 IPv6TLVOptionBuilder (const IPv6TLVOptionBuilder &other)
 
IPv6Option build () const
 

Detailed Description

A class for building IPv6 Type-Length-Value (TLV) options. This builder receives the option parameters in its c'tor, builds the option raw buffer and provides a method to build a IPv6Option object out of it

Constructor & Destructor Documentation

◆ IPv6TLVOptionBuilder() [1/4]

pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder::IPv6TLVOptionBuilder ( uint8_t  optType,
const uint8_t *  optValue,
uint8_t  optValueLen 
)
inline

A c'tor for building IPv6 TLV options which their value is a byte array. The IPv6Option object can later be retrieved by calling build()

Parameters
[in]optTypeIPv6 option type
[in]optValueA buffer containing the option value. This buffer is read-only and isn't modified in any way
[in]optValueLenOption value length in bytes

◆ IPv6TLVOptionBuilder() [2/4]

pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder::IPv6TLVOptionBuilder ( uint8_t  optType,
uint8_t  optValue 
)
inline

A c'tor for building IPv6 TLV options which have a 1-byte value. The IPv6Option object can later be retrieved by calling build()

Parameters
[in]optTypeIPv6 option type
[in]optValueA 1-byte option value

◆ IPv6TLVOptionBuilder() [3/4]

pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder::IPv6TLVOptionBuilder ( uint8_t  optType,
uint16_t  optValue 
)
inline

A c'tor for building IPv6 TLV options which have a 2-byte value. The IPv6Option object can later be retrieved by calling build()

Parameters
[in]optTypeIPv6 option type
[in]optValueA 2-byte option value

◆ IPv6TLVOptionBuilder() [4/4]

pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder::IPv6TLVOptionBuilder ( const IPv6TLVOptionBuilder other)
inline

A copy c'tor that creates an instance of this class out of another instance and copies all the data from it

Parameters
[in]otherThe instance to copy data from

Member Function Documentation

◆ build()

IPv6Option pcpp::IPv6TLVOptionHeader::IPv6TLVOptionBuilder::build ( ) const

Build the IPv6Option object out of the parameters defined in the c'tor

Returns
The IPv6Option object