Kea 2.7.6
|
Pool allocation state used by the random allocator. More...
#include <random_allocation_state.h>
Public Member Functions | |
PoolRandomAllocationState (const asiolink::IOAddress &first, const asiolink::IOAddress &last) | |
Constructor from an IP address pool. | |
PoolRandomAllocationState (const asiolink::IOAddress &first, const asiolink::IOAddress &last, const uint8_t delegated) | |
Constructor from a delegated prefix pool. | |
IPRangePermutationPtr | getPermutation () const |
Returns a pointer to the permutation of addresses or delegated prefixes. | |
Public Member Functions inherited from isc::dhcp::AllocationState | |
virtual | ~AllocationState ()=default |
Virtual destructor. | |
Static Public Member Functions | |
static PoolRandomAllocationStatePtr | create (const PoolPtr &pool) |
Factory function creating the state instance from pool. | |
Pool allocation state used by the random allocator.
It extends the base class with the mechanism that maintains an address or delegated prefix pool permutation. The permutation serves random, non-repeating leases.
Definition at line 30 of file random_allocation_state.h.
isc::dhcp::PoolRandomAllocationState::PoolRandomAllocationState | ( | const asiolink::IOAddress & | first, |
const asiolink::IOAddress & | last ) |
Constructor from an IP address pool.
first | first address in the pool. |
last | last address in the pool. |
Definition at line 30 of file random_allocation_state.cc.
isc::dhcp::PoolRandomAllocationState::PoolRandomAllocationState | ( | const asiolink::IOAddress & | first, |
const asiolink::IOAddress & | last, | ||
const uint8_t | delegated ) |
Constructor from a delegated prefix pool.
first | first address in the pool. |
last | last prefix in the pool. |
delegated | delegated prefix length. |
Definition at line 34 of file random_allocation_state.cc.
|
static |
Factory function creating the state instance from pool.
pool | instance of the pool for which the allocation state should be instantiated. |
Definition at line 17 of file random_allocation_state.cc.
References isc::dhcp::Lease::TYPE_PD.
Referenced by isc::dhcp::Subnet4::createAllocators(), and isc::dhcp::Subnet6::createAllocators().
|
inline |
Returns a pointer to the permutation of addresses or delegated prefixes.
Definition at line 60 of file random_allocation_state.h.