19 #include <boost/shared_ptr.hpp>
71 virtual std::string
toText()
const;
196 static uint32_t
id = 0;
256 typedef boost::shared_ptr<Pool4>
Pool4Ptr;
315 typedef boost::shared_ptr<Pool6>
Pool6Ptr;
362 uint8_t prefix_len, uint8_t delegated_len = 128);
377 const uint8_t delegated_len,
379 const uint8_t excluded_prefix_len);
413 uint8_t delegated_len = 128);
430 const uint8_t prefix_len,
431 const uint8_t delegated_len,
433 const uint8_t excluded_prefix_len);
448 return (prefix_len_);
456 return (pd_exclude_option_);
467 virtual std::string
toText()
const;
491 const uint8_t prefix_len,
492 const uint8_t delegated_len,
494 const uint8_t excluded_prefix_len);
Pool(Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
protected constructor
boost::shared_ptr< Pool4 > Pool4Ptr
a pointer an IPv4 Pool
bool inRange(const isc::asiolink::IOAddress &addr) const
Checks if a given address is in the range.
const isc::asiolink::IOAddress & getFirstAddress() const
Returns the first address in a pool.
ConstCfgOptionPtr getCfgOption() const
Returns const pointer to the option data configuration for this pool.
bool last_allocated_valid_
Status of last allocated address.
void allowClientClass(const ClientClass &class_name)
Sets the supported class to class class_name.
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
static Pool4Ptr create(const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
Factory function for creating an instance of the Pool4.
Lease::Type getType() const
returns pool type
boost::shared_ptr< Pool6 > Pool6Ptr
a pointer an IPv6 Pool
void setLastAllocated(const isc::asiolink::IOAddress &addr)
sets the last address that was tried from this pool
ClientClasses required_classes_
Required classes.
Base class for user context.
boost::shared_ptr< const CfgOption > ConstCfgOptionPtr
Const pointer.
void requireClientClass(const ClientClass &class_name)
Adds class class_name to classes required to be evaluated.
Defines elements for storing the names of client classes.
CfgOptionPtr cfg_option_
Pointer to the option data configuration for this pool.
uint32_t getId() const
returns Pool-id
boost::shared_ptr< Element > ElementPtr
std::vector< PoolPtr > PoolCollection
a container for either IPv4 or IPv6 Pools
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
virtual data::ElementPtr toElement() const
Unparse a Pool6 object.
Pool6(Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
the constructor for Pool6 "min-max" style definition
const ClientClasses & getRequiredClasses() const
Returns classes which are required to be evaluated.
static Pool6Ptr create(Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
Factory function for creating an instance of the Pool6.
virtual ~Pool()
virtual destructor
Pool information for IPv6 addresses and prefixes.
bool contains(const ClientClass &x) const
returns if class x belongs to the defined classes
uint64_t getCapacity() const
Returns the number of all leases in this pool.
Abstract class for configuration Cfg_* classes.
Lease::Type type_
defines a lease type that will be served from this pool
void resetLastAllocated()
resets the last address to invalid
const isc::asiolink::IOAddress & getLastAddress() const
Returns the last address in a pool.
boost::shared_ptr< const Element > ConstElementPtr
Option6PDExcludePtr getPrefixExcludeOption() const
Returns instance of the pool specific Prefix Exclude option.
ClientClass client_class_
Optional definition of a client class.
virtual std::string toText() const
returns textual representation of the pool
virtual std::string toText() const
returns textual representation of the pool
bool clientSupported(const ClientClasses &client_classes) const
Checks whether this pool supports client that belongs to specified classes.
static uint32_t getNextID()
returns the next unique Pool-ID
isc::asiolink::IOAddress first_
The first address in a pool.
boost::shared_ptr< Option6PDExclude > Option6PDExcludePtr
Pointer to the Option6PDExclude object.
isc::asiolink::IOAddress last_allocated_
Last allocated address See isc::dhcp::Subnet::last_allocated_ia_ Initialized and reset to first...
Defines the logger used by the top-level component of kea-dhcp-ddns.
IPRangePermutationPtr getPermutation() const
Returns pointer to the permutation associated with the pool.
isc::asiolink::IOAddress getLastAllocated() const
returns the last address that was tried from this pool
Pool4(const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
the constructor for Pool4 "min-max" style definition
isc::asiolink::IOAddress last_
The last address in a pool.
Lease::Type getType() const
Returns pool type (v4, v6 non-temporary, v6 temp, v6 prefix)
boost::shared_ptr< IPRangePermutation > IPRangePermutationPtr
Pointer to the IPRangePermutation.
Type
Type of lease or pool.
CfgOptionPtr getCfgOption()
Returns pointer to the option data configuration for this pool.
data::ConstElementPtr user_context_
Pointer to the user context (may be NULL)
virtual data::ElementPtr toElement() const
Unparse a Pool4 object.
base class for Pool4 and Pool6
void insert(const ClientClass &class_name)
Insert an element.
bool isLastAllocatedValid() const
checks if the last address is valid
std::string ClientClass
Defines a single class name.
The IOAddress class represents an IP addresses (version agnostic)
uint8_t getLength() const
returns delegated prefix length
const ClientClass & getClientClass() const
returns the client class
virtual data::ElementPtr toElement() const
Unparse a pool object.
Container for storing client class names.
IPRangePermutationPtr permutation_
Pointer to the permutation object.
uint64_t capacity_
Stores number of possible leases.
Pool information for IPv4 addresses.