Kea 2.7.5
|
Pool allocation state used by the iterative allocator. More...
#include <iterative_allocation_state.h>
Public Member Functions | |
PoolIterativeAllocationState (const asiolink::IOAddress &first) | |
Constructor. | |
isc::asiolink::IOAddress | getLastAllocated () const |
Returns the last address that was tried from this pool. | |
bool | isLastAllocatedValid () const |
Checks if the last address is valid. | |
void | resetLastAllocated () |
Resets the last address to invalid. | |
void | setLastAllocated (const asiolink::IOAddress &address) |
Sets the last address that was tried from this pool. | |
Public Member Functions inherited from isc::dhcp::AllocationState | |
virtual | ~AllocationState ()=default |
Virtual destructor. | |
Static Public Member Functions | |
static PoolIterativeAllocationStatePtr | create (const PoolPtr &pool) |
Factory function creating the state instance from pool. | |
Pool allocation state used by the iterative allocator.
It extends the base class with the information about the last allocated address in the pool.
Definition at line 84 of file iterative_allocation_state.h.
isc::dhcp::PoolIterativeAllocationState::PoolIterativeAllocationState | ( | const asiolink::IOAddress & | first | ) |
Constructor.
first | first address in the pool. |
Definition at line 51 of file iterative_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 47 of file iterative_allocation_state.cc.
Referenced by isc::dhcp::Subnet4::createAllocators(), and isc::dhcp::Subnet6::createAllocators().
|
inline |
Returns the last address that was tried from this pool.
Definition at line 102 of file iterative_allocation_state.h.
|
inline |
Checks if the last address is valid.
Definition at line 109 of file iterative_allocation_state.h.
|
inline |
Resets the last address to invalid.
Definition at line 122 of file iterative_allocation_state.h.
|
inline |
Sets the last address that was tried from this pool.
address | address or prefix to that was tried last. |
Definition at line 116 of file iterative_allocation_state.h.