Kea
1.9.9-git
|
Defines a single hint. More...
#include <alloc_engine.h>
Public Member Functions | |
Resource (const isc::asiolink::IOAddress &address, const uint8_t prefix_len, const uint32_t preferred=0, const uint32_t valid=0) | |
Default constructor. More... | |
bool | equals (const Resource &other) const |
Compares two AllocEngine::Resource objects for equality. More... | |
isc::asiolink::IOAddress | getAddress () const |
Returns the address. More... | |
uint32_t | getPreferred () const |
Returns the optional preferred lifetime. More... | |
uint8_t | getPrefixLength () const |
Returns the prefix length. More... | |
uint32_t | getValid () const |
Returns the optional valid lifetime. More... | |
bool | operator== (const Resource &other) const |
Equality operator. More... | |
Protected Attributes | |
isc::asiolink::IOAddress | address_ |
The address or prefix. More... | |
uint32_t | preferred_ |
The preferred lifetime (0 when not set). More... | |
uint8_t | prefix_len_ |
The prefix length (128 for an address). More... | |
uint32_t | valid_ |
The valid lifetime (0 when not set). More... | |
Defines a single hint.
This is an entry that represents what the client had requested, either an address or a prefix. Prefix length is 128 for regular addresses. Optionally it provides wanted preferred and valid lifetimes.
Definition at line 324 of file alloc_engine.h.
|
inline |
Default constructor.
address | the address or prefix |
prefix_len | the prefix length (128 for addresses) |
preferred | the optional preferred lifetime, defaults to 0, meaning not specified |
valid | the optional valid lifetime, defaults to 0, meaning not specified |
Definition at line 335 of file alloc_engine.h.
|
inline |
Compares two AllocEngine::Resource
objects for equality.
other | object to be compared with this object |
Definition at line 376 of file alloc_engine.h.
References address_, and prefix_len_.
Referenced by operator==().
|
inline |
Returns the address.
Definition at line 346 of file alloc_engine.h.
References address_.
Referenced by isc::dhcp::AllocEngine::ResourceCompare::operator()().
|
inline |
Returns the optional preferred lifetime.
Definition at line 360 of file alloc_engine.h.
References preferred_.
|
inline |
Returns the prefix length.
Definition at line 353 of file alloc_engine.h.
References prefix_len_.
Referenced by isc::dhcp::AllocEngine::ResourceCompare::operator()().
|
inline |
Returns the optional valid lifetime.
Definition at line 367 of file alloc_engine.h.
References valid_.
|
inline |
Equality operator.
other | object to be compared with this object |
Definition at line 386 of file alloc_engine.h.
References equals().
|
protected |
The address or prefix.
Definition at line 393 of file alloc_engine.h.
Referenced by equals(), and getAddress().
|
protected |
The preferred lifetime (0 when not set).
Definition at line 399 of file alloc_engine.h.
Referenced by getPreferred().
|
protected |
The prefix length (128 for an address).
Definition at line 396 of file alloc_engine.h.
Referenced by equals(), and getPrefixLength().
|
protected |
The valid lifetime (0 when not set).
Definition at line 402 of file alloc_engine.h.
Referenced by getValid().