Kea 1.5.0
addr_utilities.h
Go to the documentation of this file.
1// Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef ADDR_UTILITIES_H
8#define ADDR_UTILITIES_H
9
10#include <asiolink/io_address.h>
11
12namespace isc {
13namespace dhcp {
14
18
29 uint8_t len);
30
41 uint8_t len);
42
47
48
59uint64_t addrsInRange(const isc::asiolink::IOAddress& min,
60 const isc::asiolink::IOAddress& max);
61
72 const isc::asiolink::IOAddress& max);
73
85uint64_t prefixesInRange(const uint8_t pool_len, const uint8_t delegated_len);
86};
87};
88
89#endif // ADDR_UTILITIES_H
uint64_t addrsInRange(const isc::asiolink::IOAddress &min, const isc::asiolink::IOAddress &max)
Returns number of available addresses in the specified range (min - max).
uint64_t prefixesInRange(const uint8_t pool_len, const uint8_t delegated_len)
Returns number of available IPv6 prefixes in the specified prefix.
isc::asiolink::IOAddress firstAddrInPrefix(const isc::asiolink::IOAddress &prefix, uint8_t len)
This code is based on similar code from the Dibbler project.
isc::asiolink::IOAddress getNetmask4(uint8_t len)
Generates an IPv4 netmask of specified length.
int prefixLengthFromRange(const isc::asiolink::IOAddress &min, const isc::asiolink::IOAddress &max)
Returns prefix length from the specified range (min - max).
isc::asiolink::IOAddress lastAddrInPrefix(const isc::asiolink::IOAddress &prefix, uint8_t len)
returns a last address in a given prefix
Defines the logger used by the top-level component of kea-dhcp-ddns.