![]() |
Kea
1.5.0
|
base class for Pool4 and Pool6 More...
#include <pool.h>
Inheritance diagram for isc::dhcp::Pool:Public Member Functions | |
| virtual | ~Pool () |
| virtual destructor More... | |
| void | allowClientClass (const ClientClass &class_name) |
| Sets the supported class to class class_name. More... | |
| bool | clientSupported (const ClientClasses &client_classes) const |
| Checks whether this pool supports client that belongs to specified classes. More... | |
| uint64_t | getCapacity () const |
| Returns the number of all leases in this pool. More... | |
| CfgOptionPtr | getCfgOption () |
| Returns pointer to the option data configuration for this pool. More... | |
| ConstCfgOptionPtr | getCfgOption () const |
| Returns const pointer to the option data configuration for this pool. More... | |
| const ClientClass & | getClientClass () const |
| returns the client class More... | |
| const isc::asiolink::IOAddress & | getFirstAddress () const |
| Returns the first address in a pool. More... | |
| uint32_t | getId () const |
| returns Pool-id More... | |
| const isc::asiolink::IOAddress & | getLastAddress () const |
| Returns the last address in a pool. More... | |
| isc::asiolink::IOAddress | getLastAllocated () const |
| returns the last address that was tried from this pool More... | |
| const ClientClasses & | getRequiredClasses () const |
| Returns classes which are required to be evaluated. More... | |
| Lease::Type | getType () const |
| Returns pool type (v4, v6 non-temporary, v6 temp, v6 prefix) More... | |
| bool | inRange (const isc::asiolink::IOAddress &addr) const |
| Checks if a given address is in the range. More... | |
| bool | isLastAllocatedValid () const |
| checks if the last address is valid More... | |
| void | requireClientClass (const ClientClass &class_name) |
| Adds class class_name to classes required to be evaluated. More... | |
| void | resetLastAllocated () |
| resets the last address to invalid More... | |
| void | setLastAllocated (const isc::asiolink::IOAddress &addr) |
| sets the last address that was tried from this pool More... | |
| virtual data::ElementPtr | toElement () const |
| Unparse a pool object. More... | |
| virtual std::string | toText () const |
| returns textual representation of the pool More... | |
Public Member Functions inherited from isc::data::UserContext | |
| void | contextToElement (data::ElementPtr map) const |
| Merge unparse a user_context object. More... | |
| data::ConstElementPtr | getContext () const |
| Returns const pointer to the user context. More... | |
| void | setContext (const data::ConstElementPtr &ctx) |
| Sets user context. More... | |
Protected Member Functions | |
| Pool (Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last) | |
| protected constructor More... | |
Static Protected Member Functions | |
| static uint32_t | getNextID () |
| returns the next unique Pool-ID More... | |
Protected Attributes | |
| uint64_t | capacity_ |
| Stores number of possible leases. More... | |
| CfgOptionPtr | cfg_option_ |
| Pointer to the option data configuration for this pool. More... | |
| ClientClass | client_class_ |
| Optional definition of a client class. More... | |
| isc::asiolink::IOAddress | first_ |
| The first address in a pool. More... | |
| uint32_t | id_ |
| pool-id More... | |
| isc::asiolink::IOAddress | last_ |
| The last address in a pool. More... | |
| isc::asiolink::IOAddress | last_allocated_ |
| Last allocated address See isc::dhcp::Subnet::last_allocated_ia_ Initialized and reset to first. More... | |
| bool | last_allocated_valid_ |
| Status of last allocated address. More... | |
| ClientClasses | required_classes_ |
| Required classes. More... | |
| Lease::Type | type_ |
| defines a lease type that will be served from this pool More... | |
| data::ConstElementPtr | user_context_ |
| Pointer to the user context (may be NULL) More... | |
Protected Attributes inherited from isc::data::UserContext | |
| data::ConstElementPtr | user_context_ |
| Pointer to the user context (may be NULL) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::data::UserContext | |
| static data::ElementPtr | toElement (data::ConstElementPtr map) |
| Copy extracting comments an Element map. More... | |
base class for Pool4 and Pool6
Stores information about pool of IPv4 or IPv6 addresses. That is a basic component of a configuration.
|
inlinevirtual |
|
protected |
| void isc::dhcp::Pool::allowClientClass | ( | const ClientClass & | class_name | ) |
Sets the supported class to class class_name.
| class_name | client class to be supported by this pool |
Definition at line 35 of file pool.cc.
References client_class_.
| bool isc::dhcp::Pool::clientSupported | ( | const ClientClasses & | client_classes | ) | const |
Checks whether this pool supports client that belongs to specified classes.
| client_classes | list of all classes the client belongs to |
Definition at line 31 of file pool.cc.
References client_class_, and isc::dhcp::ClientClasses::contains().
Here is the call graph for this function:
|
inline |
|
inline |
Returns pointer to the option data configuration for this pool.
Definition at line 90 of file pool.h.
References cfg_option_.
Referenced by toElement().
|
inline |
Returns const pointer to the option data configuration for this pool.
Definition at line 96 of file pool.h.
References cfg_option_.
|
inline |
returns the client class
Definition at line 120 of file pool.h.
References client_class_.
Referenced by toElement().
|
inline |
Returns the first address in a pool.
Definition at line 46 of file pool.h.
References first_.
Referenced by isc::dhcp::Pool4::toElement(), and isc::dhcp::Pool6::toElement().
|
inline |
returns Pool-id
Definition at line 39 of file pool.h.
References id_.
|
inline |
Returns the last address in a pool.
Definition at line 52 of file pool.h.
References last_.
Referenced by isc::dhcp::Pool4::toElement(), and isc::dhcp::Pool6::toElement().
|
inline |
returns the last address that was tried from this pool
Definition at line 141 of file pool.h.
References last_allocated_.
|
inlinestaticprotected |
|
inline |
Returns classes which are required to be evaluated.
Definition at line 134 of file pool.h.
References required_classes_.
Referenced by toElement().
|
inline |
| bool isc::dhcp::Pool::inRange | ( | const isc::asiolink::IOAddress & | addr | ) | const |
Checks if a given address is in the range.
Definition at line 27 of file pool.cc.
References first_, last_, and isc::asiolink::IOAddress::smallerEqual().
Here is the call graph for this function:
|
inline |
checks if the last address is valid
Definition at line 147 of file pool.h.
References last_allocated_valid_.
|
inline |
Adds class class_name to classes required to be evaluated.
| class_name | client class required to be evaluated |
Definition at line 127 of file pool.h.
References isc::dhcp::ClientClasses::contains(), isc::dhcp::ClientClasses::insert(), and required_classes_.
Here is the call graph for this function:
|
inline |
resets the last address to invalid
Definition at line 160 of file pool.h.
References last_allocated_valid_.
|
inline |
sets the last address that was tried from this pool
| addr | address/prefix to that was tried last |
Definition at line 154 of file pool.h.
References last_allocated_, and last_allocated_valid_.
|
virtual |
Unparse a pool object.
Reimplemented in isc::dhcp::Pool6, and isc::dhcp::Pool4.
Definition at line 90 of file pool.cc.
References isc::dhcp::ClientClasses::cbegin(), isc::dhcp::ClientClasses::cend(), isc::data::UserContext::contextToElement(), isc::dhcp::ClientClasses::empty(), getCfgOption(), getClientClass(), and getRequiredClasses().
Referenced by isc::dhcp::Pool4::toElement(), and isc::dhcp::Pool6::toElement().
Here is the call graph for this function:
|
virtual |
returns textual representation of the pool
Reimplemented in isc::dhcp::Pool6.
Definition at line 40 of file pool.cc.
References first_, last_, type_, and isc::dhcp::Lease::typeToText().
Here is the call graph for this function:
|
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 212 of file pool.h.
Referenced by getCapacity(), isc::dhcp::Pool4::Pool4(), and isc::dhcp::Pool6::Pool6().
|
protected |
Pointer to the option data configuration for this pool.
Definition at line 215 of file pool.h.
Referenced by getCfgOption().
|
protected |
Optional definition of a client class.
Definition at line 220 of file pool.h.
Referenced by allowClientClass(), clientSupported(), and getClientClass().
|
protected |
The first address in a pool.
Definition at line 198 of file pool.h.
Referenced by getFirstAddress(), inRange(), toText(), and isc::dhcp::Pool6::toText().
|
protected |
|
protected |
The last address in a pool.
Definition at line 201 of file pool.h.
Referenced by getLastAddress(), inRange(), isc::dhcp::Pool4::Pool4(), toText(), and isc::dhcp::Pool6::toText().
|
protected |
Last allocated address See isc::dhcp::Subnet::last_allocated_ia_ Initialized and reset to first.
Definition at line 233 of file pool.h.
Referenced by getLastAllocated(), and setLastAllocated().
|
protected |
Status of last allocated address.
Definition at line 236 of file pool.h.
Referenced by isLastAllocatedValid(), resetLastAllocated(), and setLastAllocated().
|
protected |
Required classes.
isc::dhcp::Network::required_classes_
Definition at line 225 of file pool.h.
Referenced by getRequiredClasses(), and requireClientClass().
|
protected |
defines a lease type that will be served from this pool
Definition at line 204 of file pool.h.
Referenced by getType(), isc::dhcp::Pool6::getType(), toText(), and isc::dhcp::Pool6::toText().
|
protected |