Kea 2.5.8
adaptor_subnet.h
Go to the documentation of this file.
1// Copyright (C) 2018-2022 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 ISC_ADAPTOR_SUBNET_H
8#define ISC_ADAPTOR_SUBNET_H 1
9
10#include <dhcpsrv/subnet_id.h>
11#include <yang/adaptor.h>
12
13namespace isc {
14namespace yang {
15
27public:
29 virtual ~AdaptorSubnet() = default;
30
36 static bool collectID(isc::data::ConstElementPtr subnet,
38
44 static void assignID(isc::data::ElementPtr subnet,
47
54 static void updateRelay(isc::data::ElementPtr subnet);
55}; // AdaptorSubnet
56
57} // namespace yang
58} // namespace isc
59
60#endif // ISC_ADAPTOR_SUBNET_H
JSON adaptor for subnets adding IDs and canonizes relays.
static void assignID(isc::data::ElementPtr subnet, isc::dhcp::SubnetIDSet &set, isc::dhcp::SubnetID &next)
Assign subnet ID.
static bool collectID(isc::data::ConstElementPtr subnet, isc::dhcp::SubnetIDSet &set)
Collect a subnet ID.
static void updateRelay(isc::data::ElementPtr subnet)
Update relay.
virtual ~AdaptorSubnet()=default
Destructor.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:29
boost::shared_ptr< Element > ElementPtr
Definition: data.h:28
std::set< dhcp::SubnetID > SubnetIDSet
Ordered list aka set of subnetIDs.
Definition: subnet_id.h:43
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition: subnet_id.h:25
Defines the logger used by the top-level component of kea-lfc.