BIND 10 trac3171, updated. 15c8b6ac63fd8f81b085fec8a0fd6d22085ea898 [3171] Changes after review:

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 3 14:14:46 UTC 2013


The branch, trac3171 has been updated
       via  15c8b6ac63fd8f81b085fec8a0fd6d22085ea898 (commit)
      from  7ae935a62c0f2fb0638cfee0d53c6b1fd63dfceb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 15c8b6ac63fd8f81b085fec8a0fd6d22085ea898
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Thu Oct 3 16:14:36 2013 +0200

    [3171] Changes after review:
    
     - non-const getPools() renamed to getPoolsWritable()
     - docs update

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcpsrv/libdhcpsrv.dox |    6 ++++--
 src/lib/dhcpsrv/subnet.cc      |    6 +++---
 src/lib/dhcpsrv/subnet.h       |   16 ++++++++--------
 3 files changed, 15 insertions(+), 13 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcpsrv/libdhcpsrv.dox b/src/lib/dhcpsrv/libdhcpsrv.dox
index a5d29fc..d56029a 100644
--- a/src/lib/dhcpsrv/libdhcpsrv.dox
+++ b/src/lib/dhcpsrv/libdhcpsrv.dox
@@ -99,14 +99,16 @@ returning clients are almost guaranteed to get a different address. Another
 drawback is that with almost depleted pools it is increasingly difficult to
 "guess" an address that is free. This allocator is currently not implemented.
 
- at subsection allocEnginePD Prefix Delegation support in AllocEngine
+ at subsection allocEngineTypes Different lease types support
 
 Allocation Engine has been extended to support different types of leases. Four
 types are supported: TYPE_V4 (IPv4 addresses), TYPE_NA (normal IPv6 addresses),
 TYPE_TA (temporary IPv6 addresses) and TYPE_PD (delegated prefixes). Support for
 TYPE_TA is partial. Some routines are able to handle it, while other are
 not. The major missing piece is the RandomAllocator, so there is no way to randomly
-generate an address. This defeats the purpose of using temporary addresses.
+generate an address. This defeats the purpose of using temporary addresses for now.
+
+ at subsection allocEnginePD Prefix Delegation support in AllocEngine
 
 The Allocation Engine supports allocation of the IPv6 addresses and prefixes.
 For a prefix pool, the iterative allocator "walks over"
diff --git a/src/lib/dhcpsrv/subnet.cc b/src/lib/dhcpsrv/subnet.cc
index 8e51906..4320733 100644
--- a/src/lib/dhcpsrv/subnet.cc
+++ b/src/lib/dhcpsrv/subnet.cc
@@ -169,7 +169,7 @@ const PoolCollection& Subnet::getPools(Lease::Type type) const {
     }
 }
 
-PoolCollection& Subnet::getPools(Lease::Type type) {
+PoolCollection& Subnet::getPoolsWritable(Lease::Type type) {
     // check if the type is valid (and throw if it isn't)
     checkType(type);
 
@@ -230,12 +230,12 @@ Subnet::addPool(const PoolPtr& pool) {
     checkType(pool->getType());
 
     // Add the pool to the appropriate pools collection
-    getPools(pool->getType()).push_back(pool);
+    getPoolsWritable(pool->getType()).push_back(pool);
 }
 
 void
 Subnet::delPools(Lease::Type type) {
-    getPools(type).clear();
+    getPoolsWritable(type).clear();
 }
 
 void
diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h
index 2354834..ac6de03 100644
--- a/src/lib/dhcpsrv/subnet.h
+++ b/src/lib/dhcpsrv/subnet.h
@@ -319,14 +319,6 @@ public:
     /// @return a collection of all pools
     const PoolCollection& getPools(Lease::Type type) const;
 
-    /// @brief Returns all pools (variable variant)
-    ///
-    /// The reference is only valid as long as the object that returned it.
-    ///
-    /// @param type lease type to be set
-    /// @return a collection of all pools
-    PoolCollection& getPools(Lease::Type type);
-
     /// @brief Sets name of the network interface for directly attached networks
     ///
     /// @param iface_name name of the interface
@@ -344,6 +336,14 @@ public:
     virtual std::string toText() const;
 
 protected:
+    /// @brief Returns all pools (non-const variant)
+    ///
+    /// The reference is only valid as long as the object that returned it.
+    ///
+    /// @param type lease type to be set
+    /// @return a collection of all pools
+    PoolCollection& getPoolsWritable(Lease::Type type);
+
     /// @brief Protected constructor
     //
     /// By making the constructor protected, we make sure that noone will



More information about the bind10-changes mailing list