Kea 2.7.5
|
Defines a single hint. More...
#include <alloc_engine.h>
Public Member Functions | |
Resource (const isc::asiolink::IOAddress &address, const uint8_t prefix_len=128, const uint32_t preferred=0, const uint32_t valid=0) | |
Default constructor. | |
bool | equals (const Resource &other) const |
Compares two AllocEngine::Resource objects for equality. | |
isc::asiolink::IOAddress | getAddress () const |
Returns the address. | |
uint32_t | getPreferred () const |
Returns the optional preferred lifetime. | |
uint8_t | getPrefixLength () const |
Returns the prefix length. | |
uint32_t | getValid () const |
Returns the optional valid lifetime. | |
bool | operator== (const Resource &other) const |
Equality operator. | |
Protected Attributes | |
isc::asiolink::IOAddress | address_ |
The address or prefix. | |
uint32_t | preferred_ |
The preferred lifetime (0 when not set). | |
uint8_t | prefix_len_ |
The prefix length (128 for an address). | |
uint32_t | valid_ |
The valid lifetime (0 when not set). | |
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 83 of file alloc_engine.h.
|
inline |
Default constructor.
address | the address or prefix |
prefix_len | the prefix length (defaults to 128) |
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 94 of file alloc_engine.h.
|
inline |
Compares two AllocEngine::Resource
objects for equality.
other | object to be compared with this object |
Definition at line 135 of file alloc_engine.h.
References address_, and prefix_len_.
Referenced by operator==().
|
inline |
Returns the address.
Definition at line 105 of file alloc_engine.h.
References address_.
|
inline |
Returns the optional preferred lifetime.
Definition at line 119 of file alloc_engine.h.
References preferred_.
|
inline |
Returns the prefix length.
Definition at line 112 of file alloc_engine.h.
References prefix_len_.
|
inline |
Returns the optional valid lifetime.
Definition at line 126 of file alloc_engine.h.
References valid_.
|
inline |
Equality operator.
other | object to be compared with this object |
Definition at line 145 of file alloc_engine.h.
References equals().
|
protected |
The address or prefix.
Definition at line 152 of file alloc_engine.h.
Referenced by equals(), and getAddress().
|
protected |
The preferred lifetime (0 when not set).
Definition at line 158 of file alloc_engine.h.
Referenced by getPreferred().
|
protected |
The prefix length (128 for an address).
Definition at line 155 of file alloc_engine.h.
Referenced by equals(), and getPrefixLength().
|
protected |
The valid lifetime (0 when not set).
Definition at line 161 of file alloc_engine.h.
Referenced by getValid().