diff options
Diffstat (limited to 'src/lib/dhcpsrv/srv_config.h')
-rw-r--r-- | src/lib/dhcpsrv/srv_config.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/dhcpsrv/srv_config.h b/src/lib/dhcpsrv/srv_config.h index 5ca75aefbc..5a73148c12 100644 --- a/src/lib/dhcpsrv/srv_config.h +++ b/src/lib/dhcpsrv/srv_config.h @@ -59,10 +59,12 @@ public: static const uint32_t CFGSEL_DDNS = 0x00000010; /// Number of all subnets static const uint32_t CFGSEL_SUBNET = 0x00000003; + /// Configured globals + static const uint32_t CFGSEL_GLOBALS = 0x00000020; /// IPv4 related config - static const uint32_t CFGSEL_ALL4 = 0x00000015; + static const uint32_t CFGSEL_ALL4 = 0x00000035; /// IPv6 related config - static const uint32_t CFGSEL_ALL6 = 0x0000001A; + static const uint32_t CFGSEL_ALL6 = 0x0000003A; /// Whole config static const uint32_t CFGSEL_ALL = 0xFFFFFFFF; //@} @@ -556,6 +558,21 @@ public: d2_client_config_ = d2_client_config; } + /// @brief Returns pointer to configured global parameters + isc::data::ConstElementPtr getConfiguredGlobals() const { + return (isc::data::ConstElementPtr(configured_globals_)); + } + + /// @brief Saves scalar elements from the global scope of a configuration + void extractConfiguredGlobals(isc::data::ConstElementPtr config); + + /// @brief Adds a parameter to the collection configured globals + /// @param name std::string name of the global to add + /// @param value ElementPtr containing the value of the global + void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) { + configured_globals_->set(name, value); + } + /// @brief Unparse a configuration object /// /// @return a pointer to unparsed configuration @@ -657,7 +674,11 @@ private: /// this socket is bound and connected to this port and port + 1 uint16_t dhcp4o6_port_; + /// @brief Stores D2 client configuration D2ClientConfigPtr d2_client_config_; + + /// @brief Stores the global parameters specified via configuration + isc::data::ElementPtr configured_globals_; }; /// @name Pointers to the @c SrvConfig object. |