![]() |
Kea
1.5.0
|
Specifies current DHCP configuration. More...
#include <srv_config.h>
Inheritance diagram for isc::dhcp::SrvConfig:Constants for selection of parameters returned by @c getConfigSummary | |
| static const uint32_t | CFGSEL_NONE = 0x00000000 |
| Nothing selected. More... | |
| static const uint32_t | CFGSEL_SUBNET4 = 0x00000001 |
| Number of IPv4 subnets. More... | |
| static const uint32_t | CFGSEL_SUBNET6 = 0x00000002 |
| Number of IPv6 subnets. More... | |
| static const uint32_t | CFGSEL_IFACE4 = 0x00000004 |
| Number of enabled ifaces. More... | |
| static const uint32_t | CFGSEL_IFACE6 = 0x00000008 |
| Number of v6 ifaces. More... | |
| static const uint32_t | CFGSEL_DDNS = 0x00000010 |
| DDNS enabled/disabled. More... | |
| static const uint32_t | CFGSEL_SUBNET = 0x00000003 |
| Number of all subnets. More... | |
| static const uint32_t | CFGSEL_GLOBALS = 0x00000020 |
| Configured globals. More... | |
| static const uint32_t | CFGSEL_CFG_CTL = 0x00000040 |
| Config control info. More... | |
| static const uint32_t | CFGSEL_ALL4 = 0x00000035 |
| IPv4 related config. More... | |
| static const uint32_t | CFGSEL_ALL6 = 0x0000003A |
| IPv6 related config. More... | |
| static const uint32_t | CFGSEL_ALL = 0xFFFFFFFF |
| Whole config. More... | |
| SrvConfig () | |
| Default constructor. More... | |
| SrvConfig (const uint32_t sequence) | |
| Constructor. More... | |
| std::string | getConfigSummary (const uint32_t selection) const |
| Returns summary of the configuration in the textual format. More... | |
| uint32_t | getSequence () const |
| Returns configuration sequence number. More... | |
| bool | sequenceEquals (const SrvConfig &other) |
| Compares configuration sequence with other sequence. More... | |
| CfgIfacePtr | getCfgIface () |
| Returns non-const pointer to interface configuration. More... | |
| ConstCfgIfacePtr | getCfgIface () const |
| Returns const pointer to interface configuration. More... | |
| CfgOptionDefPtr | getCfgOptionDef () |
| Return pointer to non-const object representing user-defined option definitions. More... | |
| ConstCfgOptionDefPtr | getCfgOptionDef () const |
| Returns pointer to the const object representing user-defined option definitions. More... | |
| CfgOptionPtr | getCfgOption () |
| Returns pointer to the non-const object holding options. More... | |
| const ConstCfgOptionPtr | getCfgOption () const |
| Returns pointer to the const object holding options. More... | |
| CfgSubnets4Ptr | getCfgSubnets4 () |
| Returns pointer to non-const object holding subnets configuration for DHCPv4. More... | |
| CfgSharedNetworks4Ptr | getCfgSharedNetworks4 () const |
| Returns pointer to non-const object holding configuration of shared networks in DHCPv4;. More... | |
| CfgSharedNetworks6Ptr | getCfgSharedNetworks6 () const |
| Returns pointer to non-const object holding configuration of shared networks in DHCPv6. More... | |
| ConstCfgSubnets4Ptr | getCfgSubnets4 () const |
| Returns pointer to const object holding subnets configuration for DHCPv4. More... | |
| CfgSubnets6Ptr | getCfgSubnets6 () |
| Returns pointer to non-const object holding subnets configuration for DHCPv6. More... | |
| ConstCfgSubnets6Ptr | getCfgSubnets6 () const |
| Returns pointer to const object holding subnets configuration for DHCPv6. More... | |
| CfgHostsPtr | getCfgHosts () |
| Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 subnets. More... | |
| ConstCfgHostsPtr | getCfgHosts () const |
| Returns pointer to the const objects representing host reservations for different IPv4 and IPv6 subnets. More... | |
| CfgRSOOPtr | getCfgRSOO () |
| Returns pointer to the non-const object representing set of RSOO-enabled options. More... | |
| ConstCfgRSOOPtr | getCfgRSOO () const |
| Returns pointer to the const object representing set of RSOO-enabled options. More... | |
| CfgExpirationPtr | getCfgExpiration () |
| Returns pointer to the object holding configuration pertaining to processing expired leases. More... | |
| ConstCfgExpirationPtr | getCfgExpiration () const |
| Returns pointer to the const object holding configuration pertaining to processing expired leases. More... | |
| CfgDUIDPtr | getCfgDUID () |
| Returns pointer to the object holding configuration of the server identifier. More... | |
| ConstCfgDUIDPtr | getCfgDUID () const |
| Returns const pointer to the object holding configuration of the server identifier. More... | |
| CfgDbAccessPtr | getCfgDbAccess () |
| Returns pointer to the object holding configuration of the lease and host database connection parameters. More... | |
| ConstCfgDbAccessPtr | getCfgDbAccess () const |
| Returns const pointer to the object holding configuration of the lease and host database connection parameters. More... | |
| CfgHostOperationsPtr | getCfgHostOperations4 () |
| Returns pointer to the object holding general configuration for host reservations in DHCPv4. More... | |
| ConstCfgHostOperationsPtr | getCfgHostOperations4 () const |
| Returns const pointer to the object holding general configuration for host reservations in DHCPv4. More... | |
| CfgHostOperationsPtr | getCfgHostOperations6 () |
| Returns pointer to the object holding general configuration for host reservations in DHCPv6. More... | |
| ConstCfgHostOperationsPtr | getCfgHostOperations6 () const |
| Returns const pointer to the object holding general configuration for host reservations in DHCPv6. More... | |
| CfgConsistencyPtr | getConsistency () |
| Returns const pointer to object holding sanity checks flags. More... | |
| CfgMACSource & | getMACSources () |
| Returns non-const reference to an array that stores MAC/hardware address sources. More... | |
| const CfgMACSource & | getMACSources () const |
| Returns const reference to an array that stores MAC/hardware address sources. More... | |
| const isc::data::ConstElementPtr | getControlSocketInfo () const |
| Returns information about control socket. More... | |
| void | setControlSocketInfo (const isc::data::ConstElementPtr &control_socket) |
| Sets information about the control socket. More... | |
| const isc::data::ConstElementPtr | getDHCPQueueControl () const |
| Returns DHCP queue control information. More... | |
| void | setDHCPQueueControl (const isc::data::ConstElementPtr dhcp_queue_control) |
| Sets information about the dhcp queue control. More... | |
| ClientClassDictionaryPtr | getClientClassDictionary () |
| Returns pointer to the dictionary of global client class definitions. More... | |
| const ClientClassDictionaryPtr | getClientClassDictionary () const |
| Returns pointer to const dictionary of global client class definitions. More... | |
| void | setClientClassDictionary (const ClientClassDictionaryPtr &dictionary) |
| Sets the client class dictionary. More... | |
| isc::hooks::HooksConfig & | getHooksConfig () |
| Returns non-const reference to configured hooks libraries. More... | |
| const isc::hooks::HooksConfig & | getHooksConfig () const |
| Returns const reference to configured hooks libraries. More... | |
| void | copy (SrvConfig &new_config) const |
| Copies the current configuration to a new configuration. More... | |
Methods and operators used to compare configurations. | |
| bool | equals (const SrvConfig &other) const |
| Compares two objects for equality. More... | |
| bool | nequals (const SrvConfig &other) const |
| Compares two objects for inequality. More... | |
| bool | operator== (const SrvConfig &other) const |
| Equality operator. More... | |
| bool | operator!= (const SrvConfig &other) const |
| void | updateStatistics () |
| Updates statistics. More... | |
| void | removeStatistics () |
| Removes statistics. More... | |
| void | setDeclinePeriod (const uint32_t decline_timer) |
| Sets decline probation-period. More... | |
| uint32_t | getDeclinePeriod () const |
| Returns probation-period. More... | |
| void | setEchoClientId (const bool echo) |
| Sets whether server should send back client-id in DHCPv4. More... | |
| bool | getEchoClientId () const |
| Returns whether server should send back client-id in DHCPv4. More... | |
| void | setDhcp4o6Port (uint16_t port) |
| Sets DHCP4o6 IPC port. More... | |
| uint16_t | getDhcp4o6Port () |
| Returns DHCP4o6 IPC port. More... | |
| D2ClientConfigPtr | getD2ClientConfig () |
| Returns pointer to the D2 client configuration. More... | |
| const D2ClientConfigPtr | getD2ClientConfig () const |
| Returns pointer to const D2 client configuration. More... | |
| void | setD2ClientConfig (const D2ClientConfigPtr &d2_client_config) |
| Sets the D2 client configuration. More... | |
| isc::data::ConstElementPtr | getConfiguredGlobals () const |
| Returns pointer to configured global parameters. More... | |
| void | extractConfiguredGlobals (isc::data::ConstElementPtr config) |
| Saves scalar elements from the global scope of a configuration. More... | |
| void | addConfiguredGlobal (const std::string &name, isc::data::ConstElementPtr value) |
| Adds a parameter to the collection configured globals. More... | |
| void | setServerTag (const std::string &server_tag) |
| Sets the server's logical name. More... | |
| std::string | getServerTag () const |
| Returns the server's logical name. More... | |
| virtual isc::data::ElementPtr | toElement () const |
| Unparse a configuration object. More... | |
Additional Inherited Members | |
Public Member Functions inherited from isc::process::ConfigBase | |
| const process::LoggingInfoStorage & | getLoggingInfo () const |
| Returns logging specific configuration. More... | |
| void | addLoggingInfo (const process::LoggingInfo &logging_info) |
| Sets logging specific configuration. More... | |
| void | applyLoggingCfg () const |
| Apply logging configuration to log4cplus. More... | |
| bool | equals (const ConfigBase &other) const |
| Compares two configuration. More... | |
| process::ConstConfigControlInfoPtr | getConfigControlInfo () const |
| Fetches a read-only copy of the configuration control information. More... | |
| void | setConfigControlInfo (const process::ConfigControlInfoPtr &config_ctl_info) |
| Set the configuration control information. More... | |
Public Member Functions inherited from isc::data::UserContext | |
| void | contextToElement (data::ElementPtr map) const |
| Merge unparse a user_context object. More... | |
| data::ConstElementPtr | getContext () const |
| Returns const pointer to the user context. More... | |
| void | setContext (const data::ConstElementPtr &ctx) |
| Sets user context. More... | |
Public Member Functions inherited from isc::data::CfgToElement | |
| virtual | ~CfgToElement () |
| Destructor. More... | |
Static Public Member Functions inherited from isc::data::UserContext | |
| static data::ElementPtr | toElement (data::ConstElementPtr map) |
| Copy extracting comments an Element map. More... | |
Protected Member Functions inherited from isc::process::ConfigBase | |
| void | copy (ConfigBase &new_config) const |
| Copies the current configuration to a new configuration. More... | |
Protected Attributes inherited from isc::data::UserContext | |
| data::ConstElementPtr | user_context_ |
| Pointer to the user context (may be NULL) More... | |
Specifies current DHCP configuration.
Definition at line 44 of file srv_config.h.
| isc::dhcp::SrvConfig::SrvConfig | ( | ) |
Default constructor.
This constructor sets configuration sequence number to 0.
Definition at line 26 of file srv_config.cc.
| isc::dhcp::SrvConfig::SrvConfig | ( | const uint32_t | sequence | ) |
Constructor.
Sets arbitrary configuration sequence number.
Definition at line 45 of file srv_config.cc.
|
inline |
Adds a parameter to the collection configured globals.
| name | std::string name of the global to add |
| value | ElementPtr containing the value of the global |
Definition at line 570 of file srv_config.h.
Referenced by extractConfiguredGlobals().
| void isc::dhcp::SrvConfig::copy | ( | SrvConfig & | new_config | ) | const |
Copies the current configuration to a new configuration.
This method copies the parameters stored in the configuration to an object passed as parameter. The configuration sequence is not copied.
CfgMgr unusable.| [out] | new_config | An object to which the configuration will be copied. |
Definition at line 111 of file srv_config.cc.
References isc::hooks::HooksConfig::add(), isc::hooks::HooksConfig::clear(), isc::data::copy(), getD2ClientConfig(), and setD2ClientConfig().
Here is the call graph for this function:| bool isc::dhcp::SrvConfig::equals | ( | const SrvConfig & | other | ) | const |
Compares two objects for equality.
It ignores the configuration sequence number when checking for equality of objects.
| other | An object to be compared with this object. |
Definition at line 134 of file srv_config.cc.
References isc::hooks::HooksConfig::equal(), and isc::hooks::HooksConfig::get().
Referenced by nequals(), and operator==().
Here is the call graph for this function:| void isc::dhcp::SrvConfig::extractConfiguredGlobals | ( | isc::data::ConstElementPtr | config | ) |
Saves scalar elements from the global scope of a configuration.
Definition at line 184 of file srv_config.cc.
References addConfiguredGlobal(), and isc_throw.
Here is the call graph for this function:
|
inline |
Returns pointer to the object holding configuration of the lease and host database connection parameters.
Definition at line 294 of file srv_config.h.
|
inline |
Returns const pointer to the object holding configuration of the lease and host database connection parameters.
Definition at line 300 of file srv_config.h.
|
inline |
Returns pointer to the object holding configuration of the server identifier.
Definition at line 282 of file srv_config.h.
|
inline |
Returns const pointer to the object holding configuration of the server identifier.
Definition at line 288 of file srv_config.h.
|
inline |
Returns pointer to the object holding configuration pertaining to processing expired leases.
Definition at line 270 of file srv_config.h.
|
inline |
Returns pointer to the const object holding configuration pertaining to processing expired leases.
Definition at line 276 of file srv_config.h.
|
inline |
Returns pointer to the object holding general configuration for host reservations in DHCPv4.
Definition at line 306 of file srv_config.h.
|
inline |
Returns const pointer to the object holding general configuration for host reservations in DHCPv4.
Definition at line 312 of file srv_config.h.
|
inline |
Returns pointer to the object holding general configuration for host reservations in DHCPv6.
Definition at line 318 of file srv_config.h.
|
inline |
Returns const pointer to the object holding general configuration for host reservations in DHCPv6.
Definition at line 324 of file srv_config.h.
|
inline |
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 subnets.
Definition at line 238 of file srv_config.h.
|
inline |
Returns pointer to the const objects representing host reservations for different IPv4 and IPv6 subnets.
Definition at line 246 of file srv_config.h.
|
inline |
Returns non-const pointer to interface configuration.
This function returns a non-const pointer to the interface configuration.
Definition at line 128 of file srv_config.h.
|
inline |
Returns const pointer to interface configuration.
This function returns a const pointer to the interface configuration.
Definition at line 138 of file srv_config.h.
|
inline |
Returns pointer to the non-const object holding options.
This method returns a pointer to the object which holds instances of the options to be returned to the clients belonging to any subnet.
Definition at line 170 of file srv_config.h.
|
inline |
Returns pointer to the const object holding options.
This method returns a pointer to the object which holds instances of the options to be returned to the clients belonging to any subnet.
Definition at line 180 of file srv_config.h.
|
inline |
Return pointer to non-const object representing user-defined option definitions.
This function returns a pointer to the object which represents the user defined option definitions grouped by option space name.
Definition at line 149 of file srv_config.h.
|
inline |
Returns pointer to the const object representing user-defined option definitions.
This function returns a pointer to the object which represents the user defined option definitions grouped by option space name.
Definition at line 160 of file srv_config.h.
|
inline |
Returns pointer to the non-const object representing set of RSOO-enabled options.
Definition at line 255 of file srv_config.h.
|
inline |
Returns pointer to the const object representing set of RSOO-enabled options.
Definition at line 264 of file srv_config.h.
|
inline |
Returns pointer to non-const object holding configuration of shared networks in DHCPv4;.
Definition at line 197 of file srv_config.h.
|
inline |
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
Definition at line 206 of file srv_config.h.
|
inline |
Returns pointer to non-const object holding subnets configuration for DHCPv4.
Definition at line 188 of file srv_config.h.
Referenced by getConfigSummary(), removeStatistics(), and updateStatistics().
|
inline |
Returns pointer to const object holding subnets configuration for DHCPv4.
Definition at line 214 of file srv_config.h.
|
inline |
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Definition at line 222 of file srv_config.h.
Referenced by getConfigSummary(), removeStatistics(), and updateStatistics().
|
inline |
Returns pointer to const object holding subnets configuration for DHCPv6.
Definition at line 230 of file srv_config.h.
|
inline |
Returns pointer to the dictionary of global client class definitions.
Definition at line 377 of file srv_config.h.
|
inline |
Returns pointer to const dictionary of global client class definitions.
Definition at line 383 of file srv_config.h.
| std::string isc::dhcp::SrvConfig::getConfigSummary | ( | const uint32_t | selection | ) | const |
Returns summary of the configuration in the textual format.
This method returns the brief text describing the current configuration. It may be used for logging purposes, e.g. when the new configuration is committed to notify a user about the changes in configuration.
CfgMgr accessors to get the configuration parameters. Once these parameters are migrated from the CfgMgr this method will have to be modified accordingly.| selection | Is a bitfield which describes the parts of the configuration to be returned. |
Definition at line 65 of file srv_config.cc.
References CFGSEL_DDNS, CFGSEL_SUBNET4, CFGSEL_SUBNET6, getCfgSubnets4(), getCfgSubnets6(), and getD2ClientConfig().
Here is the call graph for this function:
|
inline |
Returns pointer to configured global parameters.
Definition at line 560 of file srv_config.h.
|
inline |
Returns const pointer to object holding sanity checks flags.
Definition at line 329 of file srv_config.h.
Referenced by isc::dhcp::SanityChecksParser::parse().
|
inline |
Returns information about control socket.
Definition at line 353 of file srv_config.h.
|
inline |
Returns pointer to the D2 client configuration.
Definition at line 544 of file srv_config.h.
Referenced by copy(), and getConfigSummary().
|
inline |
Returns pointer to const D2 client configuration.
Definition at line 549 of file srv_config.h.
|
inline |
Returns probation-period.
See setDeclinePeriod for brief discussion.
Definition at line 505 of file srv_config.h.
|
inline |
Returns DHCP4o6 IPC port.
See setDhcp4o6Port for brief discussion.
Definition at line 539 of file srv_config.h.
|
inline |
Returns DHCP queue control information.
Definition at line 365 of file srv_config.h.
Referenced by toElement().
|
inline |
Returns whether server should send back client-id in DHCPv4.
Definition at line 521 of file srv_config.h.
|
inline |
Returns non-const reference to configured hooks libraries.
Definition at line 396 of file srv_config.h.
|
inline |
Returns const reference to configured hooks libraries.
Definition at line 403 of file srv_config.h.
|
inline |
Returns non-const reference to an array that stores MAC/hardware address sources.
Definition at line 339 of file srv_config.h.
|
inline |
Returns const reference to an array that stores MAC/hardware address sources.
Definition at line 347 of file srv_config.h.
|
inline |
Returns configuration sequence number.
Definition at line 106 of file srv_config.h.
Referenced by sequenceEquals().
|
inline |
Returns the server's logical name.
Definition at line 585 of file srv_config.h.
|
inline |
Compares two objects for inequality.
It ignores the configuration sequence number when checking for inequality of objects.
| other | An object to be compared with this object. |
Definition at line 447 of file srv_config.h.
References equals().
Referenced by operator!=().
Here is the call graph for this function:
|
inline |
| other | An object to be compared with this object. |
It ignores the configuration sequence number when checking for inequality of objects.
| other | An object to be compared with this object. |
Definition at line 471 of file srv_config.h.
References nequals().
Here is the call graph for this function:
|
inline |
Equality operator.
It ignores the configuration sequence number when checking for equality of objects.
| other | An object to be compared with this object. |
Definition at line 459 of file srv_config.h.
References equals().
Here is the call graph for this function:| void isc::dhcp::SrvConfig::removeStatistics | ( | ) |
Removes statistics.
This method calls appropriate methods in child objects that remove related statistics. See CfgSubnets4::removeStatistics and CfgSubnets6::removeStatistics for details.
Definition at line 160 of file srv_config.cc.
References getCfgSubnets4(), and getCfgSubnets6().
Here is the call graph for this function:| bool isc::dhcp::SrvConfig::sequenceEquals | ( | const SrvConfig & | other | ) |
Compares configuration sequence with other sequence.
This method compares sequence numbers of two configurations for equality. The sequence numbers are meant to be unique, so if they are equal it means that they point to the same configuration.
| other | Configuration which sequence number should be compared with the sequence number of this configuration. |
Definition at line 106 of file srv_config.cc.
References getSequence().
Here is the call graph for this function:
|
inline |
Sets the client class dictionary.
| dictionary | pointer to the new class dictionary |
Definition at line 389 of file srv_config.h.
|
inline |
Sets information about the control socket.
| control_socket | Element that holds control-socket map |
Definition at line 359 of file srv_config.h.
Referenced by isc::dhcp::ControlSocketParser::parse().
|
inline |
Sets the D2 client configuration.
| d2_client_config | pointer to the new D2 client configuration |
Definition at line 555 of file srv_config.h.
Referenced by copy().
|
inline |
Sets decline probation-period.
Probation-period is the timer, expressed, in seconds, that specifies how long a lease is unavailable after reported as declined.
| decline_timer | number of seconds after declined lease is restored |
Definition at line 497 of file srv_config.h.
|
inline |
Sets DHCP4o6 IPC port.
DHCPv4-over-DHCPv6 uses a UDP socket for interserver communication, this socket is bound and connected to this port and port + 1
| port | port and port + 1 to use |
Definition at line 531 of file srv_config.h.
|
inline |
Sets information about the dhcp queue control.
| dhcp_queue_control | new dhcp queue control information |
Definition at line 371 of file srv_config.h.
|
inline |
Sets whether server should send back client-id in DHCPv4.
This is a compatibility flag. The default (true) is compliant with RFC6842. False is for backward compatibility.
| echo | should the client-id be sent or not |
Definition at line 515 of file srv_config.h.
|
inline |
Sets the server's logical name.
| server_tag | a unique string name which identifies this server from any other configured servers |
Definition at line 578 of file srv_config.h.
|
virtual |
Unparse a configuration object.
Reimplemented from isc::process::ConfigBase.
Definition at line 199 of file srv_config.cc.
References isc::data::UserContext::contextToElement(), isc::dhcp::CfgHostsList::get(), isc::process::ConfigBase::getConfigControlInfo(), getDHCPQueueControl(), isc::dhcp::CfgMgr::getFamily(), isc::dhcp::CfgMgr::instance(), isc::dhcp::CfgHostsList::internalize(), isc_throw, isc::data::isNull(), isc::dhcp::CfgMACSource::toElement(), isc::hooks::HooksConfig::toElement(), isc::dhcp::CfgLeaseDbAccess::toElement(), and isc::dhcp::CfgHostDbAccess::toElement().
Here is the call graph for this function:| void isc::dhcp::SrvConfig::updateStatistics | ( | ) |
Updates statistics.
This method calls appropriate methods in child objects that update related statistics. See CfgSubnets4::updateStatistics and CfgSubnets6::updateStatistics for details.
Definition at line 169 of file srv_config.cc.
References getCfgSubnets4(), getCfgSubnets6(), and isc::dhcp::LeaseMgrFactory::haveInstance().
Here is the call graph for this function:
|
static |
Whole config.
Definition at line 72 of file srv_config.h.
|
static |
IPv4 related config.
Definition at line 68 of file srv_config.h.
|
static |
IPv6 related config.
Definition at line 70 of file srv_config.h.
|
static |
Config control info.
Definition at line 66 of file srv_config.h.
|
static |
DDNS enabled/disabled.
Definition at line 60 of file srv_config.h.
Referenced by getConfigSummary().
|
static |
Configured globals.
Definition at line 64 of file srv_config.h.
|
static |
Number of enabled ifaces.
Definition at line 56 of file srv_config.h.
|
static |
Number of v6 ifaces.
Definition at line 58 of file srv_config.h.
|
static |
Nothing selected.
Definition at line 50 of file srv_config.h.
|
static |
Number of all subnets.
Definition at line 62 of file srv_config.h.
|
static |
Number of IPv4 subnets.
Definition at line 52 of file srv_config.h.
Referenced by getConfigSummary().
|
static |
Number of IPv6 subnets.
Definition at line 54 of file srv_config.h.
Referenced by getConfigSummary().