PcapPlusPlus  22.11
pcpp::DhcpV6OptionBuilder Class Reference

#include <DhcpV6Layer.h>

Inheritance diagram for pcpp::DhcpV6OptionBuilder:
pcpp::TLVRecordBuilder

Public Member Functions

 DhcpV6OptionBuilder (DhcpV6OptionType optionType, const std::string &optionValueAsHexStream)
 
 DhcpV6OptionBuilder (DhcpV6OptionType optionType, const uint8_t *optionValue, uint8_t optionValueLen)
 
DhcpV6Option build () const
 

Detailed Description

A class for building DHCPv6 options. This builder receives the option parameters in its c'tor, builds the DHCPv6 option raw buffer and provides a build() method to get a DhcpV6Option object out of it

Constructor & Destructor Documentation

◆ DhcpV6OptionBuilder() [1/2]

pcpp::DhcpV6OptionBuilder::DhcpV6OptionBuilder ( DhcpV6OptionType  optionType,
const std::string &  optionValueAsHexStream 
)
inline

A c'tor for building DHCPv6 options from a string representing the hex stream of the raw byte value. The DhcpV6Option object can later be retrieved by calling build()

Parameters
[in]optionTypeDHCPv6 option type
[in]optionValueAsHexStreamThe value as a hex stream string

◆ DhcpV6OptionBuilder() [2/2]

pcpp::DhcpV6OptionBuilder::DhcpV6OptionBuilder ( DhcpV6OptionType  optionType,
const uint8_t *  optionValue,
uint8_t  optionValueLen 
)
inline

A c'tor for building DHCPv6 options from a byte array representing their value. The DhcpV6Option object can be later retrieved by calling build()

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

Member Function Documentation

◆ build()

DhcpV6Option pcpp::DhcpV6OptionBuilder::build ( ) const

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

Returns
The DhcpV6Option object