Kea 2.7.5
|
Wrapper class that holds MAC/hardware address sources. More...
#include <cfg_mac_source.h>
Public Member Functions | |
CfgMACSource () | |
Default constructor. | |
void | add (uint32_t source) |
Adds additional MAC/hardware address acquisition. | |
void | clear () |
Removes any configured MAC/Hardware address sources. | |
const CfgMACSources & | get () const |
Provides access to the configure MAC/Hardware address sources. | |
virtual isc::data::ElementPtr | toElement () const |
Unparse a configuration object. | |
Public Member Functions inherited from isc::data::CfgToElement | |
virtual | ~CfgToElement () |
Destructor. | |
Static Public Member Functions | |
static uint32_t | MACSourceFromText (const std::string &name) |
Attempts to convert known hardware address sources to uint32_t. | |
Protected Attributes | |
CfgMACSources | mac_sources_ |
Actual MAC sources storage. | |
Wrapper class that holds MAC/hardware address sources.
It's a simple wrapper around a vector of uint32_t, with each entry holding one MAC source.
Definition at line 25 of file cfg_mac_source.h.
isc::dhcp::CfgMACSource::CfgMACSource | ( | ) |
Default constructor.
Sets source to 'any'.
Definition at line 41 of file cfg_mac_source.cc.
References isc::dhcp::HWAddr::HWADDR_SOURCE_ANY, and mac_sources_.
void isc::dhcp::CfgMACSource::add | ( | uint32_t | source | ) |
Adds additional MAC/hardware address acquisition.
source | MAC source (see constants in Pkt::HWADDR_SOURCE_*) |
Specified source is being added to the mac_sources_ array.
InvalidParameter | if such a source is already defined. |
Definition at line 57 of file cfg_mac_source.cc.
References isc_throw, and mac_sources_.
|
inline |
Removes any configured MAC/Hardware address sources.
Definition at line 68 of file cfg_mac_source.h.
References mac_sources_.
|
inline |
Provides access to the configure MAC/Hardware address sources.
Definition at line 63 of file cfg_mac_source.h.
References mac_sources_.
|
static |
Attempts to convert known hardware address sources to uint32_t.
Supported strings are:
For specific constants, see isc::dhcp::HWAddr class.
BadValue | if specified string is unknown |
Definition at line 47 of file cfg_mac_source.cc.
References isc_throw.
Referenced by isc::dhcp::MACSourcesListConfigParser::parse().
|
virtual |
Unparse a configuration object.
Implements isc::data::CfgToElement.
Definition at line 67 of file cfg_mac_source.cc.
References isc::data::Element::create(), isc::data::Element::createList(), isc_throw, and mac_sources_.
Referenced by isc::dhcp::SrvConfig::toElement().
|
protected |
Actual MAC sources storage.
Definition at line 79 of file cfg_mac_source.h.
Referenced by CfgMACSource(), add(), clear(), get(), and toElement().