Kea 2.7.5
|
IPv6 reservation for a host. More...
#include <host.h>
Public Types | |
enum | Type { TYPE_NA , TYPE_PD } |
Type of the reservation. More... | |
Public Member Functions | |
IPv6Resrv (const Type &type, const asiolink::IOAddress &prefix, const uint8_t prefix_len=128) | |
Constructor. | |
Option6PDExcludePtr | getPDExclude () const |
Returns the Prefix Exclude option. | |
const asiolink::IOAddress & | getPrefix () const |
Returns prefix for the reservation. | |
uint8_t | getPrefixLen () const |
Returns prefix length. | |
Type | getType () const |
Returns reservation type. | |
bool | operator!= (const IPv6Resrv &other) const |
Inequality operator. | |
bool | operator== (const IPv6Resrv &other) const |
Equality operator. | |
std::string | PDExcludetoText () const |
Returns information about the Prefix Exclude option of the reservation the textual format. | |
void | set (const Type &type, const asiolink::IOAddress &prefix, const uint8_t prefix_len) |
Sets a new prefix and prefix length. | |
void | setPDExclude (const asiolink::IOAddress &excluded_prefix, const uint8_t excluded_prefix_len) |
Sets the Prefix Exclude option. | |
std::string | toText (bool display_pd_exclude_option=true) const |
Returns information about the reservation in the textual format. | |
IPv6 reservation for a host.
This class represents a reservation for a host of a single IPv6 address or prefix (in Host
object).
The class holds the address and prefix length, a value of 128 for the latter implying that the reservation is for a single IPv6 address. For prefix delegations it includes an optional Prefix Exclude option.
isc::dhcp::IPv6Resrv::IPv6Resrv | ( | const Type & | type, |
const asiolink::IOAddress & | prefix, | ||
const uint8_t | prefix_len = 128 ) |
Constructor.
Creates a reservation from the IPv6 address and prefix length value. If the prefix length is not specified, the default value of 128 is used. This value indicates that the reservation is made for an IPv6 address.
type | Reservation type: NA or PD. |
prefix | Address or prefix to be reserved. |
prefix_len | Prefix length. |
isc::BadValue | if prefix is not IPv6 prefix, is a multicast address or the prefix length is greater than 128. |
Definition at line 86 of file host.cc.
References set().
|
inline |
|
inline |
|
inline |
|
inline |
bool isc::dhcp::IPv6Resrv::operator!= | ( | const IPv6Resrv & | other | ) | const |
bool isc::dhcp::IPv6Resrv::operator== | ( | const IPv6Resrv & | other | ) | const |
std::string isc::dhcp::IPv6Resrv::PDExcludetoText | ( | ) | const |
void isc::dhcp::IPv6Resrv::set | ( | const Type & | type, |
const asiolink::IOAddress & | prefix, | ||
const uint8_t | prefix_len ) |
Sets a new prefix and prefix length.
type | Reservation type: NA or PD. |
prefix | New prefix. |
prefix_len | New prefix length. |
isc::BadValue | if prefix is not IPv6 prefix, is a multicast address or the prefix length is greater than 128. |
Definition at line 96 of file host.cc.
References isc_throw, and TYPE_NA.
Referenced by IPv6Resrv().
void isc::dhcp::IPv6Resrv::setPDExclude | ( | const asiolink::IOAddress & | excluded_prefix, |
const uint8_t | excluded_prefix_len ) |
std::string isc::dhcp::IPv6Resrv::toText | ( | bool | display_pd_exclude_option = true | ) | const |