Kea  1.9.9-git
adaptor_subnet.h
Go to the documentation of this file.
1 // Copyright (C) 2018 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 <yang/adaptor.h>
11 #include <dhcpsrv/subnet_id.h>
12 #include <set>
13 
14 namespace isc {
15 namespace yang {
16 
18 typedef std::set<isc::dhcp::SubnetID> SubnetIDSet;
19 
31 public:
32 
34  AdaptorSubnet();
35 
37  virtual ~AdaptorSubnet();
38 
44  static bool collectID(isc::data::ConstElementPtr subnet, SubnetIDSet& set);
45 
51  static void assignID(isc::data::ElementPtr subnet, SubnetIDSet& set,
52  isc::dhcp::SubnetID& next);
53 
60  static void updateRelay(isc::data::ElementPtr subnet);
61 };
62 
63 }; // end of namespace isc::yang
64 }; // end of namespace isc
65 
66 #endif // ISC_ADAPTOR_SUBNET_H
static void updateRelay(isc::data::ElementPtr subnet)
Update relay.
JSON adaptor for subnets adding IDs and canonizes relays.
AdaptorSubnet()
Constructor.
virtual ~AdaptorSubnet()
Destructor.
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
static bool collectID(isc::data::ConstElementPtr subnet, SubnetIDSet &set)
Collect a subnet ID.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::set< isc::dhcp::SubnetID > SubnetIDSet
Set of SubnetIDs.
static void assignID(isc::data::ElementPtr subnet, SubnetIDSet &set, isc::dhcp::SubnetID &next)
Assign subnet ID.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24