18#include <boost/shared_ptr.hpp>
19#include <boost/weak_ptr.hpp>
106 return (pickAddressInternal(client_classes, duid, hint));
136 uint8_t hint_prefix_length) {
138 return (pickPrefixInternal(client_classes, pool, duid,
139 prefix_length_match, hint,
140 hint_prefix_length));
154 PoolPtr pool, uint8_t hint_prefix_length);
215 uint8_t hint_prefix_length) = 0;
Defines elements for storing the names of client classes.
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
The IOAddress class represents an IP addresses (version agnostic)
An exception that is thrown when allocation module fails (e.g.
AllocFailed(const char *file, size_t line, const char *what)
Constructor.
Base class for all address/prefix allocation algorithms.
void initAfterConfigure()
Performs allocator initialization after server's reconfiguration.
virtual isc::asiolink::IOAddress pickAddress(const ClientClasses &client_classes, const IdentifierBaseTypePtr &duid, const asiolink::IOAddress &hint)
Picks an address.
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.
std::mutex mutex_
The mutex to protect the allocated lease.
bool inited_
Indicates if the allocator has been initialized.
virtual isc::asiolink::IOAddress pickPrefix(const ClientClasses &client_classes, Pool6Ptr &pool, const IdentifierBaseTypePtr &duid, PrefixLenMatchType prefix_length_match, const asiolink::IOAddress &hint, uint8_t hint_prefix_length)
Picks a delegated prefix.
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.
Container for storing client class names.
boost::weak_ptr< Subnet > WeakSubnetPtr
Weak pointer to the Subnet.
boost::shared_ptr< IdentifierBaseType > IdentifierBaseTypePtr
Shared pointer to a IdentifierType.
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
boost::shared_ptr< Allocator > AllocatorPtr
Defines a pointer to an allocator.
boost::shared_ptr< Pool6 > Pool6Ptr
a pointer an IPv6 Pool
Defines the logger used by the top-level component of kea-lfc.
Type
Type of lease or pool.
RAII lock object to protect the code in the same scope with a mutex.