Kea 2.2.0
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
12namespace isc {
13namespace asiolink {
14
18
28IOAddress firstAddrInPrefix(const IOAddress& prefix, uint8_t len);
29
39IOAddress lastAddrInPrefix(const IOAddress& prefix, uint8_t len);
40
44IOAddress getNetmask4(uint8_t len);
45
46
57uint64_t addrsInRange(const IOAddress& min, const IOAddress& max);
58
68int prefixLengthFromRange(const IOAddress& min, const IOAddress& max);
69
81uint64_t prefixesInRange(const uint8_t pool_len, const uint8_t delegated_len);
82
93IOAddress 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-lfc.