28#include <boost/noncopyable.hpp>
29#include <boost/shared_ptr.hpp>
32#include <sys/socket.h>
149 template<
typename ParserType,
typename... ParserArgs,
typename ElementType>
152 const std::string& list_name,
153 ParserArgs... parser_args,
154 ElementType& parsed_element,
180 " and must be a list");
184 }
else if (element_list->size() != 1) {
185 isc_throw(
BadValue,
"'" << list_name <<
"' list must include exactly one element");
193 if (element->getType() != sub_type) {
199 ParserType parser(parser_args...);
200 parsed_element = parser.parse(element);
231 template<
typename ParserType,
typename... ParserArgs,
typename ElementType>
234 const std::string& list_name,
235 ParserArgs... parser_args,
236 ElementType& parsed_element,
253 " and must be a list");
257 }
else if (element_list->size() != 1) {
258 isc_throw(
BadValue,
"'" << list_name <<
"' list must include exactly one element");
266 if (element->getType() != sub_type) {
272 ParserType parser(parser_args...);
273 parsed_element = parser.parse(element);
329 template<
typename ParserType,
typename... ParserArgs,
typename ElementType>
331 const std::string& map_name,
332 ParserArgs... parser_args,
333 ElementType& parsed_element,
357 " and must be a map");
361 if (element_map->size() == 0) {
366 ParserType parser(parser_args...);
367 parsed_element = parser.parse(element_map);
425 template<
typename SubnetPtrType,
typename KeyType>
427 const SubnetPtrType& subnet,
428 const uint16_t address_family,
429 const KeyType& key) {
431 std::ostringstream msg;
432 msg << (address_family == AF_INET ?
"IPv4" :
"IPv6")
433 <<
" subnet " << key <<
" ";
436 info->set(
"subnets", info_list);
442 std::string sn_name = subnet->getSharedNetworkName();
443 if (!sn_name.empty()) {
444 subnet_element->set(
"shared-network-name",
449 subnet_element->set(
"shared-network-name",
454 subnet_element->set(
"metadata", subnet->getMetadata());
456 info_list->add(subnet_element);
501 template <
typename FunType>
505 const uint16_t address_family,
506 FunType create_update_fun) {
514 (callout_handle,
"parameters", keywords, list_keywords,
515 stamped_values, backend_selector, server_selector,
519 if (server_selector.
getTags().size() != 1) {
521 "'server-tags' list must contain exactly one"
522 " server tag for the 'remote-global-parameter"
523 << (address_family == AF_INET ?
"4" :
"6") <<
"-set'"
528 for (
auto const& stamped_value : stamped_values) {
530 create_update_fun(backend_selector, server_selector, stamped_value);
536 for (
auto const& stamped_value : stamped_values) {
537 std::string param_name;
538 std::string sub_param_name;
540 param_name, sub_param_name)) {
541 data::ElementPtr sub_param = boost::const_pointer_cast<data::Element>(parameters->get(param_name));
544 parameters->set(param_name, sub_param);
546 sub_param->set(sub_param_name, stamped_value->getElementValue());
549 parameters->set(param_name, stamped_value->getElementValue());
553 response_arguments->set(
"parameters", parameters);
554 response_arguments->set(
"count",
558 std::ostringstream msg;
559 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
560 <<
" global parameter(s) successfully set.";
563 msg.str(), response_arguments);
564 callout_handle.setArgument(
"response", response);
566 }
catch (
const std::exception& ex) {
582 template <
typename FunType>
585 const uint16_t address_family,
586 FunType delete_fun) {
593 (callout_handle,
"parameters", keywords, name,
594 backend_selector, server_selector,
599 if (server_selector.
getTags().size() != 1) {
601 "'server-tags' list must contain exactly one"
602 " server tag for the 'remote-global-parameter"
603 << (address_family == AF_INET ?
"4" :
"6") <<
"-del'"
608 uint64_t count = delete_fun(backend_selector, server_selector, name);
611 response_arguments->set(
"count",
615 std::ostringstream msg;
616 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
617 <<
" global parameter(s) deleted.";
622 callout_handle.setArgument(
"response", response);
624 }
catch (
const std::exception& ex) {
640 template <
typename FunType>
643 const uint16_t address_family,
651 (callout_handle,
"parameters", keywords, name,
652 backend_selector, server_selector,
657 if (server_selector.
getTags().size() != 1) {
659 "'server-tags' list must contain exactly one"
660 " server tag for the 'remote-global-parameter"
661 << (address_family == AF_INET ?
"4" :
"6") <<
"-get'"
667 get_fun(backend_selector, server_selector, name);
670 std::ostringstream msg;
672 if (address_family == AF_INET) {
677 msg <<
" global parameter ";
680 info->set(
"parameters", info_map);
686 "StampedValue: attempt to get null value of the '"
687 << value->getName() <<
"' parameter");
689 auto const it = keywords.find(value->getName());
690 if (it == keywords.end()) {
696 std::string param_name;
697 std::string sub_param_name;
699 param_name, sub_param_name)) {
701 sub_param->set(sub_param_name, info_value);
702 info_map->set(param_name, sub_param);
704 info_map->set(param_name, info_value);
706 info_map->set(
"metadata", value->getMetadata());
718 callout_handle.setArgument(
"response", response);
720 }
catch (
const std::exception& ex) {
736 template <
typename FunType>
739 const uint16_t address_family,
740 FunType get_all_fun) {
754 backend_selector =
parser_->getBackendSelector(args);
758 server_selector =
parser_->getServerSelector(args,
762 if (server_selector.
getTags().size() != 1) {
764 "'server-tags' list must contain exactly one"
765 " server tag for the 'remote-global-parameter"
766 << (address_family == AF_INET ?
"4" :
"6") <<
"-get-all'"
772 get_all_fun(backend_selector, server_selector);
777 info->set(
"parameters", info_list);
778 for (
auto const& value : values) {
782 "StampedValue: attempt to get null value of the '"
783 << value->getName() <<
"' parameter");
785 auto const it = keywords.find(value->getName());
786 if (it == keywords.end()) {
793 std::string param_name;
794 std::string sub_param_name;
796 param_name, sub_param_name)) {
798 sub_param->set(sub_param_name, info_value);
799 param->set(param_name, sub_param);
801 param->set(param_name, info_value);
803 param->set(
"metadata", value->getMetadata());
804 info_list->add(param);
811 std::ostringstream msg;
813 << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
814 <<
" global parameter(s) found.";
821 }
catch (
const std::exception& ex) {
839 template <
typename SubnetPtrType,
typename SubnetConfigParser,
typename FunType>
841 const uint16_t address_family,
842 FunType create_update_fun) {
845 SubnetPtrType subnet;
850 (callout_handle,
"subnets", backend_selector, server_selector,
851 subnet, backend_selector, server_selector,
857 "'server-tags' list must contain one or more"
858 " server tags for the 'remote-subnet"
859 << (address_family == AF_INET ?
"4" :
"6") <<
"-set'"
864 create_update_fun(backend_selector, server_selector, subnet);
868 subnet_info->set(
"id",
870 subnet_info->set(
"subnet",
875 subnets_list->add(subnet_info);
878 response_arguments->set(
"subnets", subnets_list);
881 std::ostringstream msg;
882 msg << (address_family == AF_INET ?
"IPv4" :
"IPv6")
883 <<
" subnet successfully set.";
886 msg.str(), response_arguments);
887 callout_handle.setArgument(
"response", response);
889 }
catch (
const std::exception& ex) {
904 template <
typename FunType>
906 const uint16_t address_family,
907 FunType delete_fun) {
913 (callout_handle,
"subnets", subnet_id, backend_selector,
918 delete_fun(backend_selector, server_selector, subnet_id);
921 response_arguments->set(
"count",
925 std::ostringstream msg;
926 msg << count << (address_family == AF_INET ?
" IPv4" :
" IPv6")
927 <<
" subnet(s) deleted.";
932 callout_handle.setArgument(
"response", response);
934 }
catch (
const std::exception& ex) {
949 template <
typename FunType>
951 const uint16_t address_family,
952 FunType delete_fun) {
959 (callout_handle,
"subnets", address_family,
960 prefix, backend_selector, server_selector,
965 delete_fun(backend_selector, server_selector, prefix);
968 response_arguments->set(
"count",
972 std::ostringstream msg;
973 msg << count << (address_family == AF_INET ?
" IPv4" :
" IPv6")
974 <<
" subnet(s) deleted.";
979 callout_handle.setArgument(
"response", response);
981 }
catch (
const std::exception& ex) {
998 template <
typename SubnetPtrType,
typename FunType>
1000 const uint16_t address_family,
1007 (callout_handle,
"subnets", subnet_id, backend_selector,
1011 SubnetPtrType subnet =
1012 get_fun(backend_selector, server_selector, subnet_id);
1015 parser_->getSubnetCommon(callout_handle, subnet, address_family, subnet_id);
1017 }
catch (
const std::exception& ex) {
1034 template <
typename SubnetPtrType,
typename FunType>
1036 const uint16_t address_family,
1042 parser_->parseInputListElement
1044 (callout_handle,
"subnets", address_family,
1045 prefix, backend_selector, server_selector,
1049 SubnetPtrType subnet =
1050 get_fun(backend_selector, server_selector, prefix);
1053 parser_->getSubnetCommon(callout_handle, subnet,
1054 address_family, prefix);
1056 }
catch (
const std::exception& ex) {
1072 template <
typename SubnetCollection,
typename FunType>
1074 const uint16_t address_family,
1075 FunType get_all_fun) {
1089 backend_selector =
parser_->getBackendSelector(args);
1093 server_selector =
parser_->getServerSelector(args,
1097 SubnetCollection subnets =
1098 get_all_fun(backend_selector, server_selector);
1103 info->set(
"subnets", info_list);
1104 for (
auto const& subnet : subnets) {
1106 subnet_info->set(
"id",
1108 subnet_info->set(
"subnet",
1112 std::string sn_name = subnet->getSharedNetworkName();
1113 if (!sn_name.empty()) {
1114 subnet_info->set(
"shared-network-name",
1118 subnet_info->set(
"shared-network-name",
1123 subnet_info->set(
"metadata", subnet->getMetadata());
1125 info_list->add(subnet_info);
1131 std::ostringstream msg;
1132 msg << subnets.size()
1133 << (address_family == AF_INET ?
" IPv4" :
" IPv6")
1134 <<
" subnet(s) found.";
1141 }
catch (
const std::exception& ex) {
1159 template <
typename SharedNetworkPtrType,
typename SharedNetworkParser,
typename FunType>
1161 const uint16_t address_family,
1162 FunType create_update_fun) {
1166 SharedNetworkPtrType shared_network;
1171 (callout_handle,
"shared-networks", backend_selector, server_selector,
1172 shared_network, backend_selector,
1178 "'server-tags' list must contain one or more"
1179 " server tags for the 'remote-network"
1180 << (address_family == AF_INET ?
"4" :
"6") <<
"-set'"
1185 create_update_fun(backend_selector, server_selector, shared_network);
1189 network_info->set(
"name",
1194 response_list->add(network_info);
1197 response_arguments->set(
"shared-networks", response_list);
1200 std::ostringstream msg;
1201 msg << (address_family == AF_INET ?
"IPv4" :
"IPv6");
1202 msg <<
" shared network successfully set.";
1205 msg.str(), response_arguments);
1206 callout_handle.setArgument(
"response", response);
1208 }
catch (
const std::exception& ex) {
1224 template <
typename FunType,
typename FunType2>
1226 const uint16_t address_family,
1227 FunType delete_fun, FunType2 delete_all_fun) {
1240 auto subnets_action =
parser_->getSubnetsAction(args);
1246 (callout_handle,
"shared-networks", name, backend_selector,
1251 delete_all_fun(backend_selector, server_selector, name);
1255 uint64_t count = delete_fun(backend_selector, server_selector, name);
1258 response_arguments->set(
"count",
1262 std::ostringstream msg;
1263 msg << count << (address_family == AF_INET ?
" IPv4" :
" IPv6");
1264 msg <<
" shared network(s) deleted.";
1269 callout_handle.setArgument(
"response", response);
1271 }
catch (
const std::exception& ex) {
1291 template <
typename SharedNetworkPtrType,
typename SubnetCollection,
1292 typename FunType,
typename FunType2>
1294 const uint16_t address_family,
1295 FunType get_fun, FunType2
get_all) {
1302 (callout_handle,
"shared-networks", name, backend_selector,
1307 auto subnets_include =
parser_->getSubnetsInclude(args);
1310 SharedNetworkPtrType network =
1311 get_fun(backend_selector, server_selector, name);
1316 network && network->getAllSubnets()->empty()) {
1317 SubnetCollection subnets =
1318 get_all(backend_selector, server_selector, name);
1319 for (
auto const& subnet : subnets) {
1320 network->add(subnet);
1327 info->set(
"shared-networks", info_list);;
1328 std::ostringstream msg;
1329 msg << (address_family == AF_INET ?
"IPv4" :
"IPv6");
1330 msg <<
" shared network '" << name <<
"' ";
1338 if (address_family == AF_INET) {
1339 network_element->remove(
"subnet4");
1341 network_element->remove(
"subnet6");
1346 network_element->set(
"metadata", network->getMetadata());
1348 info_list->add(network_element);
1352 msg <<
"not found.";
1359 callout_handle.setArgument(
"response", response);
1361 }
catch (
const std::exception& ex) {
1378 template <
typename SharedNetworkCollection,
typename FunType>
1380 const uint16_t address_family,
1395 backend_selector =
parser_->getBackendSelector(args);
1399 server_selector =
parser_->getServerSelector(args,
1403 SharedNetworkCollection networks =
1404 get_all(backend_selector, server_selector);
1409 info->set(
"shared-networks", info_list);
1410 for (
auto const& network : networks) {
1412 network_map->set(
"name",
1414 network_map->set(
"metadata", network->getMetadata());
1415 info_list->add(network_map);
1422 std::ostringstream msg;
1423 msg << networks.size();
1424 msg << (address_family == AF_INET ?
" IPv4" :
" IPv6");
1425 msg <<
" shared network(s) found.";
1432 }
catch (
const std::exception& ex) {
1446 template <
typename FunType>
1448 const uint16_t address_family,
1449 FunType create_update_fun) {
1451 std::pair<dhcp::ClientClassDefPtr, std::string> class_pair;
1457 backend_selector, server_selector,
1458 class_pair, backend_selector, server_selector,
1464 "'server-tags' list must contain one or more"
1465 " server tags for the 'remote-class"
1466 << (address_family == AF_INET ?
"4" :
"6") <<
"-set'"
1471 create_update_fun(backend_selector, server_selector, class_pair.first,
1476 client_class_info->set(
"name",
1481 response_list->add(client_class_info);
1484 response_arguments->set(
"client-classes", response_list);
1487 std::ostringstream msg;
1488 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6");
1489 msg <<
" client class successfully set.";
1492 msg.str(), response_arguments);
1493 callout_handle.setArgument(
"response", response);
1495 }
catch (
const std::exception& ex) {
1509 template <
typename FunType>
1511 const uint16_t address_family,
1512 FunType delete_fun) {
1522 (callout_handle,
"client-classes", name, backend_selector,
1526 uint64_t count = delete_fun(backend_selector, server_selector, name);
1529 response_arguments->set(
"count",
1533 std::ostringstream msg;
1534 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6");
1535 msg <<
" client class(es) deleted.";
1540 callout_handle.setArgument(
"response", response);
1542 }
catch (
const std::exception& ex) {
1556 template <
typename FunType>
1558 const uint16_t address_family,
1566 (callout_handle,
"client-classes", name, backend_selector,
1570 ClientClassDefPtr client_class = get_fun(backend_selector, server_selector, name);
1575 info->set(
"client-classes", info_list);;
1576 std::ostringstream msg;
1577 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6");
1578 msg <<
" client class '" << name <<
"' ";
1585 client_class_element->set(
"metadata", client_class->getMetadata());
1587 info_list->add(client_class_element);
1591 msg <<
"not found.";
1598 callout_handle.setArgument(
"response", response);
1600 }
catch (
const std::exception& ex) {
1614 template <
typename FunType>
1616 const uint16_t address_family,
1631 backend_selector =
parser_->getBackendSelector(args);
1635 server_selector =
parser_->getServerSelector(args,
1644 info->set(
"client-classes", info_list);
1645 for (
auto const& client_class : *client_classes.
getClasses()) {
1647 client_class_map->set(
"metadata", client_class->getMetadata());
1648 info_list->add(client_class_map);
1655 std::ostringstream msg;
1657 msg << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6");
1658 msg <<
" client class(es) found.";
1665 }
catch (
const std::exception& ex) {
1679 template <
typename FunType>
1681 const uint16_t address_family,
1682 FunType create_update_fun) {
1690 (callout_handle,
"option-defs", address_family,
1691 option_def, backend_selector, server_selector,
1695 if (server_selector.
getTags().size() != 1) {
1697 "'server-tags' list must contain exactly one"
1698 " server tag for the 'remote-option-def"
1699 << (address_family == AF_INET ?
"4" :
"6") <<
"-set'"
1704 create_update_fun(backend_selector, server_selector, option_def);
1711 response_list->add(option_def_info);
1714 response_arguments->set(
"option-defs", response_list);
1717 std::ostringstream msg;
1718 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
1719 <<
" option definition successfully set.";
1722 msg.str(), response_arguments);
1723 callout_handle.setArgument(
"response", response);
1725 }
catch (
const std::exception& ex) {
1739 template <
typename FunType>
1741 const uint16_t address_family,
1742 FunType delete_fun) {
1748 (callout_handle,
"option-defs", address_family,
1749 option_def_delete, backend_selector, server_selector,
1753 if (server_selector.
getTags().size() != 1) {
1755 "'server-tags' list must contain exactly one"
1756 " server tag for the 'remote-option-def"
1757 << (address_family == AF_INET ?
"4" :
"6") <<
"-del'"
1763 delete_fun(backend_selector, server_selector,
1764 std::get<0>(option_def_delete),
1765 std::get<1>(option_def_delete),
1766 std::get<2>(option_def_delete));
1769 response_arguments->set(
"count",
1773 std::ostringstream msg;
1774 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
1775 <<
" option definition(s) deleted.";
1780 callout_handle.setArgument(
"response", response);
1782 }
catch (
const std::exception& ex) {
1796 template <
typename FunType>
1798 const uint16_t address_family,
1801 std::pair<uint16_t, std::string> option_def_pair;
1805 (callout_handle,
"option-defs", address_family,
1806 option_def_pair, backend_selector, server_selector,
1810 if (server_selector.
getTags().size() != 1) {
1812 "'server-tags' list must contain exactly one"
1813 " server tag for the 'remote-option-def"
1814 << (address_family == AF_INET ?
"4" :
"6") <<
"-get'"
1820 get_fun(backend_selector, server_selector,
1821 option_def_pair.first, option_def_pair.second);
1824 std::ostringstream msg;
1825 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
1826 <<
" option definition " << option_def_pair.first
1827 <<
" in '" << option_def_pair.second <<
"' ";
1833 info->set(
"option-defs", defs->toElementWithMetadata(
true));
1838 info->set(
"option-defs", info_list);
1839 msg <<
"not found.";
1846 callout_handle.setArgument(
"response", response);
1848 }
catch (
const std::exception& ex) {
1862 template <
typename FunType>
1864 const uint16_t address_family,
1865 FunType get_all_fun) {
1879 backend_selector =
parser_->getBackendSelector(args);
1883 server_selector =
parser_->getServerSelector(args,
1887 if (server_selector.
getTags().size() != 1) {
1889 "'server-tags' list must contain exactly one"
1890 " server tag for the 'remote-option-def"
1891 << (address_family == AF_INET ?
"4" :
"6") <<
"-get-all'"
1897 get_all_fun(backend_selector, server_selector);
1902 for (
auto const& def : defs) {
1905 info->set(
"option-defs", cfg_defs->toElementWithMetadata(
true));
1910 std::ostringstream msg;
1912 << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
1913 <<
" option definition(s) found.";
1920 }
catch (
const std::exception& ex) {
1934 template <
typename FunType>
1936 const uint16_t address_family,
1937 FunType create_update_fun) {
1941 std::pair<dhcp::OptionDescriptor, std::string> option_pair =
1945 parser_->parseInputListElement
1949 backend_selector, server_selector,
1950 option_pair, backend_selector, server_selector,
1954 if (server_selector.
getTags().size() != 1) {
1956 "'server-tags' list must contain exactly one"
1957 " server tag for the 'remote-option"
1958 << (address_family == AF_INET ?
"4" :
"6")
1959 <<
"-global-set' command");
1962 auto option_descriptor = option_pair.first;
1963 option_descriptor.space_name_ = option_pair.second;
1966 create_update_fun(backend_selector, server_selector, option_descriptor);
1973 response_list->add(option_info);
1976 response_arguments->set(
"options", response_list);
1979 std::ostringstream msg;
1980 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
1981 <<
" option successfully set.";
1984 msg.str(), response_arguments);
1985 callout_handle.setArgument(
"response", response);
1987 }
catch (
const std::exception& ex) {
2001 template <
typename FunType>
2003 const uint16_t address_family,
2004 FunType delete_fun) {
2010 (callout_handle,
"options", address_family,
2011 option_tuple, backend_selector, server_selector,
2015 if (server_selector.
getTags().size() != 1) {
2017 "'server-tags' list must contain exactly one"
2018 " server tag for the 'remote-option"
2019 << (address_family == AF_INET ?
"4" :
"6")
2020 <<
"-global-del' command");
2024 uint64_t count = delete_fun(backend_selector, server_selector,
2025 std::get<0>(option_tuple),
2026 std::get<1>(option_tuple),
2027 std::get<2>(option_tuple));
2030 response_arguments->set(
"count",
2034 std::ostringstream msg;
2035 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2036 <<
" option(s) deleted.";
2041 callout_handle.setArgument(
"response", response);
2043 }
catch (
const std::exception& ex) {
2057 template <
typename FunType>
2059 const uint16_t address_family,
2066 (callout_handle,
"options", address_family,
2067 option_tuple, backend_selector, server_selector,
2071 if (server_selector.
getTags().size() != 1) {
2073 "'server-tags' list must contain exactly one"
2074 " server tag for the 'remote-option"
2075 << (address_family == AF_INET ?
"4" :
"6")
2076 <<
"-global-get' command");
2081 get_fun(backend_selector, server_selector,
2082 std::get<0>(option_tuple),
2083 std::get<1>(option_tuple),
2084 std::get<2>(option_tuple));
2087 std::ostringstream msg;
2088 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
2089 <<
" option " << std::get<0>(option_tuple);
2091 auto cclasses = std::get<2>(option_tuple);
2093 msg <<
" with client-classes = " << cclasses->toElement()->str();
2096 msg <<
" in '" << std::get<1>(option_tuple) <<
"' ";
2102 options->add(*option, std::get<1>(option_tuple));
2103 info->set(
"options", options->toElementWithMetadata(
true));
2108 info->set(
"options", info_list);
2109 msg <<
"not found.";
2116 callout_handle.setArgument(
"response", response);
2118 }
catch (
const std::exception& ex) {
2133 template <
typename FunType>
2135 const uint16_t address_family,
2136 FunType get_all_fun) {
2150 backend_selector =
parser_->getBackendSelector(args);
2154 server_selector =
parser_->getServerSelector(args,
2158 if (server_selector.
getTags().size() != 1) {
2160 "'server-tags' list must contain exactly one"
2161 " server tag for the 'remote-option"
2162 << (address_family == AF_INET ?
"4" :
"6")
2163 <<
"-global-get-all' command");
2168 get_all_fun(backend_selector, server_selector);
2173 for (
auto const& option : options) {
2174 cfg_options->add(option, option.space_name_);
2176 info->set(
"options", cfg_options->toElementWithMetadata(
true));
2181 std::ostringstream msg;
2182 msg << options.size()
2183 << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2184 <<
" option(s) found.";
2191 }
catch (
const std::exception& ex) {
2205 template <
typename FunType>
2207 const uint16_t address_family,
2208 FunType create_update_fun) {
2215 (callout_handle,
"servers", server,
2216 backend_selector, server_selector,
2220 create_update_fun(backend_selector, server);
2224 response_list->add(server->toElement());
2227 response_arguments->set(
"servers", response_list);
2230 std::ostringstream msg;
2231 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
2232 <<
" server successfully set.";
2235 msg.str(), response_arguments);
2236 callout_handle.setArgument(
"response", response);
2238 }
catch (
const std::exception& ex) {
2252 template <
typename FunType>
2254 const uint16_t address_family,
2255 FunType delete_fun) {
2261 (callout_handle,
"servers", server_tag,
2262 backend_selector, server_selector,
2266 uint64_t count = delete_fun(backend_selector, server_tag);
2269 response_arguments->set(
"count",
2273 std::ostringstream msg;
2274 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2275 <<
" server(s) deleted.";
2280 callout_handle.setArgument(
"response", response);
2282 }
catch (
const std::exception& ex) {
2296 template <
typename FunType>
2298 const uint16_t address_family,
2305 (callout_handle,
"servers", server_tag,
2306 backend_selector, server_selector,
2310 db::ServerPtr server = get_fun(backend_selector, server_tag);
2313 std::ostringstream msg;
2314 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
2315 <<
" server '" << server_tag.
get() <<
"' ";
2318 info->set(
"servers", info_list);
2323 info_list->add(server->toElement());
2326 msg <<
"not found.";
2333 callout_handle.setArgument(
"response", response);
2335 }
catch (
const std::exception& ex) {
2350 template <
typename FunType>
2352 const uint16_t address_family,
2353 FunType get_all_fun) {
2369 backend_selector =
parser_->getBackendSelector(args);
2374 if (args && args->contains(
"server-tags")) {
2384 info->set(
"servers", info_list);
2385 for (
auto const& server : servers) {
2386 info_list->add(server->toElement());
2392 std::ostringstream msg;
2393 msg << servers.size()
2394 << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2395 <<
" server(s) found.";
2402 }
catch (
const std::exception& ex) {
2416 template <
typename FunType>
2418 const uint16_t address_family,
2419 FunType create_update_fun) {
2426 (callout_handle,
"shared-networks", name, backend_selector,
2431 std::pair<dhcp::OptionDescriptor, std::string> option_pair =
2433 parser_->parseInputListElement
2437 backend_selector, server_selector, option_pair);
2439 auto option_descriptor = option_pair.first;
2440 option_descriptor.space_name_ = option_pair.second;
2443 create_update_fun(backend_selector, server_selector,
2444 name, option_descriptor);
2450 response_list->add(option_info);
2453 response_arguments->set(
"options", response_list);
2456 std::ostringstream msg;
2457 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
2458 <<
" option successfully set.";
2461 msg.str(), response_arguments);
2462 callout_handle.setArgument(
"response", response);
2464 }
catch (
const std::exception& ex) {
2478 template <
typename FunType>
2480 const uint16_t address_family,
2481 FunType delete_fun) {
2488 (callout_handle,
"shared-networks", name, backend_selector,
2494 (callout_handle,
"options", address_family, option_tuple);
2497 uint64_t count = delete_fun(backend_selector, server_selector,
2499 std::get<0>(option_tuple),
2500 std::get<1>(option_tuple),
2501 std::get<2>(option_tuple));
2504 response_arguments->set(
"count",
2508 std::ostringstream msg;
2509 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2510 <<
" option(s) deleted.";
2515 callout_handle.setArgument(
"response", response);
2517 }
catch (
const std::exception& ex) {
2531 template <
typename FunType>
2533 const uint16_t address_family,
2534 FunType create_update_fun) {
2541 (callout_handle,
"subnets", subnet_id, backend_selector,
2546 std::pair<dhcp::OptionDescriptor, std::string> option_pair =
2548 parser_->parseInputListElement
2552 backend_selector, server_selector, option_pair);
2554 auto option_descriptor = option_pair.first;
2555 option_descriptor.space_name_ = option_pair.second;
2558 create_update_fun(backend_selector, server_selector,
2559 subnet_id, option_descriptor);
2566 response_list->add(option_info);
2569 response_arguments->set(
"options", response_list);
2572 std::ostringstream msg;
2573 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
2574 <<
" option successfully set.";
2577 msg.str(), response_arguments);
2578 callout_handle.setArgument(
"response", response);
2580 }
catch (
const std::exception& ex) {
2594 template <
typename FunType>
2596 const uint16_t address_family,
2597 FunType delete_fun) {
2604 (callout_handle,
"subnets", subnet_id, backend_selector,
2610 (callout_handle,
"options", address_family, option_tuple);
2613 uint64_t count = delete_fun(backend_selector, server_selector,
2615 std::get<0>(option_tuple),
2616 std::get<1>(option_tuple),
2617 std::get<2>(option_tuple));
2620 response_arguments->set(
"count",
2624 std::ostringstream msg;
2625 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2626 <<
" option(s) deleted.";
2631 callout_handle.setArgument(
"response", response);
2633 }
catch (
const std::exception& ex) {
2647 template <
typename FunType>
2649 const uint16_t address_family,
2650 FunType create_update_fun) {
2653 std::pair<asiolink::IOAddress, asiolink::IOAddress> pool_range =
2654 (address_family == AF_INET ?
2662 (callout_handle,
"pools", address_family,
2663 pool_range, backend_selector, server_selector,
2668 std::pair<dhcp::OptionDescriptor, std::string> option_pair =
2670 parser_->parseInputListElement<
2674 backend_selector, server_selector, option_pair);
2676 auto option_descriptor = option_pair.first;
2677 option_descriptor.space_name_ = option_pair.second;
2680 create_update_fun(backend_selector, server_selector,
2681 pool_range.first, pool_range.second,
2689 response_list->add(option_info);
2692 response_arguments->set(
"options", response_list);
2695 std::ostringstream msg;
2696 msg << (address_family == AF_INET ?
"DHCPv4" :
"DHCPv6")
2697 <<
" option successfully set.";
2700 msg.str(), response_arguments);
2701 callout_handle.setArgument(
"response", response);
2703 }
catch (
const std::exception& ex) {
2717 template <
typename FunType>
2719 const uint16_t address_family,
2720 FunType delete_fun) {
2723 std::pair<asiolink::IOAddress, asiolink::IOAddress> pool_range =
2724 (address_family == AF_INET ?
2732 (callout_handle,
"pools", address_family,
2733 pool_range, backend_selector, server_selector,
2739 (callout_handle,
"options", address_family, option_tuple);
2742 uint64_t count = delete_fun(backend_selector, server_selector,
2743 pool_range.first, pool_range.second,
2744 std::get<0>(option_tuple),
2745 std::get<1>(option_tuple),
2746 std::get<2>(option_tuple));
2749 response_arguments->set(
"count",
2753 std::ostringstream msg;
2754 msg << count << (address_family == AF_INET ?
" DHCPv4" :
" DHCPv6")
2755 <<
" option(s) deleted.";
2760 callout_handle.setArgument(
"response", response);
2762 }
catch (
const std::exception& ex) {
2777 option_info->set(
"code",
2782 return (option_info);
2794 option_info->set(
"code",
2802 return (option_info);
Parsers for a subset of an object specification, e.g.
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
A generic exception that is thrown if a function is called in a prohibited way.
static const IOAddress & IPV4_ZERO_ADDRESS()
Returns an address set to all zeros.
static const IOAddress & IPV6_ZERO_ADDRESS()
Returns an IPv6 zero address.
Implements a parser for a client class name.
Implements a parser for a DHCPv4 or DHCPv6 client class.
Overrides the default option data parser.
Implements a parser for parsing the option code, space, and force.
Implements a parser for option definitions with setting defaults.
Implements a parser for parsing the option code and space.
Implements a parser for parsing the option code and space and client-classes.
Implements a parser for an address pool range.
Implements a parser for a shared network name.
Implements a parser for a subnet id.
Implements a parser for a subnet prefix.
void setClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-class[46]-set command.
ConfigCmdsImpl()
Constructor.
void getSubnetId(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-subnet[46]-get-by-id command.
void getGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-option[46]-global-get command.
void delPoolOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-pool-del command.
void getClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-class[46]-get command.
void getSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun, FunType2 get_all)
Implements handler for remote-shared-network[46]-get command.
void setSharedNetworkOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-network-set command.
data::ElementPtr makeOptionInfoElement(const OptionDefinition &def) const
Create an element map containing an OptionDef's code and space.
void setSubnetOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-subnet-set command.
void getAllServers(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-server[46]-get-all command.
void setServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-server[46]-set command.
void delGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-global-parameter[46]-del command.
void delSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun, FunType2 delete_all_fun)
Implements handler for remote-shared-network[46]-del command.
void getGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType get_fun)
Implements handler for remote-global-parameter[46]-get command.
void getServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-server[46]-get command.
void delSubnetOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-subnet-del command.
void getOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-option-def[46]-get command.
void setGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-global-set command.
void getAllGlobalParameters(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-global-parameter[46]-get-all command.
void delOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option-def[46]-del command.
void delSubnetPrefix(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-subnet[46]-del-by-prefix command.
void delSharedNetworkOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-network-del command.
void delClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-class[46]-del command.
void getSubnetPrefix(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-subnet[46]-get-by-prefix command.
void setPoolOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-pool-set command.
data::ElementPtr makeOptionInfoElement(const OptionDescriptor &desc) const
Create an element map containing an OptionDescriptor's code, space, and client classes.
void listSubnets(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-subnet[46]-list command.
void getAllClientClasses(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all)
Implements handler for remote-class[46]-get-all command.
void getAllOptionDefs(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-option-def[46]-get-all command.
void getAllGlobalOptions(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-option[46]-global-get-all command.
boost::shared_ptr< ConfigCmdsParser > parser_
Shared pointer to the commands parser.
void delGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-global-del command.
void delSubnetId(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-subnet[46]-del-by-id command.
void setSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-shared-network[46]-set command.
void delServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-server[46]-del command.
void listSharedNetworks(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all)
Implements handler for remote-shared-network[46]-list command.
void setSubnet(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-subnet[46]-set command.
void setGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const data::SimpleKeywords &list_keywords, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-global-parameter[46]-set command.
void setOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option-def[46]-set command.
This parser class contains the common logic for various callouts to parse and validate the contents o...
ServerTagsParse
Server selector parsing.
@ TAGS_REQUIRED
server-tags is required
@ TAGS_FORBIDDEN
server-tags is not allowed
@ TAGS_OPTIONAL
server-tags entry is optional
SubnetsInclude
Subnets actions for shared network get command.
db::ServerSelector getServerSelector(const data::ConstElementPtr &args, ServerTagsParse tags_parse) const
Creates server selector from the command's arguments.
SubnetsAction
Subnets actions for shared network delete.
@ ACTION_KEEP
keep subnets (default)
@ ACTION_DELETE
delete subnets
void parseInputMapElement(hooks::CalloutHandle &callout_handle, const std::string &map_name, ParserArgs... parser_args, ElementType &parsed_element, db::BackendSelector &backend_selector, db::ServerSelector &server_selector, ServerTagsParse tags_parse) const
Parses a command containing a map of elements.
SubnetsAction getSubnetsAction(const data::ConstElementPtr &args) const
Creates subnets action from the command's arguments.
SubnetsInclude getSubnetsInclude(const data::ConstElementPtr &args) const
Creates SubnetsInclude from the command's arguments.
data::ConstElementPtr parseInputListElement(hooks::CalloutHandle &callout_handle, const std::string &list_name, ParserArgs... parser_args, ElementType &parsed_element, data::Element::types sub_type=data::Element::map) const
Parses a command containing a list of elements (second call).
void getSubnetCommon(hooks::CalloutHandle &callout_handle, const SubnetPtrType &subnet, const uint16_t address_family, const KeyType &key)
Common routine invoked when getting a subnet.
data::ConstElementPtr parseInputListElement(hooks::CalloutHandle &callout_handle, const std::string &list_name, ParserArgs... parser_args, ElementType &parsed_element, db::BackendSelector &backend_selector, db::ServerSelector &server_selector, ServerTagsParse tags_parse, data::Element::types sub_type=data::Element::map) const
Parses a command containing a list of elements.
db::BackendSelector getBackendSelector(const data::ConstElementPtr &args) const
Creates backend selector from the command's arguments.
Implements a parser for a global parameter name.
Implements a parser for global parameters.
Implements parser for a server configuration.
Implements parser for a server tag.
static ElementPtr create(const Position &pos=ZERO_POSITION())
Create a NullElement.
static std::string typeToName(Element::types type)
Returns the name of the given type as a string.
types
The types that an Element can hold.
static ElementPtr fromJSON(const std::string &in, bool preproc=false)
These functions will parse the given string (JSON) representation of a compound element.
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
std::string get() const
Returns server tag as string.
Server selector for associating objects in a database with specific servers.
std::set< data::ServerTag > getTags() const
Returns tags associated with the selector.
bool hasNoTags() const
Convenience method checking if the server selector has no tags.
static ServerSelector UNASSIGNED()
Factory returning "unassigned" server selector.
static bool translateName(std::string const &name, std::string ¶m_name, std::string &sub_param_name)
It translates the top level map parameters from flat naming format (e.g.
Represents option definitions used by the DHCP server.
Represents option data configuration for the DHCP server.
Maintains a list of ClientClassDef's.
bool empty() const
Checks if the class dictionary is empty.
const ClientClassDefListPtr & getClasses() const
Fetches the dictionary's list of classes.
bool empty() const
Check if classes is empty.
virtual isc::data::ElementPtr toElement() const
Returns all class names as an ElementPtr of type ListElement.
Base class representing a DHCP option definition.
uint16_t getCode() const
Return option code.
std::string getOptionSpaceName() const
Returns option space name.
OptionPtr option_
Option instance.
std::string space_name_
Option space name.
ClientClasses client_classes_
Collection of classes for the which option is allowed.
this class parses a single subnet
Per-packet callout handle.
void getArgument(const std::string &name, T &value) const
Get argument.
void setArgument(const std::string &name, T value)
Set argument.
Defines classes for storing client class definitions.
Parsers for client class definitions.
This file contains several functions and constants that are used for handling commands and responses ...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
int get_all(CalloutHandle &handle)
The gss-tsig-get-all command.
std::tuple< uint16_t, std::string, ClientClassesPtr > CBOptionTuple
Defines a tuple for the three values that may be used as a key for an option.
std::tuple< uint16_t, std::string, bool > CBOptionDefDelete
Defines a tuple of values for deleting an option definition: the option code, option space,...
const int CONTROL_RESULT_EMPTY
Status code indicating that the specified command was completed correctly, but failed to produce any ...
const int CONTROL_RESULT_ERROR
Status code indicating a general failure.
std::string parseCommand(ConstElementPtr &arg, ConstElementPtr command)
Parses the given command into a string containing the actual command and an ElementPtr containing the...
std::string parseCommandWithArgs(ConstElementPtr &arg, ConstElementPtr command)
Parses the given command into a string containing the command name and an ElementPtr containing the m...
ConstElementPtr createAnswer()
Creates a standard config/command level success answer message (i.e.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
boost::shared_ptr< StampedValue > StampedValuePtr
Pointer to the stamped value.
boost::multi_index_container< StampedValuePtr, boost::multi_index::indexed_by< boost::multi_index::hashed_non_unique< boost::multi_index::tag< StampedValueNameIndexTag >, boost::multi_index::const_mem_fun< StampedValue, std::string, &StampedValue::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< StampedValueModificationTimeIndexTag >, boost::multi_index::const_mem_fun< BaseStampedElement, boost::posix_time::ptime, &BaseStampedElement::getModificationTime > > > > StampedValueCollection
Multi index container for StampedValue.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
boost::multi_index_container< ServerPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ServerTagIndexTag >, boost::multi_index::const_mem_fun< Server, std::string, &Server::getServerTagAsText > > > > ServerCollection
Multi index container for Server.
boost::multi_index_container< OptionDescriptor, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_non_unique< KeyFromKeyExtractor< boost::multi_index::const_mem_fun< Option, uint16_t, &Option::getType >, boost::multi_index::member< OptionDescriptor, OptionPtr, &OptionDescriptor::option_ > > >, boost::multi_index::hashed_non_unique< boost::multi_index::member< OptionDescriptor, bool, &OptionDescriptor::persistent_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime, &data::BaseStampedElement::getModificationTime > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< OptionIdIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, uint64_t, &data::BaseStampedElement::getId > >, boost::multi_index::hashed_non_unique< boost::multi_index::member< OptionDescriptor, bool, &OptionDescriptor::cancelled_ > >, boost::multi_index::hashed_non_unique< boost::multi_index::composite_key< OptionDescriptor, KeyFromKeyExtractor< boost::multi_index::const_mem_fun< Option, uint16_t, &Option::getType >, boost::multi_index::member< OptionDescriptor, OptionPtr, &OptionDescriptor::option_ > >, boost::multi_index::member< OptionDescriptor, ClientClasses, &OptionDescriptor::client_classes_ > > > > > OptionContainer
Multi index container for DHCP option descriptors.
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
boost::shared_ptr< CfgOptionDef > CfgOptionDefPtr
Non-const pointer.
boost::shared_ptr< ClientClassDef > ClientClassDefPtr
a pointer to an ClientClassDef
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
boost::shared_ptr< OptionDescriptor > OptionDescriptorPtr
A pointer to option descriptor.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
boost::multi_index_container< OptionDefinitionPtr, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_non_unique< boost::multi_index::const_mem_fun< OptionDefinition, uint16_t, &OptionDefinition::getCode > >, boost::multi_index::hashed_non_unique< boost::multi_index::const_mem_fun< OptionDefinition, std::string, &OptionDefinition::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime, &data::StampedElement::getModificationTime > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< OptionIdIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, uint64_t, &data::BaseStampedElement::getId > > > > OptionDefContainer
Multi index container for DHCP option definitions.
Defines the logger used by the top-level component of kea-lfc.