diff --git a/src/lib/yang/adaptor_config.cc b/src/lib/yang/adaptor_config.cc index 86e2248b81..a97bf09edb 100644 --- a/src/lib/yang/adaptor_config.cc +++ b/src/lib/yang/adaptor_config.cc @@ -6,6 +6,7 @@ #include +#include #include using namespace std; diff --git a/src/lib/yang/adaptor_config.h b/src/lib/yang/adaptor_config.h index 77ede57640..930e4245df 100644 --- a/src/lib/yang/adaptor_config.h +++ b/src/lib/yang/adaptor_config.h @@ -7,6 +7,7 @@ #ifndef ISC_ADAPTOR_CONFIG_H #define ISC_ADAPTOR_CONFIG_H 1 +#include #include #include #include @@ -60,7 +61,7 @@ protected: /// @param set The reference to the set of assigned IDs. /// @return True if all subnets have an ID, false otherwise. static bool subnetsCollectID(isc::data::ConstElementPtr subnets, - SubnetIDSet& set); + isc::dhcp::SubnetIDSet& set); /// @brief Collects subnet-ids in all subnets in all shared network list. /// @@ -74,7 +75,7 @@ protected: /// @param subsel The subnet list name. /// @return True if all subnets have an ID, false otherwise. static bool sharedNetworksCollectID(isc::data::ConstElementPtr networks, - SubnetIDSet& set, + isc::dhcp::SubnetIDSet& set, const std::string& subsel); /// @brief Assigns subnet-id to every subnet in a subnet list. @@ -86,7 +87,8 @@ protected: /// @param set The reference to the set of assigned IDs. /// @param next The next ID. static void subnetsAssignID(isc::data::ConstElementPtr subnets, - SubnetIDSet& set, isc::dhcp::SubnetID& next); + isc::dhcp::SubnetIDSet& set, + isc::dhcp::SubnetID& next); /// @brief Assigns subnet-id to every subnet in a shared network list. /// @@ -98,7 +100,7 @@ protected: /// @param next The next ID. /// @param subsel The subnet list name. static void sharedNetworksAssignID(isc::data::ConstElementPtr networks, - SubnetIDSet& set, + isc::dhcp::SubnetIDSet& set, isc::dhcp::SubnetID& next, const std::string& subsel); diff --git a/src/lib/yang/adaptor_subnet.cc b/src/lib/yang/adaptor_subnet.cc index c22af2d050..0beba823e3 100644 --- a/src/lib/yang/adaptor_subnet.cc +++ b/src/lib/yang/adaptor_subnet.cc @@ -6,6 +6,7 @@ #include +#include #include using namespace std; diff --git a/src/lib/yang/adaptor_subnet.h b/src/lib/yang/adaptor_subnet.h index 214708e541..f357eb9c70 100644 --- a/src/lib/yang/adaptor_subnet.h +++ b/src/lib/yang/adaptor_subnet.h @@ -10,14 +10,9 @@ #include #include -#include - namespace isc { namespace yang { -/// @brief Set of SubnetIDs. -using SubnetIDSet = std::unordered_set; - /// @brief JSON adaptor for subnets adding IDs and canonizes relays. /// /// Adding IDs is done in two passes walking through subnets. @@ -38,14 +33,16 @@ public: /// @param subnet The subnet. /// @param set The reference to the set of assigned IDs. /// @return True if the subnet has an ID, false otherwise. - static bool collectID(isc::data::ConstElementPtr subnet, SubnetIDSet& set); + static bool collectID(isc::data::ConstElementPtr subnet, + isc::dhcp::SubnetIDSet& set); /// @brief Assign subnet ID. /// /// @param subnet The subnet. /// @param set The reference to the set of assigned IDs. /// @param next The next ID. - static void assignID(isc::data::ElementPtr subnet, SubnetIDSet& set, + static void assignID(isc::data::ElementPtr subnet, + isc::dhcp::SubnetIDSet& set, isc::dhcp::SubnetID& next); /// @brief Update relay. diff --git a/src/lib/yang/tests/adaptor_subnet_unittests.cc b/src/lib/yang/tests/adaptor_subnet_unittests.cc index 85aac8a4a7..4b744b4877 100644 --- a/src/lib/yang/tests/adaptor_subnet_unittests.cc +++ b/src/lib/yang/tests/adaptor_subnet_unittests.cc @@ -8,6 +8,7 @@ #include +#include #include #include