21#include <boost/make_shared.hpp>
45 impl4->setClientClass4(handle);
47 }
catch (
const std::exception& ex) {
61 impl4->getClientClass4(handle);
63 }
catch (
const std::exception& ex) {
77 impl4->getAllClientClasses4(handle);
79 }
catch (
const std::exception& ex) {
93 impl4->delClientClass4(handle);
95 }
catch (
const std::exception& ex) {
109 impl4->setGlobalParameter4(handle);
111 }
catch (
const std::exception& ex) {
125 impl4->getGlobalParameter4(handle);
127 }
catch (
const std::exception& ex) {
141 impl4->getAllGlobalParameters4(handle);
143 }
catch (
const std::exception& ex) {
158 impl4->delGlobalParameter4(handle);
160 }
catch (
const std::exception& ex) {
174 impl4->setSubnet4(handle);
176 }
catch (
const std::exception& ex) {
190 impl4->getSubnet4Id(handle);
192 }
catch (
const std::exception& ex) {
206 impl4->getSubnet4Prefix(handle);
208 }
catch (
const std::exception& ex) {
222 impl4->listSubnets4(handle);
224 }
catch (
const std::exception& ex) {
238 impl4->delSubnet4Id(handle);
240 }
catch (
const std::exception& ex) {
254 impl4->delSubnet4Prefix(handle);
256 }
catch (
const std::exception& ex) {
270 impl4->setSharedNetwork4(handle);
272 }
catch (
const std::exception& ex) {
286 impl4->getSharedNetwork4(handle);
288 }
catch (
const std::exception& ex) {
302 impl4->listSharedNetworks4(handle);
304 }
catch (
const std::exception& ex) {
318 impl4->delSharedNetwork4(handle);
320 }
catch (
const std::exception& ex) {
334 impl4->setOptionDef4(handle);
336 }
catch (
const std::exception& ex) {
350 impl4->getOptionDef4(handle);
352 }
catch (
const std::exception& ex) {
366 impl4->getAllOptionDefs4(handle);
368 }
catch (
const std::exception& ex) {
382 impl4->delOptionDef4(handle);
384 }
catch (
const std::exception& ex) {
398 impl4->setGlobalOption4(handle);
400 }
catch (
const std::exception& ex) {
414 impl4->getGlobalOption4(handle);
416 }
catch (
const std::exception& ex) {
430 impl4->getAllGlobalOptions4(handle);
432 }
catch (
const std::exception& ex) {
447 impl4->delGlobalOption4(handle);
449 }
catch (
const std::exception& ex) {
463 impl4->setServer4(handle);
465 }
catch (
const std::exception& ex) {
479 impl4->getServer4(handle);
481 }
catch (
const std::exception& ex) {
495 impl4->getAllServers4(handle);
497 }
catch (
const std::exception& ex) {
512 impl4->delServer4(handle);
514 }
catch (
const std::exception& ex) {
528 impl4->setSharedNetworkOption4(handle);
530 }
catch (
const std::exception& ex) {
544 impl4->delSharedNetworkOption4(handle);
546 }
catch (
const std::exception& ex) {
560 impl4->setSubnetOption4(handle);
562 }
catch (
const std::exception& ex) {
576 impl4->delSubnetOption4(handle);
578 }
catch (
const std::exception& ex) {
592 impl4->setPoolOption4(handle);
594 }
catch (
const std::exception& ex) {
608 impl4->delPoolOption4(handle);
610 }
catch (
const std::exception& ex) {
624 impl6->setClientClass6(handle);
626 }
catch (
const std::exception& ex) {
640 impl6->getClientClass6(handle);
642 }
catch (
const std::exception& ex) {
656 impl6->getAllClientClasses6(handle);
658 }
catch (
const std::exception& ex) {
672 impl6->delClientClass6(handle);
674 }
catch (
const std::exception& ex) {
688 impl6->setGlobalParameter6(handle);
690 }
catch (
const std::exception& ex) {
704 impl6->getGlobalParameter6(handle);
706 }
catch (
const std::exception& ex) {
720 impl6->getAllGlobalParameters6(handle);
722 }
catch (
const std::exception& ex) {
737 impl6->delGlobalParameter6(handle);
739 }
catch (
const std::exception& ex) {
753 impl6->setSubnet6(handle);
755 }
catch (
const std::exception& ex) {
769 impl6->getSubnet6Id(handle);
771 }
catch (
const std::exception& ex) {
785 impl6->getSubnet6Prefix(handle);
787 }
catch (
const std::exception& ex) {
801 impl6->listSubnets6(handle);
803 }
catch (
const std::exception& ex) {
817 impl6->delSubnet6Id(handle);
819 }
catch (
const std::exception& ex) {
833 impl6->delSubnet6Prefix(handle);
835 }
catch (
const std::exception& ex) {
849 impl6->setSharedNetwork6(handle);
851 }
catch (
const std::exception& ex) {
865 impl6->getSharedNetwork6(handle);
867 }
catch (
const std::exception& ex) {
881 impl6->listSharedNetworks6(handle);
883 }
catch (
const std::exception& ex) {
897 impl6->delSharedNetwork6(handle);
899 }
catch (
const std::exception& ex) {
913 impl6->setOptionDef6(handle);
915 }
catch (
const std::exception& ex) {
929 impl6->getOptionDef6(handle);
931 }
catch (
const std::exception& ex) {
945 impl6->getAllOptionDefs6(handle);
947 }
catch (
const std::exception& ex) {
961 impl6->delOptionDef6(handle);
963 }
catch (
const std::exception& ex) {
977 impl6->setGlobalOption6(handle);
979 }
catch (
const std::exception& ex) {
993 impl6->getGlobalOption6(handle);
995 }
catch (
const std::exception& ex) {
1009 impl6->getAllGlobalOptions6(handle);
1011 }
catch (
const std::exception& ex) {
1026 impl6->delGlobalOption6(handle);
1028 }
catch (
const std::exception& ex) {
1042 impl6->setServer6(handle);
1044 }
catch (
const std::exception& ex) {
1058 impl6->getServer6(handle);
1060 }
catch (
const std::exception& ex) {
1074 impl6->getAllServers6(handle);
1076 }
catch (
const std::exception& ex) {
1091 impl6->delServer6(handle);
1093 }
catch (
const std::exception& ex) {
1107 impl6->setSharedNetworkOption6(handle);
1109 }
catch (
const std::exception& ex) {
1123 impl6->delSharedNetworkOption6(handle);
1125 }
catch (
const std::exception& ex) {
1139 impl6->setSubnetOption6(handle);
1141 }
catch (
const std::exception& ex) {
1155 impl6->delSubnetOption6(handle);
1157 }
catch (
const std::exception& ex) {
1171 impl6->setPoolOption6(handle);
1173 }
catch (
const std::exception& ex) {
1187 impl6->delPoolOption6(handle);
1189 }
catch (
const std::exception& ex) {
1203 impl6->setPdPoolOption6(handle);
1205 }
catch (
const std::exception& ex) {
1219 impl6->delPdPoolOption6(handle);
1221 }
catch (
const std::exception& ex) {
1239 if (family == AF_INET) {
1240 if (proc_name !=
"kea-dhcp4") {
1242 <<
", expected kea-dhcp4");
1245 if (proc_name !=
"kea-dhcp6") {
1247 <<
", expected kea-dhcp6");
1251 impl4 = boost::make_shared<ConfigCmdsDhcp4Impl>();
1326 impl6 = boost::make_shared<ConfigCmdsDhcp6Impl>();
1405 }
catch (
const std::exception& ex) {
int client_class6_get_command(CalloutHandle &handle)
Handler for remote-class4-get command.
int option4_network_del_command(CalloutHandle &handle)
Handler for remote-option4-network-del command.
int server6_get_all_command(CalloutHandle &handle)
Handler for remote-server6-get-all command.
int subnet6_del_by_id_command(CalloutHandle &handle)
Handler for remote-subnet6-del-by-id command.
int option6_subnet_set_command(CalloutHandle &handle)
Handler for remote-option6-subnet-set command.
int network6_set_command(CalloutHandle &handle)
Handler for remote-network6-set command.
int global_parameter6_get_command(CalloutHandle &handle)
Handler for remote-global-parameter6-get command.
int server4_get_all_command(CalloutHandle &handle)
Handler for remote-server4-get-all command.
int client_class6_get_all_command(CalloutHandle &handle)
Handler for remote-class6-get-all command.
int option6_global_del_command(CalloutHandle &handle)
Handler for remote-option6-global-del command.
int option_def4_del_command(CalloutHandle &handle)
Handler for remote-option-def4-del command.
int option4_global_get_command(CalloutHandle &handle)
Handler for remote-option4-global-get command.
int network6_get_command(CalloutHandle &handle)
Handler for remote-network6-get command.
int option6_global_get_all_command(CalloutHandle &handle)
Handler for remote-option6-global-get-all command.
int global_parameter6_get_all_command(CalloutHandle &handle)
Handler for remote-global-parameter6-get-all command.
int global_parameter4_set_command(CalloutHandle &handle)
Handler for remote-global-parameter4-set command.
int server4_del_command(CalloutHandle &handle)
Handler for remote-server4-del command.
int option6_network_del_command(CalloutHandle &handle)
Handler for remote-option6-network-del command.
int subnet4_list_command(CalloutHandle &handle)
Handler for remote-subnet4-list command.
int server6_del_command(CalloutHandle &handle)
Handler for remote-server6-del command.
int subnet4_get_by_id_command(CalloutHandle &handle)
Handler for remote-subnet4-get-by-id command.
int option4_global_del_command(CalloutHandle &handle)
Handler for remote-option4-global-del command.
int network6_list_command(CalloutHandle &handle)
Handler for remote-network6-list command.
int subnet6_get_by_prefix_command(CalloutHandle &handle)
Handler for remote-subnet6-get-by-prefix command.
int option_def4_set_command(CalloutHandle &handle)
Handler for remote-option-def4-set command.
int option_def6_get_all_command(CalloutHandle &handle)
Handler for remote-option-def6-get-all command.
int multi_threading_compatible()
This function is called to retrieve the multi-threading compatibility.
int global_parameter4_get_command(CalloutHandle &handle)
Handler for remote-global-parameter4-get command.
int option4_pool_del_command(CalloutHandle &handle)
Handler for remote-option4-pool-del command.
int client_class6_del_command(CalloutHandle &handle)
Handler for remote-class6-del command.
int option_def6_get_command(CalloutHandle &handle)
Handler for remote-option-def6-get command.
int option4_subnet_del_command(CalloutHandle &handle)
Handler for remote-option4-subnet-del command.
int option6_pool_del_command(CalloutHandle &handle)
Handler for remote-option6-pool-del command.
int option4_global_get_all_command(CalloutHandle &handle)
Handler for remote-option4-global-get-all command.
int option6_pd_pool_set_command(CalloutHandle &handle)
Handler for remote-option6-pd-pool-set command.
int subnet6_list_command(CalloutHandle &handle)
Handler for remote-subnet6-list command.
int client_class4_get_all_command(CalloutHandle &handle)
Handler for remote-class4-get-all command.
int global_parameter4_del_command(CalloutHandle &handle)
Handler for remote-global-parameter4-del command.
int option_def6_del_command(CalloutHandle &handle)
Handler for remote-option-def6-del command.
int option4_pool_set_command(CalloutHandle &handle)
Handler for remote-option4-pool-set command.
int server4_set_command(CalloutHandle &handle)
Handler for remote-server4-set command.
int subnet4_get_by_prefix_command(CalloutHandle &handle)
Handler for remote-subnet4-get-by-prefix command.
int option6_global_get_command(CalloutHandle &handle)
Handler for remote-option6-global-get command.
int server6_get_command(CalloutHandle &handle)
Handler for remote-server6-get command.
int subnet4_del_by_prefix_command(CalloutHandle &handle)
Handler for remote-subnet4-del-by-prefix command.
int global_parameter4_get_all_command(CalloutHandle &handle)
Handler for remote-global-parameter4-get-all command.
int option4_network_set_command(CalloutHandle &handle)
Handler for remote-option4-network-set command.
int subnet6_set_command(CalloutHandle &handle)
Handler for remote-subnet6-set command.
int network4_list_command(CalloutHandle &handle)
Handler for remote-network4-list command.
int option6_pd_pool_del_command(CalloutHandle &handle)
Handler for remote-option6-pd-pool-del command.
int client_class4_get_command(CalloutHandle &handle)
Handler for remote-class4-get command.
int subnet6_del_by_prefix_command(CalloutHandle &handle)
Handler for remote-subnet6-del-by-prefix command.
int option_def4_get_all_command(CalloutHandle &handle)
Handler for remote-option-def4-get-all command.
int option6_network_set_command(CalloutHandle &handle)
Handler for remote-option6-network-set command.
int option6_pool_set_command(CalloutHandle &handle)
Handler for remote-option6-pool-set command.
int global_parameter6_set_command(CalloutHandle &handle)
Handler for remote-global-parameter6-set command.
int unload()
This function is called when the library is unloaded.
int option4_global_set_command(CalloutHandle &handle)
Handler for remote-option4-global-set command.
int client_class4_del_command(CalloutHandle &handle)
Handler for remote-class4-del command.
int server4_get_command(CalloutHandle &handle)
Handler for remote-server4-get command.
int option_def6_set_command(CalloutHandle &handle)
Handler for remote-option-def6-set command.
int option6_global_set_command(CalloutHandle &handle)
Handler for remote-option6-global-set command.
int option6_subnet_del_command(CalloutHandle &handle)
Handler for remote-option6-subnet-del command.
int option4_subnet_set_command(CalloutHandle &handle)
Handler for remote-option4-subnet-set command.
int client_class4_set_command(CalloutHandle &handle)
Handler for remote-class4-set command.
int subnet4_set_command(CalloutHandle &handle)
Handler for remote-subnet4-set command.
int network6_del_command(CalloutHandle &handle)
Handler for remote-network6-del command.
int global_parameter6_del_command(CalloutHandle &handle)
Handler for remote-global-parameter6-del command.
int server6_set_command(CalloutHandle &handle)
Handler for remote-server6-set command.
int network4_get_command(CalloutHandle &handle)
Handler for remote-network4-get command.
int option_def4_get_command(CalloutHandle &handle)
Handler for remote-option-def4-get command.
int client_class6_set_command(CalloutHandle &handle)
Handler for remote-class4-set command.
int subnet4_del_by_id_command(CalloutHandle &handle)
Handler for remote-subnet4-del-by-id command.
int subnet6_get_by_id_command(CalloutHandle &handle)
Handler for remote-subnet6-get-by-id command.
int load(LibraryHandle &handle)
This function is called when the library is loaded.
int network4_del_command(CalloutHandle &handle)
Handler for remote-network4-del command.
int network4_set_command(CalloutHandle &handle)
Handler for remote-network4-set command.
A generic exception that is thrown when an unexpected error condition occurs.
uint16_t getFamily() const
Returns address family.
static CfgMgr & instance()
returns a single instance of Configuration Manager
Per-packet callout handle.
void registerCommandCallout(const std::string &command_name, CalloutPtr callout)
Register control command handler.
static std::string getProcName()
returns the process name This value is used as when forming the default PID file name
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.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
const isc::log::MessageID CB_CMDS_NETWORK4_LIST_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_PD_POOL_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET6_DEL_BY_ID_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER4_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER4_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER6_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_GLOBAL_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET6_GET_BY_ID_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER6_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET4_DEL_BY_ID_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET4_LIST_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_GLOBAL_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET6_GET_BY_PREFIX_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET6_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_INIT_OK
const isc::log::MessageID CB_CMDS_CLASS4_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_POOL_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_NETWORK_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_DEINIT_OK
const isc::log::MessageID CB_CMDS_SERVER4_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF4_SET_HANDLER_FAILED
ConfigCmdsDhcp6ImplPtr impl6
const isc::log::MessageID CB_CMDS_OPTION4_GLOBAL_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_GLOBAL_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_CLASS6_GET_ALL_HANDLER_FAILED
boost::shared_ptr< ConfigCmdsDhcp6Impl > ConfigCmdsDhcp6ImplPtr
Pointer to the ConfigCmdsDhcp6Impl.
const isc::log::MessageID CB_CMDS_OPTION_DEF4_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK6_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET4_DEL_BY_PREFIX_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_GLOBAL_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF4_GET_HANDLER_FAILED
boost::shared_ptr< ConfigCmdsDhcp4Impl > ConfigCmdsDhcp4ImplPtr
Pointer to the ConfigCmdsDhcp4Impl.
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER6_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_SUBNET_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER4_SET_HANDLER_FAILED
isc::log::Logger cb_cmds_logger("cb-cmds-hooks")
const isc::log::MessageID CB_CMDS_CLASS6_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_SUBNET_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_NETWORK_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF6_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER4_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER4_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET6_LIST_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF4_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF6_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_SUBNET_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET6_DEL_BY_PREFIX_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_CLASS4_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK6_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK4_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_GLOBAL_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF6_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_POOL_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK4_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_CLASS4_GET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_GLOBAL_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET4_GET_BY_ID_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET4_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_PD_POOL_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_NETWORK_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_SUBNET_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SUBNET4_GET_BY_PREFIX_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK6_LIST_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER6_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK4_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER4_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION6_GLOBAL_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_POOL_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER6_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_GLOBAL_PARAMETER4_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_CLASS6_SET_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER6_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_CLASS4_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_CLASS6_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION_DEF6_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER6_GET_HANDLER_FAILED
ConfigCmdsDhcp4ImplPtr impl4
const isc::log::MessageID CB_CMDS_OPTION6_NETWORK_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_OPTION4_POOL_DEL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_SERVER6_GET_ALL_HANDLER_FAILED
const isc::log::MessageID CB_CMDS_NETWORK6_SET_HANDLER_FAILED
const int CONTROL_RESULT_ERROR
Status code indicating a general failure.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
Defines the logger used by the top-level component of kea-lfc.