![]() |
Kea 3.1.5
|
Manages a unique set of Pools of a given protocol family. More...
#include <lease_query_impl.h>
Public Member Functions | |
| PoolSet (uint16_t family) | |
| Constructor. | |
| bool | contains (const isc::asiolink::IOAddress &address) const |
| Checks if an address is present in the set. | |
| uint16_t | getFamily () const |
| Returns the protocol family of the address set. | |
| void | insert (const isc::asiolink::IOAddress &prefix, uint8_t prefix_len) |
| Inserts an pool into the set. | |
| size_t | size () const |
| Returns the number of pools in the set. | |
Manages a unique set of Pools of a given protocol family.
The pools are hashed by their address range.
Definition at line 112 of file lease_query_impl.h.
|
inline |
Constructor.
| family | protocol family of the set (AF_INET or AF_INET6) |
Definition at line 117 of file lease_query_impl.h.
| bool PoolSet::contains | ( | const isc::asiolink::IOAddress & | address | ) | const |
Checks if an address is present in the set.
| address | address to look for. |
| BadValue | if the address's family does not match the set's family. |
Definition at line 57 of file lease_query_impl.cc.
References isc::asiolink::IOAddress::getFamily(), and isc_throw.
Here is the call graph for this function:
|
inline |
Returns the protocol family of the address set.
Definition at line 146 of file lease_query_impl.h.
Referenced by insert().
| void PoolSet::insert | ( | const isc::asiolink::IOAddress & | prefix, |
| uint8_t | prefix_len ) |
Inserts an pool into the set.
Creates a pool and adds it to the set, assuming it is not already in the set.
| prefix | prefix of the pool |
| prefix_len | length of the pool prefix |
| BadValue | if the prefix family does not match the set's family, prefix length is invalid, or the pool is already in the set. |
Definition at line 41 of file lease_query_impl.cc.
References isc::dhcp::Pool4::create(), isc::dhcp::Pool6::create(), getFamily(), isc_throw, and isc::dhcp::Lease::TYPE_NA.
Here is the call graph for this function:
|
inline |
Returns the number of pools in the set.
Definition at line 141 of file lease_query_impl.h.