19 : start_(start), end_(end) {
22 isc_throw(BadValue,
"address range boundaries must have the same type: " << start_
32 : start_(prefix), end_(
IOAddress::IPV6_ZERO_ADDRESS()), prefix_length_(length),
33 delegated_length_(delegated) {
35 isc_throw(BadValue,
"IPv6 prefix required for prefix delegation range but "
36 << start_ <<
" was specified");
40 <<
" must not be lower than prefix length " <<
static_cast<int>(length));
44 <<
" and prefix length " <<
static_cast<int>(length)
45 <<
" must not be greater than 128");
52 const uint8_t delegated)
54 delegated_length_(delegated) {
56 isc_throw(BadValue,
"IPv6 prefix required for prefix delegation range but "
57 << start_ <<
":" << end_ <<
" was specified");
65 <<
" does not constitute a valid prefix delegation range");
69 <<
" must not be greater than 128");
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
The IOAddress class represents an IP addresses (version agnostic)
bool isV6() const
Convenience function to check for an IPv6 address.
short getFamily() const
Returns the address family.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
IOAddress lastAddrInPrefix(const IOAddress &prefix, uint8_t len)
returns a last address in a given prefix
int prefixLengthFromRange(const IOAddress &min, const IOAddress &max)
Returns prefix length from the specified range (min - max).
Defines the logger used by the top-level component of kea-lfc.
asiolink::IOAddress start_
IP address denoting the start of the address range.
asiolink::IOAddress end_
IP address denoting the end of the address range.
AddressRange(const asiolink::IOAddress &start, const asiolink::IOAddress &end)
Constructor.
uint8_t prefix_length_
Prefix length.
uint8_t delegated_length_
Delegated prefix length.
PrefixRange(const asiolink::IOAddress &prefix, const uint8_t length, const uint8_t delegated)
Constructor.
asiolink::IOAddress start_
IP address denoting the start of the prefix range.
asiolink::IOAddress end_
IP address denoting the first address within the last prefix in the prefix range.