PcapPlusPlus  23.09
pcpp::RadiusAttributeBuilder Class Reference

#include <RadiusLayer.h>

Inheritance diagram for pcpp::RadiusAttributeBuilder:
pcpp::TLVRecordBuilder

Public Member Functions

 RadiusAttributeBuilder (uint8_t attrType, const uint8_t *attrValue, uint8_t attrValueLen)
 
 RadiusAttributeBuilder (uint8_t attrType, uint8_t attrValue)
 
 RadiusAttributeBuilder (uint8_t attrType, uint16_t attrValue)
 
 RadiusAttributeBuilder (uint8_t attrType, uint32_t attrValue)
 
 RadiusAttributeBuilder (uint8_t attrType, const IPv4Address &attrValue)
 
 RadiusAttributeBuilder (uint8_t attrType, const std::string &attrValue)
 
 RadiusAttributeBuilder (const RadiusAttributeBuilder &other)
 
RadiusAttributeBuilderoperator= (const RadiusAttributeBuilder &other)
 
RadiusAttribute build () const
 

Detailed Description

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

Constructor & Destructor Documentation

◆ RadiusAttributeBuilder() [1/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( uint8_t  attrType,
const uint8_t *  attrValue,
uint8_t  attrValueLen 
)
inline

A c'tor for building RADIUS attributes which their value is a byte array. The RadiusAttribute object can later be retrieved by calling build()

Parameters
[in]attrTypeRADIUS attribute type
[in]attrValueA buffer containing the attribute value. This buffer is read-only and isn't modified in any way
[in]attrValueLenAttribute value length in bytes

◆ RadiusAttributeBuilder() [2/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( uint8_t  attrType,
uint8_t  attrValue 
)
inline

A c'tor for building RADIUS attributes which have a 1-byte value. The RadiusAttribute object can later be retrieved by calling build()

Parameters
[in]attrTypeRADIUS attribute type
[in]attrValueA 1-byte attribute value

◆ RadiusAttributeBuilder() [3/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( uint8_t  attrType,
uint16_t  attrValue 
)
inline

A c'tor for building RADIUS attributes which have a 2-byte value. The RadiusAttribute object can later be retrieved by calling build()

Parameters
[in]attrTypeRADIUS attribute type
[in]attrValueA 2-byte attribute value

◆ RadiusAttributeBuilder() [4/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( uint8_t  attrType,
uint32_t  attrValue 
)
inline

A c'tor for building RADIUS attributes which have a 4-byte value. The RadiusAttribute object can later be retrieved by calling build()

Parameters
[in]attrTypeRADIUS attribute type
[in]attrValueA 4-byte attribute value

◆ RadiusAttributeBuilder() [5/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( uint8_t  attrType,
const IPv4Address attrValue 
)
inline

A c'tor for building RADIUS attributes which have an IPv4Address value. The RadiusAttribute object can later be retrieved by calling build()

Parameters
[in]attrTypeRADIUS attribute type
[in]attrValueThe IPv4 address attribute value

◆ RadiusAttributeBuilder() [6/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( uint8_t  attrType,
const std::string &  attrValue 
)
inline

A c'tor for building RADIUS attributes which have a string value. The RadiusAttribute object can later be retrieved by calling build()

Parameters
[in]attrTypeRADIUS attribute type
[in]attrValueThe string attribute value

◆ RadiusAttributeBuilder() [7/7]

pcpp::RadiusAttributeBuilder::RadiusAttributeBuilder ( const RadiusAttributeBuilder other)
inline

A copy c'tor which copies all the data from another instance of RadiusAttributeBuilder

Parameters
[in]otherThe instance to copy from

Member Function Documentation

◆ build()

RadiusAttribute pcpp::RadiusAttributeBuilder::build ( ) const

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

Returns
The RadiusAttribute object

◆ operator=()

RadiusAttributeBuilder& pcpp::RadiusAttributeBuilder::operator= ( const RadiusAttributeBuilder other)
inline

Assignment operator that copies all data from another instance of RadiusAttributeBuilder

Parameters
[in]otherThe instance to assign from