38 return (
host_cmds.reservationAddHandler(handle));
49 return (
host_cmds.reservationGetHandler(handle));
60 return (
host_cmds.reservationGetByAddressHandler(handle));
71 return (
host_cmds.reservationDelHandler(handle));
82 return (
host_cmds.reservationGetAllHandler(handle));
93 return (
host_cmds.reservationGetPageHandler(handle));
104 return (
host_cmds.reservationGetByHostnameHandler(handle));
115 return (
host_cmds.reservationGetByIdHandler(handle));
127 return (
host_cmds.reservationUpdateHandler(handle));
139 if (family == AF_INET) {
140 if (proc_name !=
"kea-dhcp4") {
142 <<
", expected kea-dhcp4");
145 if (proc_name !=
"kea-dhcp6") {
147 <<
", expected kea-dhcp6");
166 }
catch (
const std::exception& ex) {
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.
A wrapper class that provides handlers for the commands supported by this hooks library.
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.
int reservation_add(CalloutHandle &handle)
This is a command callout for 'reservation-add' command.
int reservation_get(CalloutHandle &handle)
This is a command callout for 'reservation-get' command.
int reservation_get_page(CalloutHandle &handle)
This is a command callout for 'reservation-get-page' command.
int multi_threading_compatible()
This function is called to retrieve the multi-threading compatibility.
int reservation_get_all(CalloutHandle &handle)
This is a command callout for 'reservation-get-all' command.
int reservation_get_by_address(CalloutHandle &handle)
This is a command callout for 'reservation-get-by-address' command.
int unload()
This function is called when the library is unloaded.
int reservation_update(CalloutHandle &handle)
This is a command callout for the reservation-update command.
int reservation_get_by_id(CalloutHandle &handle)
This is a command callout for 'reservation-get-by-id' command.
int reservation_del(CalloutHandle &handle)
This is a command callout for 'reservation-del' command.
int reservation_get_by_hostname(CalloutHandle &handle)
This is a command callout for 'reservation-get-by-hostname' command.
int load(LibraryHandle &handle)
This function is called when the library is loaded.
const isc::log::MessageID HOST_CMDS_INIT_FAILED
const isc::log::MessageID HOST_CMDS_INIT_OK
const isc::log::MessageID HOST_CMDS_DEINIT_OK
#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.
isc::log::Logger host_cmds_logger("host-cmds-hooks")