Kea 2.7.5
addr_utilities.h
Go to the documentation of this file.
1// Copyright (C) 2012-2023 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#include <util/bigints.h>
12
13namespace isc {
14namespace asiolink {
15
19
29IOAddress firstAddrInPrefix(const IOAddress& prefix, uint8_t len);
30
40IOAddress lastAddrInPrefix(const IOAddress& prefix, uint8_t len);
41
45IOAddress getNetmask4(uint8_t len);
46
47
58isc::util::uint128_t addrsInRange(const IOAddress& min, const IOAddress& max);
59
69int prefixLengthFromRange(const IOAddress& min, const IOAddress& max);
70
82isc::util::uint128_t prefixesInRange(const uint8_t pool_len, const uint8_t delegated_len);
83
94IOAddress offsetAddress(const IOAddress& addr, isc::util::uint128_t offset);
95
96} // namespace asiolink
97} // namespace isc
98
99#endif // ADDR_UTILITIES_H
boost::multiprecision::checked_uint128_t uint128_t
Definition bigints.h:21
Defines the logger used by the top-level component of kea-lfc.