|
@@ -13,7 +13,6 @@
|
|
|
#include <dhcp/classify.h>
|
|
|
#include <dhcpsrv/d2_client_mgr.h>
|
|
|
#include <dhcpsrv/pool.h>
|
|
|
-#include <dhcpsrv/subnet.h>
|
|
|
#include <dhcpsrv/srv_config.h>
|
|
|
#include <util/buffer.h>
|
|
|
|
|
@@ -41,12 +40,9 @@ public:
|
|
|
/// @brief Configuration Manager
|
|
|
///
|
|
|
/// This singleton class holds the whole configuration for DHCPv4 and DHCPv6
|
|
|
-/// servers. It currently holds information about zero or more subnets6.
|
|
|
-/// Each subnet may contain zero or more pools. Pool4 and Pool6 is the most
|
|
|
-/// basic "chunk" of configuration. It contains a range of assignable
|
|
|
-/// addresses.
|
|
|
+/// servers.
|
|
|
///
|
|
|
-/// Below is a sketch of configuration inheritance (not implemented yet).
|
|
|
+/// Below is a sketch of configuration inheritance.
|
|
|
/// Let's investigate the following configuration:
|
|
|
///
|
|
|
/// @code
|
|
@@ -71,9 +67,6 @@ public:
|
|
|
/// routines, so there is no storage capability in a global scope for
|
|
|
/// subnet-specific parameters.
|
|
|
///
|
|
|
-/// @todo: Implement Subnet4 support (ticket #2237)
|
|
|
-/// @todo: Implement option definition support
|
|
|
-/// @todo: Implement parameter inheritance
|
|
|
class CfgMgr : public boost::noncopyable {
|
|
|
public:
|
|
|
|
|
@@ -130,22 +123,6 @@ public:
|
|
|
/// @param datadir New data directory.
|
|
|
void setDataDir(const std::string& datadir);
|
|
|
|
|
|
- /// @brief 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.
|
|
|
- ///
|
|
|
- /// @param echo should the client-id be sent or not
|
|
|
- void echoClientId(const bool echo) {
|
|
|
- echo_v4_client_id_ = echo;
|
|
|
- }
|
|
|
-
|
|
|
- /// @brief Returns whether server should send back client-id in DHCPv4.
|
|
|
- /// @return true if client-id should be returned, false otherwise.
|
|
|
- bool echoClientId() const {
|
|
|
- return (echo_v4_client_id_);
|
|
|
- }
|
|
|
-
|
|
|
/// @brief Updates the DHCP-DDNS client configuration to the given value.
|
|
|
///
|
|
|
/// Passes the new configuration to the D2ClientMgr instance,
|
|
@@ -317,14 +294,6 @@ protected:
|
|
|
/// @brief virtual destructor
|
|
|
virtual ~CfgMgr();
|
|
|
|
|
|
- /// @brief a container for IPv6 subnets.
|
|
|
- ///
|
|
|
- /// That is a simple vector of pointers. It does not make much sense to
|
|
|
- /// optimize access time (e.g. using a map), because typical search
|
|
|
- /// pattern will use calling inRange() method on each subnet until
|
|
|
- /// a match is found.
|
|
|
- Subnet6Collection subnets6_;
|
|
|
-
|
|
|
private:
|
|
|
|
|
|
/// @brief Checks if current configuration is created and creates it if needed.
|
|
@@ -334,13 +303,6 @@ private:
|
|
|
/// default current configuration.
|
|
|
void ensureCurrentAllocated();
|
|
|
|
|
|
- /// @brief Checks that the IPv6 subnet with the given id already exists.
|
|
|
- ///
|
|
|
- /// @param subnet Subnet for which this function will check if the other
|
|
|
- /// subnet with equal id already exists.
|
|
|
- /// @return true if the duplicate subnet exists.
|
|
|
- bool isDuplicate(const Subnet6& subnet) const;
|
|
|
-
|
|
|
/// @brief Container for defined DHCPv6 option spaces.
|
|
|
OptionSpaceCollection spaces6_;
|
|
|
|
|
@@ -350,9 +312,6 @@ private:
|
|
|
/// @brief directory where data files (e.g. server-id) are stored
|
|
|
std::string datadir_;
|
|
|
|
|
|
- /// Indicates whether v4 server should send back client-id
|
|
|
- bool echo_v4_client_id_;
|
|
|
-
|
|
|
/// @brief Manages the DHCP-DDNS client and its configuration.
|
|
|
D2ClientMgr d2_client_mgr_;
|
|
|
|