PcapPlusPlus  24.09
pcpp::NdpOptionBuilder Class Reference

#include <NdpLayer.h>

Inheritance diagram for pcpp::NdpOptionBuilder:
pcpp::TLVRecordBuilder

Public Member Functions

 NdpOptionBuilder (NDPNeighborOptionTypes optionType, const uint8_t *optionValue, uint8_t optionValueLen)
 
NdpOption build () const
 

Detailed Description

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

Constructor & Destructor Documentation

◆ NdpOptionBuilder()

pcpp::NdpOptionBuilder::NdpOptionBuilder ( NDPNeighborOptionTypes  optionType,
const uint8_t *  optionValue,
uint8_t  optionValueLen 
)
inline

A c'tor for building NDP options which their value is a byte array. The NdpOption object can be later retrieved by calling build(). Each option is padded to have a 64-bit boundary.

Parameters
[in]optionTypeNDP 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()

NdpOption pcpp::NdpOptionBuilder::build ( ) const

Build the NdpOption object out of the parameters defined in the c'tor. Padding bytes are added to the option for option length with 64-bit boundaries.

Returns
The NdpOption object