7#ifndef ITERATIVE_ALLOCATION_STATE_H
8#define ITERATIVE_ALLOCATION_STATE_H
14#include <boost/shared_ptr.hpp>
22class SubnetIterativeAllocationState;
48 const uint8_t prefix_length);
103 return (last_allocated_);
110 return last_allocated_valid_;
117 last_allocated_ = address;
118 last_allocated_valid_ =
true;
123 last_allocated_valid_ =
false;
132 bool last_allocated_valid_;
The IOAddress class represents an IP addresses (version agnostic)
Base class for representing allocation state in pools and subnets.
Pool allocation state used by the iterative allocator.
void resetLastAllocated()
Resets the last address to invalid.
void setLastAllocated(const asiolink::IOAddress &address)
Sets the last address that was tried from this pool.
static PoolIterativeAllocationStatePtr create(const PoolPtr &pool)
Factory function creating the state instance from pool.
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.
PoolIterativeAllocationState(const asiolink::IOAddress &first)
Constructor.
Common base class for subnet-specific allocation states.
Subnet allocation state used by the iterative allocator.
asiolink::IOAddress getLastAllocated() const
Returns last allocated address or prefix.
SubnetIterativeAllocationState(const asiolink::IOAddress &prefix, const uint8_t prefix_length)
Constructor.
void setLastAllocated(const asiolink::IOAddress &address)
Sets last allocated address or prefix.
static SubnetIterativeAllocationStatePtr create(const SubnetPtr &subnet)
Factory function creating the state instance from subnet.
boost::shared_ptr< Subnet > SubnetPtr
A generic pointer to either Subnet4 or Subnet6 object.
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
boost::shared_ptr< PoolIterativeAllocationState > PoolIterativeAllocationStatePtr
Type of the pointer to the PoolIterativeAllocationState.
boost::shared_ptr< SubnetIterativeAllocationState > SubnetIterativeAllocationStatePtr
Type of the pointer to the SubnetIterativeAllocationState.
Defines the logger used by the top-level component of kea-lfc.