drawback is that with almost depleted pools it is increasingly difficult to
"guess" an address that is free. This allocator is currently not implemented.
-@subsection allocEnginePD Prefix Delegation support in AllocEngine
+@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.
+
+@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"
}
}
-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);
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
/// @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
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