Kea  1.9.9-git
addr_utilities.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2020 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 
12 namespace isc {
13 namespace asiolink {
14 
18 
28 IOAddress firstAddrInPrefix(const IOAddress& prefix, uint8_t len);
29 
39 IOAddress lastAddrInPrefix(const IOAddress& prefix, uint8_t len);
40 
44 IOAddress getNetmask4(uint8_t len);
45 
46 
57 uint64_t addrsInRange(const IOAddress& min, const IOAddress& max);
58 
68 int prefixLengthFromRange(const IOAddress& min, const IOAddress& max);
69 
81 uint64_t prefixesInRange(const uint8_t pool_len, const uint8_t delegated_len);
82 
93 IOAddress offsetAddress(const IOAddress& addr, uint64_t offset);
94 
95 };
96 };
97 
98 #endif // ADDR_UTILITIES_H
Defines the logger used by the top-level component of kea-dhcp-ddns.