#include <dhcpsrv/host.h>
#include <dhcpsrv/host_container.h>
#include <dhcpsrv/subnet_id.h>
+#include <boost/shared_ptr.hpp>
#include <vector>
namespace isc {
};
+/// @name Pointers to the @c CfgHosts objects.
+//@{
+/// @brief Non-const pointer.
+typedef boost::shared_ptr<CfgHosts> CfgHostsPtr;
+
+/// @brief Const pointer.
+typedef boost::shared_ptr<const CfgHosts> ConstCfgHostsPtr;
+
+//@}
+
}
}
SrvConfig::SrvConfig()
: sequence_(0), cfg_option_def_(new CfgOptionDef()),
- cfg_option_(new CfgOption()) {
+ cfg_option_(new CfgOption()), cfg_hosts_(new CfgHosts()) {
}
SrvConfig::SrvConfig(const uint32_t sequence)
: sequence_(sequence), cfg_option_def_(new CfgOptionDef()),
- cfg_option_(new CfgOption()) {
+ cfg_option_(new CfgOption()), cfg_hosts_(new CfgHosts()) {
}
std::string
#ifndef DHCPSRV_CONFIG_H
#define DHCPSRV_CONFIG_H
+#include <dhcpsrv/cfg_hosts.h>
#include <dhcpsrv/cfg_iface.h>
#include <dhcpsrv/cfg_option.h>
#include <dhcpsrv/cfg_option_def.h>
return (cfg_option_);
}
+ /// @brief Returns pointer to the non-const objects representing host
+ /// reservations for different IPv4 and IPv6 subnets.
+ ///
+ /// @return Pointer to the non-const object holding host reservations.
+ CfgHostsPtr getCfgHosts() {
+ return (cfg_hosts_);
+ }
+
+ /// @brief Returns pointer to the const objects representing host
+ /// reservations for different IPv4 and IPv6 subnets.
+ ///
+ /// @return Pointer to the const object holding host reservations.
+ ConstCfgHostsPtr getCfgHosts() const {
+ return (cfg_hosts_);
+ }
+
//@}
/// @brief Copies the currnet configuration to a new configuration.
/// connected to any subnet.
CfgOptionPtr cfg_option_;
+ /// @brief Pointer to the configuration for hosts reservation.
+ ///
+ /// This object holds a list of @c Host objects representing host
+ /// reservations for different IPv4 and IPv6 subnets.
+ CfgHostsPtr cfg_hosts_;
+
};
/// @name Pointers to the @c SrvConfig object.