Kea: adaptor_subnet.h Source File

| Kea 3.0.3-git

adaptor_subnet.h
Go to the documentation of this file.
1// Copyright (C) 2018-2024 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
25 class AdaptorSubnet {
26public:
28 virtual ~AdaptorSubnet() = default;
29
35 static bool collectID(isc::data::ConstElementPtr subnet,
36 isc::dhcp::SubnetIDSet& set);
37
43 static void assignID(isc::data::ElementPtr subnet,
44 isc::dhcp::SubnetIDSet& set,
45 isc::dhcp::SubnetID& next);
46
52 static void updateRelay(isc::data::ElementPtr subnet);
53}; // AdaptorSubnet
54
55} // namespace yang
56} // namespace isc
57
58#endif // ISC_ADAPTOR_SUBNET_H
adaptor.h
isc::yang::AdaptorSubnet
JSON adaptor for subnets adding IDs and canonizes relays.
Definition adaptor_subnet.h:25
isc::yang::AdaptorSubnet::assignID
static void assignID(isc::data::ElementPtr subnet, isc::dhcp::SubnetIDSet &set, isc::dhcp::SubnetID &next)
Assign subnet ID.
Definition adaptor_subnet.cc:30
isc::yang::AdaptorSubnet::collectID
static bool collectID(isc::data::ConstElementPtr subnet, isc::dhcp::SubnetIDSet &set)
Collect a subnet ID.
Definition adaptor_subnet.cc:20
isc::yang::AdaptorSubnet::updateRelay
static void updateRelay(isc::data::ElementPtr subnet)
Update relay.
Definition adaptor_subnet.cc:44
isc::yang::AdaptorSubnet::~AdaptorSubnet
virtual ~AdaptorSubnet()=default
Destructor.
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:30
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
isc::dhcp::SubnetIDSet
std::set< dhcp::SubnetID > SubnetIDSet
Ordered list aka set of subnetIDs.
Definition subnet_id.h:43
isc::dhcp::SubnetID
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
isc::yang
Definition adaptor.cc:17
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
subnet_id.h