Kea 2.7.8
isc::dhcp::Pool Class Reference

base class for Pool4 and Pool6 More...

#include <pool.h>

+ Inheritance diagram for isc::dhcp::Pool:

Public Member Functions

virtual ~Pool ()=default
 virtual destructor
 
void addAdditionalClass (const ClientClass &class_name)
 Adds class class_name to the additional classes list.
 
void allowClientClass (const isc::dhcp::ClientClass &class_name)
 Adds class clas_name to the allowed client classes list.
 
bool clientSupported (const ClientClasses &client_classes) const
 Checks whether this pool supports client that belongs to specified classes.
 
const ClientClassesgetAdditionalClasses () const
 Returns the additional classes list.
 
AllocationStatePtr getAllocationState () const
 Returns pool-specific allocation state.
 
isc::util::uint128_t getCapacity () const
 Returns the number of all leases in this pool.
 
CfgOptionPtr getCfgOption ()
 Returns pointer to the option data configuration for this pool.
 
ConstCfgOptionPtr getCfgOption () const
 Returns const pointer to the option data configuration for this pool.
 
const ClientClassesgetClientClasses () const
 Returns the list of allowed client classes.
 
util::Optional< std::string > getDdnsConflictResolutionMode () const
 Returns ddns-conflict-resolution-mode.
 
util::Optional< std::string > getDdnsGeneratedPrefix () const
 Returns ddns-generated-prefix.
 
util::Optional< bool > getDdnsOverrideClientUpdate () const
 Returns ddns-override-client-update.
 
util::Optional< bool > getDdnsOverrideNoUpdate () const
 Returns ddns-override-no-update.
 
util::Optional< std::string > getDdnsQualifyingSuffix () const
 Returns ddns-qualifying-suffix.
 
util::Optional< D2ClientConfig::ReplaceClientNameModegetDdnsReplaceClientNameMode () const
 Returns ddns-replace-client-name-mode.
 
util::Optional< bool > getDdnsSendUpdates () const
 Returns ddns-send-updates.
 
util::Optional< uint32_t > getDdnsTtl () const
 Returns ddns-ttl.
 
util::Optional< uint32_t > getDdnsTtlMax () const
 Returns ddns-ttl-max.
 
util::Optional< uint32_t > getDdnsTtlMin () const
 Returns ddns-ttl-min.
 
util::Optional< double > getDdnsTtlPercent () const
 Returns ddns-ttl-percent.
 
util::Optional< bool > getDdnsUpdateOnRenew () const
 Returns ddns-update-on-renew.
 
const isc::asiolink::IOAddressgetFirstAddress () const
 Returns the first address in a pool.
 
util::Optional< std::string > getHostnameCharReplacement () const
 Return the invalid char replacement used to sanitize client hostnames.
 
util::Optional< std::string > getHostnameCharSet () const
 Return the char set regexp used to sanitize client hostnames.
 
uint64_t getID () const
 Returns Pool-id.
 
const isc::asiolink::IOAddressgetLastAddress () const
 Returns the last address in a pool.
 
ClientClassesgetMutableAdditionalClasses ()
 Returns the mutable additional classes list.
 
ClientClassesgetMutableClientClasses ()
 Returns the mutable list of allowed client classes.
 
Lease::Type getType () const
 Returns pool type (v4, v6 non-temporary, v6 temp, v6 prefix)
 
bool hasDdnsParameters () const
 Checks if any of the DDNS parameters has a value.
 
bool inRange (const isc::asiolink::IOAddress &addr) const
 Checks if a given address is in the range.
 
void setAllocationState (const AllocationStatePtr &allocation_state)
 Sets pool-specific allocation state.
 
void setDdnsConflictResolutionMode (const util::Optional< std::string > &ddns_conflict_resolution_mode)
 Sets new ddns-conflict-resolution-mode.
 
void setDdnsGeneratedPrefix (const util::Optional< std::string > &ddns_generated_prefix)
 Sets new ddns-generated-prefix.
 
void setDdnsOverrideClientUpdate (const util::Optional< bool > &ddns_override_client_update)
 Sets new ddns-override-client-update.
 
void setDdnsOverrideNoUpdate (const util::Optional< bool > &ddns_override_no_update)
 Sets new ddns-override-no-update.
 
void setDdnsQualifyingSuffix (const util::Optional< std::string > &ddns_qualifying_suffix)
 Sets new ddns-qualifying-suffix.
 
void setDdnsReplaceClientNameMode (const util::Optional< D2ClientConfig::ReplaceClientNameMode > &ddns_replace_client_name_mode)
 Sets new ddns-replace-client-name-mode.
 
void setDdnsSendUpdates (const util::Optional< bool > &ddns_send_updates)
 Sets new ddns-send-updates.
 
void setDdnsTtl (const util::Optional< uint32_t > &ddns_ttl)
 Sets new ddns-ttl.
 
void setDdnsTtlMax (const util::Optional< uint32_t > &ddns_ttl_max)
 Sets new ddns-ttl-max.
 
void setDdnsTtlMin (const util::Optional< uint32_t > &ddns_ttl_min)
 Sets new ddns-ttl-min.
 
void setDdnsTtlPercent (const util::Optional< double > &ddns_ttl_percent)
 Sets new ddns-ttl-percent.
 
void setDdnsUpdateOnRenew (const util::Optional< bool > &ddns_update_on_renew)
 Sets new ddns-update-on-renew.
 
void setHostnameCharReplacement (const util::Optional< std::string > &hostname_char_replacement)
 Sets new hostname-char-replacement.
 
void setHostnameCharSet (const util::Optional< std::string > &hostname_char_set)
 Sets new hostname-char-set.
 
void setID (const uint64_t id)
 Sets Pool-id.
 
virtual data::ElementPtr toElement () const
 Unparse a pool object.
 
virtual std::string toText () const
 returns textual representation of the pool
 
- Public Member Functions inherited from isc::data::UserContext
void contextToElement (data::ElementPtr map) const
 Merge unparse a user_context object.
 
data::ConstElementPtr getContext () const
 Returns const pointer to the user context.
 
void setContext (const data::ConstElementPtr &ctx)
 Sets user context.
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor.
 

Protected Member Functions

 Pool (Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
 protected constructor
 

Protected Attributes

ClientClasses additional_classes_
 Additional classes.
 
AllocationStatePtr allocation_state_
 Holds pool-specific allocation state.
 
isc::util::uint128_t capacity_
 Stores number of possible leases.
 
CfgOptionPtr cfg_option_
 Pointer to the option data configuration for this pool.
 
ClientClasses client_classes_
 List of client classes allowed to use this pool.
 
util::Optional< std::string > ddns_conflict_resolution_mode_
 DDNS conflict resolution mode.
 
util::Optional< std::string > ddns_generated_prefix_
 Prefix Kea should use when generating domain-names.
 
util::Optional< bool > ddns_override_client_update_
 Should Kea perform updates, even if client requested delegation.
 
util::Optional< bool > ddns_override_no_update_
 Should Kea perform updates, even if client requested no updates.
 
util::Optional< std::string > ddns_qualifying_suffix_
 Suffix Kea should use when to qualify partial domain-names.
 
util::Optional< D2ClientConfig::ReplaceClientNameModeddns_replace_client_name_mode_
 How Kea should handle the domain-name supplied by the client.
 
util::Optional< bool > ddns_send_updates_
 Should Kea perform DNS updates.
 
util::Optional< uint32_t > ddns_ttl_
 Explicit value to use for DNS TTL.
 
util::Optional< uint32_t > ddns_ttl_max_
 Maximum value to use for DNS TTL.
 
util::Optional< uint32_t > ddns_ttl_min_
 Minimum value to use for DNS TTL.
 
util::Optional< double > ddns_ttl_percent_
 Percentage of the lease lifetime to use for DNS TTL.
 
util::Optional< bool > ddns_update_on_renew_
 Should Kea perform updates when leases are extended.
 
isc::asiolink::IOAddress first_
 The first address in a pool.
 
util::Optional< std::string > hostname_char_replacement_
 A string to replace invalid characters when scrubbing hostnames.
 
util::Optional< std::string > hostname_char_set_
 Regular expression describing invalid characters for client hostnames.
 
uint64_t id_
 pool-id
 
isc::asiolink::IOAddress last_
 The last address in a pool.
 
Lease::Type type_
 defines a lease type that will be served from this pool
 
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL)
 
- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL)
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map.
 

Detailed Description

base class for Pool4 and Pool6

Stores information about pool of IPv4 or IPv6 addresses. That is a basic component of a configuration.

Definition at line 34 of file pool.h.

Constructor & Destructor Documentation

◆ ~Pool()

virtual isc::dhcp::Pool::~Pool ( )
virtualdefault

virtual destructor

We need Pool to be a polymorphic class, so we could dynamic cast from PoolPtr to Pool6Ptr if we need to. A class becomes polymorphic, when there is at least one virtual method.

◆ Pool()

isc::dhcp::Pool::Pool ( Lease::Type type,
const isc::asiolink::IOAddress & first,
const isc::asiolink::IOAddress & last )
protected

protected constructor

This constructor is protected to prevent anyone from instantiating Pool class directly. Instances of Pool4 and Pool6 should be created instead.

Parameters
typetype of lease that will be served from this pool
firstfirst address of a range
lastlast address of a range

Definition at line 21 of file pool.cc.

Member Function Documentation

◆ addAdditionalClass()

void isc::dhcp::Pool::addAdditionalClass ( const ClientClass & class_name)

Adds class class_name to the additional classes list.

Parameters
class_nameclient class to add

Definition at line 45 of file pool.cc.

References additional_classes_, isc::dhcp::ClientClasses::contains(), and isc::dhcp::ClientClasses::insert().

Referenced by isc::dhcp::PdPoolParser::parse(), and isc::dhcp::PoolParser::parse().

+ Here is the call graph for this function:

◆ allowClientClass()

void isc::dhcp::Pool::allowClientClass ( const isc::dhcp::ClientClass & class_name)

Adds class clas_name to the allowed client classes list.

Parameters
class_nameclient class to be supported by this network

Definition at line 38 of file pool.cc.

References client_classes_, isc::dhcp::ClientClasses::contains(), and isc::dhcp::ClientClasses::insert().

Referenced by isc::dhcp::PdPoolParser::parse(), and isc::dhcp::PoolParser::parse().

+ Here is the call graph for this function:

◆ clientSupported()

bool isc::dhcp::Pool::clientSupported ( const ClientClasses & client_classes) const

Checks whether this pool supports client that belongs to specified classes.

Parameters
client_classeslist of all classes the client belongs to
Returns
true if client can be supported, false otherwise

Definition at line 33 of file pool.cc.

References client_classes_, isc::dhcp::ClientClasses::empty(), and isc::dhcp::ClientClasses::intersects().

+ Here is the call graph for this function:

◆ getAdditionalClasses()

const ClientClasses & isc::dhcp::Pool::getAdditionalClasses ( ) const
inline

Returns the additional classes list.

Definition at line 144 of file pool.h.

References additional_classes_.

◆ getAllocationState()

AllocationStatePtr isc::dhcp::Pool::getAllocationState ( ) const
inline

Returns pool-specific allocation state.

The actual type of the state depends on the allocator type.

Returns
allocation state.

Definition at line 158 of file pool.h.

References allocation_state_.

◆ getCapacity()

isc::util::uint128_t isc::dhcp::Pool::getCapacity ( ) const
inline

Returns the number of all leases in this pool.

Note that this is the upper bound, assuming that no leases are used and there are no host reservations. This is just a theoretical calculation.

Returns
number of possible leases in this pool

Definition at line 101 of file pool.h.

References capacity_.

◆ getCfgOption() [1/2]

CfgOptionPtr isc::dhcp::Pool::getCfgOption ( )
inline

Returns pointer to the option data configuration for this pool.

Definition at line 106 of file pool.h.

References cfg_option_.

Referenced by toElement().

◆ getCfgOption() [2/2]

ConstCfgOptionPtr isc::dhcp::Pool::getCfgOption ( ) const
inline

Returns const pointer to the option data configuration for this pool.

Definition at line 112 of file pool.h.

References cfg_option_.

◆ getClientClasses()

const ClientClasses & isc::dhcp::Pool::getClientClasses ( ) const
inline

Returns the list of allowed client classes.

Definition at line 129 of file pool.h.

References client_classes_.

◆ getDdnsConflictResolutionMode()

util::Optional< std::string > isc::dhcp::Pool::getDdnsConflictResolutionMode ( ) const
inline

Returns ddns-conflict-resolution-mode.

Definition at line 271 of file pool.h.

References ddns_conflict_resolution_mode_.

◆ getDdnsGeneratedPrefix()

util::Optional< std::string > isc::dhcp::Pool::getDdnsGeneratedPrefix ( ) const
inline

Returns ddns-generated-prefix.

Definition at line 232 of file pool.h.

References ddns_generated_prefix_.

◆ getDdnsOverrideClientUpdate()

util::Optional< bool > isc::dhcp::Pool::getDdnsOverrideClientUpdate ( ) const
inline

Returns ddns-override-client-update.

Definition at line 203 of file pool.h.

References ddns_override_client_update_.

◆ getDdnsOverrideNoUpdate()

util::Optional< bool > isc::dhcp::Pool::getDdnsOverrideNoUpdate ( ) const
inline

Returns ddns-override-no-update.

Definition at line 190 of file pool.h.

References ddns_override_no_update_.

◆ getDdnsQualifyingSuffix()

util::Optional< std::string > isc::dhcp::Pool::getDdnsQualifyingSuffix ( ) const
inline

Returns ddns-qualifying-suffix.

Definition at line 245 of file pool.h.

References ddns_qualifying_suffix_.

◆ getDdnsReplaceClientNameMode()

util::Optional< D2ClientConfig::ReplaceClientNameMode > isc::dhcp::Pool::getDdnsReplaceClientNameMode ( ) const
inline

Returns ddns-replace-client-name-mode.

Definition at line 217 of file pool.h.

References ddns_replace_client_name_mode_.

◆ getDdnsSendUpdates()

util::Optional< bool > isc::dhcp::Pool::getDdnsSendUpdates ( ) const
inline

Returns ddns-send-updates.

Definition at line 177 of file pool.h.

References ddns_send_updates_.

◆ getDdnsTtl()

util::Optional< uint32_t > isc::dhcp::Pool::getDdnsTtl ( ) const
inline

Returns ddns-ttl.

Definition at line 298 of file pool.h.

References ddns_ttl_.

◆ getDdnsTtlMax()

util::Optional< uint32_t > isc::dhcp::Pool::getDdnsTtlMax ( ) const
inline

Returns ddns-ttl-max.

Definition at line 324 of file pool.h.

References ddns_ttl_max_.

◆ getDdnsTtlMin()

util::Optional< uint32_t > isc::dhcp::Pool::getDdnsTtlMin ( ) const
inline

Returns ddns-ttl-min.

Definition at line 311 of file pool.h.

References ddns_ttl_min_.

◆ getDdnsTtlPercent()

util::Optional< double > isc::dhcp::Pool::getDdnsTtlPercent ( ) const
inline

Returns ddns-ttl-percent.

Definition at line 285 of file pool.h.

References ddns_ttl_percent_.

◆ getDdnsUpdateOnRenew()

util::Optional< bool > isc::dhcp::Pool::getDdnsUpdateOnRenew ( ) const
inline

Returns ddns-update-on-renew.

Definition at line 258 of file pool.h.

References ddns_update_on_renew_.

◆ getFirstAddress()

const isc::asiolink::IOAddress & isc::dhcp::Pool::getFirstAddress ( ) const
inline

Returns the first address in a pool.

Returns
first address in a pool

Definition at line 63 of file pool.h.

References first_.

Referenced by isc::dhcp::Pool4::toElement(), and isc::dhcp::Pool6::toElement().

◆ getHostnameCharReplacement()

util::Optional< std::string > isc::dhcp::Pool::getHostnameCharReplacement ( ) const
inline

Return the invalid char replacement used to sanitize client hostnames.

Definition at line 350 of file pool.h.

References hostname_char_replacement_.

◆ getHostnameCharSet()

util::Optional< std::string > isc::dhcp::Pool::getHostnameCharSet ( ) const
inline

Return the char set regexp used to sanitize client hostnames.

Definition at line 337 of file pool.h.

References hostname_char_set_.

◆ getID()

uint64_t isc::dhcp::Pool::getID ( ) const
inline

Returns Pool-id.

Note
: PoolType enum was removed. Please use Lease::Type instead

Pool-id is an unique value that can be used to identify a pool within a subnet or shared network.

Returns
pool-id value

Definition at line 46 of file pool.h.

References id_.

◆ getLastAddress()

const isc::asiolink::IOAddress & isc::dhcp::Pool::getLastAddress ( ) const
inline

Returns the last address in a pool.

Returns
last address in a pool

Definition at line 69 of file pool.h.

References last_.

Referenced by isc::dhcp::Pool4::toElement(), and isc::dhcp::Pool6::toElement().

◆ getMutableAdditionalClasses()

ClientClasses & isc::dhcp::Pool::getMutableAdditionalClasses ( )
inline

Returns the mutable additional classes list.

Definition at line 149 of file pool.h.

References additional_classes_.

◆ getMutableClientClasses()

ClientClasses & isc::dhcp::Pool::getMutableClientClasses ( )
inline

Returns the mutable list of allowed client classes.

Definition at line 134 of file pool.h.

References client_classes_.

◆ getType()

Lease::Type isc::dhcp::Pool::getType ( ) const
inline

Returns pool type (v4, v6 non-temporary, v6 temp, v6 prefix)

Returns
returns pool type

Definition at line 80 of file pool.h.

References type_.

◆ hasDdnsParameters()

bool isc::dhcp::Pool::hasDdnsParameters ( ) const

Checks if any of the DDNS parameters has a value.

Returns
True if any of the DDNS parameters are specified.

Definition at line 60 of file pool.cc.

References ddns_conflict_resolution_mode_, ddns_generated_prefix_, ddns_override_client_update_, ddns_override_no_update_, ddns_qualifying_suffix_, ddns_replace_client_name_mode_, ddns_send_updates_, ddns_ttl_, ddns_ttl_max_, ddns_ttl_min_, ddns_ttl_percent_, ddns_update_on_renew_, hostname_char_replacement_, hostname_char_set_, and isc::util::Optional< T >::unspecified().

+ Here is the call graph for this function:

◆ inRange()

bool isc::dhcp::Pool::inRange ( const isc::asiolink::IOAddress & addr) const

Checks if a given address is in the range.

Returns
true, if the address is in pool

Definition at line 28 of file pool.cc.

References first_, and last_.

◆ setAllocationState()

void isc::dhcp::Pool::setAllocationState ( const AllocationStatePtr & allocation_state)
inline

Sets pool-specific allocation state.

Parameters
allocation_stateallocation state instance.

Definition at line 165 of file pool.h.

References allocation_state_.

◆ setDdnsConflictResolutionMode()

void isc::dhcp::Pool::setDdnsConflictResolutionMode ( const util::Optional< std::string > & ddns_conflict_resolution_mode)
inline

Sets new ddns-conflict-resolution-mode.

Parameters
ddns_conflict_resolution_modeNew value to use.

Definition at line 278 of file pool.h.

References ddns_conflict_resolution_mode_.

◆ setDdnsGeneratedPrefix()

void isc::dhcp::Pool::setDdnsGeneratedPrefix ( const util::Optional< std::string > & ddns_generated_prefix)
inline

Sets new ddns-generated-prefix.

Parameters
ddns_generated_prefixNew value to use.

Definition at line 239 of file pool.h.

References ddns_generated_prefix_.

◆ setDdnsOverrideClientUpdate()

void isc::dhcp::Pool::setDdnsOverrideClientUpdate ( const util::Optional< bool > & ddns_override_client_update)
inline

Sets new ddns-override-client-update.

Parameters
ddns_override_client_updateNew value to use.

Definition at line 210 of file pool.h.

References ddns_override_client_update_.

◆ setDdnsOverrideNoUpdate()

void isc::dhcp::Pool::setDdnsOverrideNoUpdate ( const util::Optional< bool > & ddns_override_no_update)
inline

Sets new ddns-override-no-update.

Parameters
ddns_override_no_updateNew value to use.

Definition at line 197 of file pool.h.

References ddns_override_no_update_.

◆ setDdnsQualifyingSuffix()

void isc::dhcp::Pool::setDdnsQualifyingSuffix ( const util::Optional< std::string > & ddns_qualifying_suffix)
inline

Sets new ddns-qualifying-suffix.

Parameters
ddns_qualifying_suffixNew value to use.

Definition at line 252 of file pool.h.

References ddns_qualifying_suffix_.

◆ setDdnsReplaceClientNameMode()

void isc::dhcp::Pool::setDdnsReplaceClientNameMode ( const util::Optional< D2ClientConfig::ReplaceClientNameMode > & ddns_replace_client_name_mode)
inline

Sets new ddns-replace-client-name-mode.

Parameters
ddns_replace_client_name_modeNew value to use.

Definition at line 225 of file pool.h.

References ddns_replace_client_name_mode_.

◆ setDdnsSendUpdates()

void isc::dhcp::Pool::setDdnsSendUpdates ( const util::Optional< bool > & ddns_send_updates)
inline

Sets new ddns-send-updates.

Parameters
ddns_send_updatesNew value to use.

Definition at line 184 of file pool.h.

References ddns_send_updates_.

◆ setDdnsTtl()

void isc::dhcp::Pool::setDdnsTtl ( const util::Optional< uint32_t > & ddns_ttl)
inline

Sets new ddns-ttl.

Parameters
ddns_ttlNew value to use.

Definition at line 305 of file pool.h.

References ddns_ttl_.

◆ setDdnsTtlMax()

void isc::dhcp::Pool::setDdnsTtlMax ( const util::Optional< uint32_t > & ddns_ttl_max)
inline

Sets new ddns-ttl-max.

Parameters
ddns_ttl_maxNew value to use.

Definition at line 331 of file pool.h.

References ddns_ttl_max_.

◆ setDdnsTtlMin()

void isc::dhcp::Pool::setDdnsTtlMin ( const util::Optional< uint32_t > & ddns_ttl_min)
inline

Sets new ddns-ttl-min.

Parameters
ddns_ttl_minNew value to use.

Definition at line 318 of file pool.h.

References ddns_ttl_min_.

◆ setDdnsTtlPercent()

void isc::dhcp::Pool::setDdnsTtlPercent ( const util::Optional< double > & ddns_ttl_percent)
inline

Sets new ddns-ttl-percent.

Parameters
ddns_ttl_percentNew value to use.

Definition at line 292 of file pool.h.

References ddns_ttl_percent_.

◆ setDdnsUpdateOnRenew()

void isc::dhcp::Pool::setDdnsUpdateOnRenew ( const util::Optional< bool > & ddns_update_on_renew)
inline

Sets new ddns-update-on-renew.

Parameters
ddns_update_on_renewNew value to use.

Definition at line 265 of file pool.h.

References ddns_update_on_renew_.

◆ setHostnameCharReplacement()

void isc::dhcp::Pool::setHostnameCharReplacement ( const util::Optional< std::string > & hostname_char_replacement)
inline

Sets new hostname-char-replacement.

Parameters
hostname_char_replacementNew value to use.

Definition at line 357 of file pool.h.

References hostname_char_replacement_.

◆ setHostnameCharSet()

void isc::dhcp::Pool::setHostnameCharSet ( const util::Optional< std::string > & hostname_char_set)
inline

Sets new hostname-char-set.

Parameters
hostname_char_setNew value to use.

Definition at line 344 of file pool.h.

References hostname_char_set_.

◆ setID()

void isc::dhcp::Pool::setID ( const uint64_t id)
inline

Sets Pool-id.

Pool-id is an unique value that can be used to identify a pool within a subnet or shared network.

Parameters
idvalue to be set

Definition at line 56 of file pool.h.

References id_.

◆ toElement()

◆ toText()

std::string isc::dhcp::Pool::toText ( ) const
virtual

returns textual representation of the pool

Returns
textual representation

Reimplemented in isc::dhcp::Pool6.

Definition at line 52 of file pool.cc.

References first_, last_, type_, and isc::dhcp::Lease::typeToText().

+ Here is the call graph for this function:

Member Data Documentation

◆ additional_classes_

ClientClasses isc::dhcp::Pool::additional_classes_
protected

◆ allocation_state_

AllocationStatePtr isc::dhcp::Pool::allocation_state_
protected

Holds pool-specific allocation state.

Definition at line 425 of file pool.h.

Referenced by getAllocationState(), and setAllocationState().

◆ capacity_

isc::util::uint128_t isc::dhcp::Pool::capacity_
protected

Stores number of possible leases.

This could be calculated on the fly, but the calculations are somewhat involved, so it is more efficient to calculate it once and just store the result. Note that for very large pools, the number is capped at max value of uint64_t.

Definition at line 403 of file pool.h.

Referenced by isc::dhcp::Pool4::Pool4(), isc::dhcp::Pool4::Pool4(), isc::dhcp::Pool6::Pool6(), and getCapacity().

◆ cfg_option_

CfgOptionPtr isc::dhcp::Pool::cfg_option_
protected

Pointer to the option data configuration for this pool.

Definition at line 406 of file pool.h.

Referenced by getCfgOption(), and getCfgOption().

◆ client_classes_

ClientClasses isc::dhcp::Pool::client_classes_
protected

List of client classes allowed to use this pool.

If not empty, only clients belonging to at least one of the classes in this list will be allowed to use this particular pool. By default the list is empty which means that any client is allowed, regardless of its class membership.

Definition at line 414 of file pool.h.

Referenced by allowClientClass(), clientSupported(), getClientClasses(), getMutableClientClasses(), and toElement().

◆ ddns_conflict_resolution_mode_

util::Optional<std::string> isc::dhcp::Pool::ddns_conflict_resolution_mode_
protected

DDNS conflict resolution mode.

Definition at line 451 of file pool.h.

Referenced by getDdnsConflictResolutionMode(), hasDdnsParameters(), setDdnsConflictResolutionMode(), and toElement().

◆ ddns_generated_prefix_

util::Optional<std::string> isc::dhcp::Pool::ddns_generated_prefix_
protected

Prefix Kea should use when generating domain-names.

Definition at line 442 of file pool.h.

Referenced by getDdnsGeneratedPrefix(), hasDdnsParameters(), setDdnsGeneratedPrefix(), and toElement().

◆ ddns_override_client_update_

util::Optional<bool> isc::dhcp::Pool::ddns_override_client_update_
protected

Should Kea perform updates, even if client requested delegation.

Definition at line 436 of file pool.h.

Referenced by getDdnsOverrideClientUpdate(), hasDdnsParameters(), setDdnsOverrideClientUpdate(), and toElement().

◆ ddns_override_no_update_

util::Optional<bool> isc::dhcp::Pool::ddns_override_no_update_
protected

Should Kea perform updates, even if client requested no updates.

Overrides the client request for no updates via the N flag.

Definition at line 433 of file pool.h.

Referenced by getDdnsOverrideNoUpdate(), hasDdnsParameters(), setDdnsOverrideNoUpdate(), and toElement().

◆ ddns_qualifying_suffix_

util::Optional<std::string> isc::dhcp::Pool::ddns_qualifying_suffix_
protected

Suffix Kea should use when to qualify partial domain-names.

Definition at line 445 of file pool.h.

Referenced by getDdnsQualifyingSuffix(), hasDdnsParameters(), setDdnsQualifyingSuffix(), and toElement().

◆ ddns_replace_client_name_mode_

util::Optional<D2ClientConfig::ReplaceClientNameMode> isc::dhcp::Pool::ddns_replace_client_name_mode_
protected

How Kea should handle the domain-name supplied by the client.

Definition at line 439 of file pool.h.

Referenced by getDdnsReplaceClientNameMode(), hasDdnsParameters(), setDdnsReplaceClientNameMode(), and toElement().

◆ ddns_send_updates_

util::Optional<bool> isc::dhcp::Pool::ddns_send_updates_
protected

Should Kea perform DNS updates.

Used to provide scoped enabling and disabling of updates.

Definition at line 429 of file pool.h.

Referenced by getDdnsSendUpdates(), hasDdnsParameters(), setDdnsSendUpdates(), and toElement().

◆ ddns_ttl_

util::Optional<uint32_t> isc::dhcp::Pool::ddns_ttl_
protected

Explicit value to use for DNS TTL.

Definition at line 457 of file pool.h.

Referenced by getDdnsTtl(), hasDdnsParameters(), setDdnsTtl(), and toElement().

◆ ddns_ttl_max_

util::Optional<uint32_t> isc::dhcp::Pool::ddns_ttl_max_
protected

Maximum value to use for DNS TTL.

Definition at line 463 of file pool.h.

Referenced by getDdnsTtlMax(), hasDdnsParameters(), setDdnsTtlMax(), and toElement().

◆ ddns_ttl_min_

util::Optional<uint32_t> isc::dhcp::Pool::ddns_ttl_min_
protected

Minimum value to use for DNS TTL.

Definition at line 460 of file pool.h.

Referenced by getDdnsTtlMin(), hasDdnsParameters(), setDdnsTtlMin(), and toElement().

◆ ddns_ttl_percent_

util::Optional<double> isc::dhcp::Pool::ddns_ttl_percent_
protected

Percentage of the lease lifetime to use for DNS TTL.

Definition at line 454 of file pool.h.

Referenced by getDdnsTtlPercent(), hasDdnsParameters(), setDdnsTtlPercent(), and toElement().

◆ ddns_update_on_renew_

util::Optional<bool> isc::dhcp::Pool::ddns_update_on_renew_
protected

Should Kea perform updates when leases are extended.

Definition at line 448 of file pool.h.

Referenced by getDdnsUpdateOnRenew(), hasDdnsParameters(), setDdnsUpdateOnRenew(), and toElement().

◆ first_

isc::asiolink::IOAddress isc::dhcp::Pool::first_
protected

The first address in a pool.

Definition at line 389 of file pool.h.

Referenced by getFirstAddress(), inRange(), isc::dhcp::Pool6::toText(), and toText().

◆ hostname_char_replacement_

util::Optional<std::string> isc::dhcp::Pool::hostname_char_replacement_
protected

A string to replace invalid characters when scrubbing hostnames.

Meaningful only if hostname_char_set_ is not empty.

Definition at line 471 of file pool.h.

Referenced by getHostnameCharReplacement(), hasDdnsParameters(), setHostnameCharReplacement(), and toElement().

◆ hostname_char_set_

util::Optional<std::string> isc::dhcp::Pool::hostname_char_set_
protected

Regular expression describing invalid characters for client hostnames.

Definition at line 467 of file pool.h.

Referenced by getHostnameCharSet(), hasDdnsParameters(), setHostnameCharSet(), and toElement().

◆ id_

uint64_t isc::dhcp::Pool::id_
protected

pool-id

This id is an unique value that can be used to identify a pool within a subnet or shared network.

Definition at line 386 of file pool.h.

Referenced by getID(), setID(), and toElement().

◆ last_

isc::asiolink::IOAddress isc::dhcp::Pool::last_
protected

The last address in a pool.

Definition at line 392 of file pool.h.

Referenced by isc::dhcp::Pool4::Pool4(), getLastAddress(), inRange(), isc::dhcp::Pool6::toText(), and toText().

◆ type_

Lease::Type isc::dhcp::Pool::type_
protected

defines a lease type that will be served from this pool

Definition at line 395 of file pool.h.

Referenced by isc::dhcp::Pool6::getType(), getType(), toElement(), isc::dhcp::Pool6::toText(), and toText().

◆ user_context_

data::ConstElementPtr isc::dhcp::Pool::user_context_
protected

Pointer to the user context (may be NULL)

Definition at line 422 of file pool.h.


The documentation for this class was generated from the following files: