From: Marcin Siodelski Date: Thu, 30 Oct 2014 09:58:29 +0000 (+0100) Subject: [3625] Hooked up the CfgSubnets6 class to SrvConfig. X-Git-Tag: trac3629a_base^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c956ebafc43d39dc3b5420b0eea67ac0ca64993;p=thirdparty%2Fkea.git [3625] Hooked up the CfgSubnets6 class to SrvConfig. --- diff --git a/src/lib/dhcpsrv/srv_config.cc b/src/lib/dhcpsrv/srv_config.cc index 0348334b1e..dfaf1ddda2 100644 --- a/src/lib/dhcpsrv/srv_config.cc +++ b/src/lib/dhcpsrv/srv_config.cc @@ -26,12 +26,14 @@ namespace dhcp { SrvConfig::SrvConfig() : sequence_(0), cfg_option_def_(new CfgOptionDef()), - cfg_option_(new CfgOption()), cfg_subnets4_(new CfgSubnets4()) { + cfg_option_(new CfgOption()), cfg_subnets4_(new CfgSubnets4()), + cfg_subnets6_(new CfgSubnets6()) { } SrvConfig::SrvConfig(const uint32_t sequence) : sequence_(sequence), cfg_option_def_(new CfgOptionDef()), - cfg_option_(new CfgOption()), cfg_subnets4_(new CfgSubnets4()) { + cfg_option_(new CfgOption()), cfg_subnets4_(new CfgSubnets4()), + cfg_subnets6_(new CfgSubnets6()) { } std::string diff --git a/src/lib/dhcpsrv/srv_config.h b/src/lib/dhcpsrv/srv_config.h index 9370e87a86..c4566ba0d1 100644 --- a/src/lib/dhcpsrv/srv_config.h +++ b/src/lib/dhcpsrv/srv_config.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -201,6 +202,22 @@ public: return (cfg_subnets4_); } + /// @brief Returns pointer to non-const object holding subnets configuration + /// for DHCPv6. + /// + /// @return Pointer to the object holding subnets configuration for DHCPv4. + CfgSubnets6Ptr getCfgSubnets6() { + return (cfg_subnets6_); + } + + /// @brief Returns pointer to const object holding subnets configuration for + /// DHCPv4. + /// + /// @return Pointer to the object holding subnets configuration for DHCPv6. + ConstCfgSubnets6Ptr getCfgSubnets6() const { + return (cfg_subnets6_); + } + //@} /// @brief Copies the currnet configuration to a new configuration. @@ -305,6 +322,9 @@ private: /// @brief Pointer to subnets configuration for IPv4. CfgSubnets4Ptr cfg_subnets4_; + /// @brief Pointer to subnets configuration for IPv4. + CfgSubnets6Ptr cfg_subnets6_; + }; /// @name Pointers to the @c SrvConfig object.