76 mgr->processPktEventStack(query, response, subnet);
77 }
catch (
const std::exception& ex) {
79 .arg(query->getLabel())
108 mgr->processPktEventStack(query, response, subnet);
109 }
catch (
const std::exception& ex) {
111 .arg(query->getLabel())
125 return (
mgr->perfmonControlHandler(handle));
135 return (
mgr->perfmonGetAllDurationsHandler(handle));
147 if (family == AF_INET) {
148 if (proc_name !=
"kea-dhcp4") {
150 <<
", expected kea-dhcp4");
152 }
else if (proc_name !=
"kea-dhcp6") {
154 <<
", expected kea-dhcp6");
162 mgr->configure(json);
167 }
catch (
const std::exception& ex) {
A generic exception that is thrown when an unexpected error condition occurs.
static CfgMgr & instance()
returns a single instance of Configuration Manager
static IfaceMgr & instance()
IfaceMgr is a singleton class.
Per-packet callout handle.
CalloutNextStep
Specifies allowed next steps.
@ NEXT_STEP_DROP
drop the packet
@ NEXT_STEP_SKIP
skip the next processing step
CalloutNextStep getStatus() const
Returns the next processing step.
void getArgument(const std::string &name, T &value) const
Get argument.
void registerCommandCallout(const std::string &command_name, CalloutPtr callout)
Register control command handler.
isc::data::ConstElementPtr getParameters()
Get configuration parameter common code.
Singleton which provides overall configuration, control, and state of the PerfMon hook 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.
#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.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
const int DBGLVL_TRACE_BASIC
Trace basic operations.
const int DBGLVL_TRACE_DETAIL
Trace detailed operations.
isc::log::Logger perfmon_logger("perfmon-hooks")
PerfMonMgrPtr mgr
PerfMonMgr singleton.
boost::shared_ptr< PerfMonMgr > PerfMonMgrPtr
Defines a shared pointer to a PerfMonMgr.
Defines the logger used by the top-level component of kea-lfc.
int dhcp6_srv_configured(CalloutHandle &)
int dhcp4_srv_configured(CalloutHandle &)
int perfmon_control(CalloutHandle &handle)
This is a command callout for 'perfmon-control' command.
int multi_threading_compatible()
This function is called to retrieve the multi-threading compatibility.
int pkt6_send(CalloutHandle &handle)
This callout is called at the "pkt6_send" hook.
int pkt4_send(CalloutHandle &handle)
This callout is called at the "pkt4_send" hook.
int unload()
This function is called when the library is unloaded.
int load(LibraryHandle &handle)
This function is called when the library is loaded.
int perfmon_get_all_durations(CalloutHandle &handle)
This is a command callout for 'perfmon-get-all-durations' command.
const isc::log::MessageID PERFMON_INIT_OK
const isc::log::MessageID PERFMON_DHCP6_PKT_PROCESS_ERROR
const isc::log::MessageID PERFMON_INIT_FAILED
const isc::log::MessageID PERFMON_DHCP4_PKT_PROCESS_ERROR
const isc::log::MessageID PERFMON_DEINIT_OK
const isc::log::MessageID PERFMON_DHCP6_SOCKET_RECEIVED_TIME_SUPPORT
const isc::log::MessageID PERFMON_DHCP4_SOCKET_RECEIVED_TIME_SUPPORT