39 PoolPtr pool, uint8_t hint_prefix_length) {
40 auto pool6 = boost::dynamic_pointer_cast<Pool6>(pool);
45 if (!hint_prefix_length) {
50 pool6->getLength() != hint_prefix_length) {
55 pool6->getLength() >= hint_prefix_length) {
60 pool6->getLength() <= hint_prefix_length) {
76 .arg(subnet->toText());
void initAfterConfigure()
Performs allocator initialization after server's reconfiguration.
SubnetID subnet_id_
ID of a subnet to which the allocator belongs.
virtual void initAfterConfigureInternal()
Allocator-specific initialization function.
Lease::Type pool_type_
Defines pool type allocation.
PrefixLenMatchType
Type of preferred PD-pool prefix length selection criteria.
bool inited_
Indicates if the allocator has been initialized.
Allocator(Lease::Type type, const WeakSubnetPtr &subnet)
Constructor.
virtual ~Allocator()
Virtual destructor.
WeakSubnetPtr subnet_
Weak pointer to the subnet owning the allocator.
virtual std::string getType() const =0
Returns allocator type string.
static bool isValidPrefixPool(Allocator::PrefixLenMatchType prefix_length_match, PoolPtr pool, uint8_t hint_prefix_length)
Check if the pool matches the selection criteria relative to the provided hint prefix length.
static TrackingLeaseMgr & instance()
Return current lease manager.
static bool haveInstance()
Indicates if the lease manager has been instantiated.
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
isc::log::Logger dhcpsrv_logger("dhcpsrv")
DHCP server library Logger.
boost::weak_ptr< Subnet > WeakSubnetPtr
Weak pointer to the Subnet.
const isc::log::MessageID DHCPSRV_CFGMGR_USE_ALLOCATOR
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
Defines the logger used by the top-level component of kea-lfc.
Type
Type of lease or pool.
static std::string typeToText(Type type)
returns text representation of a lease type