PcapPlusPlus  21.05+
pcpp::PPPoEDiscoveryLayer::PPPoETagBuilder Class Reference

#include <PPPoELayer.h>

Inheritance diagram for pcpp::PPPoEDiscoveryLayer::PPPoETagBuilder:
pcpp::TLVRecordBuilder

Public Member Functions

 PPPoETagBuilder (PPPoETagTypes tagType)
 
 PPPoETagBuilder (PPPoETagTypes tagType, uint32_t tagValue)
 
 PPPoETagBuilder (PPPoETagTypes tagType, uint8_t *tagValue, uint8_t tagValueLen)
 
PPPoETag build () const
 

Detailed Description

A class for building PPPoE Tags. This builder receives the tag parameters in its c'tor, builds the PPPoE Tag raw buffer and provides a build() method to get a PPPoETag object out of it

Constructor & Destructor Documentation

◆ PPPoETagBuilder() [1/3]

pcpp::PPPoEDiscoveryLayer::PPPoETagBuilder::PPPoETagBuilder ( PPPoETagTypes  tagType)
inline

A c'tor for building a PPPoE Tag which has no value (tag len is zero). The PPPoETag object can later be retrieved by calling build()

Parameters
[in]tagTypeTag type

◆ PPPoETagBuilder() [2/3]

pcpp::PPPoEDiscoveryLayer::PPPoETagBuilder::PPPoETagBuilder ( PPPoETagTypes  tagType,
uint32_t  tagValue 
)
inline

A c'tor for building a PPPoE Tag which has a 4-byte value. The PPPoETag object can later be retrieved by calling build()

Parameters
[in]tagTypeTag type
[in]tagValueThe tag's 4-byte value

◆ PPPoETagBuilder() [3/3]

pcpp::PPPoEDiscoveryLayer::PPPoETagBuilder::PPPoETagBuilder ( PPPoETagTypes  tagType,
uint8_t *  tagValue,
uint8_t  tagValueLen 
)
inline

A c'tor for building a PPPoE Tag which has some arbitrary value. The PPPoETag object can later be retrieved by calling build()

Parameters
[in]tagTypeTag type
[in]tagValueA byte array that contains the tag data
[in]tagValueLenThe length of the value byte array

Member Function Documentation

◆ build()

PPPoETag pcpp::PPPoEDiscoveryLayer::PPPoETagBuilder::build ( ) const

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

Returns
The PPPoETag object