55 return (
hcptr->cacheSizeHandler(handle));
65 return (
hcptr->cacheClearHandler(handle));
75 return (
hcptr->cacheFlushHandler(handle));
85 return (
hcptr->cacheGetHandler(handle));
95 return (
hcptr->cacheGetByIdHandler(handle));
105 return (
hcptr->cacheInsertHandler(handle));
115 return (
hcptr->cacheWriteHandler(handle));
125 return (
hcptr->cacheLoadHandler(handle));
135 return (
hcptr->cacheRemoveHandler(handle));
147 if (family == AF_INET) {
148 if (proc_name !=
"kea-dhcp4") {
150 <<
", expected kea-dhcp4");
153 if (proc_name !=
"kea-dhcp6") {
155 <<
", expected kea-dhcp6");
174 }
catch (
const std::exception& ex) {
A generic exception that is thrown when an unexpected error condition occurs.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
uint16_t getFamily() const
Returns address family.
static CfgMgr & instance()
returns a single instance of Configuration Manager
static bool deregisterFactory(const std::string &db_type, bool no_log=false)
Deregister a host data source factory.
static bool registerFactory(const std::string &db_type, const Factory &factory, bool no_log=false, DBVersion db_version=DBVersion())
Register a host data source factory.
static bool delBackend(const std::string &db_type)
Delete an alternate host backend (aka host data source).
static void addBackend(const std::string &access)
Add an alternate host backend (aka host data source).
static HostMgr & instance()
Returns a sole instance of the HostMgr.
Per-packet callout handle.
isc::data::ConstElementPtr getParameter(const std::string &name)
Returns configuration parameter for the library.
void registerCommandCallout(const std::string &command_name, CalloutPtr callout)
Register control command handler.
Host Cache implementation.
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 cache_load(CalloutHandle &handle)
This is a command callout for 'cache-load' command.
int cache_remove(CalloutHandle &handle)
This is a command callout for 'cache-remove' command.
int cache_get(CalloutHandle &handle)
This is a command callout for 'cache-get' command.
int multi_threading_compatible()
This function is called to retrieve the multi-threading compatibility.
int cache_flush(CalloutHandle &handle)
This is a command callout for 'cache-flush' command.
int unload()
This function is called when the library is unloaded.
int cache_insert(CalloutHandle &handle)
This is a command callout for 'cache-insert' command.
int cache_get_by_id(CalloutHandle &handle)
This is a command callout for 'cache-get-by-id' command.
int cache_clear(CalloutHandle &handle)
This is a command callout for 'cache-clear' command.
int load(LibraryHandle &handle)
This function is called when the library is loaded.
int cache_write(CalloutHandle &handle)
This is a command callout for 'cache-write' command.
int cache_size(CalloutHandle &handle)
This is a command callout for 'cache-size' command.
#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 int CONTROL_RESULT_ERROR
Status code indicating a general failure.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< BaseHostDataSource > HostDataSourcePtr
HostDataSource pointer.
const isc::log::MessageID HOST_CACHE_CONFIGURATION_FAILED
boost::shared_ptr< HostCache > HostCachePtr
Pointer to the Host Cache hooks library implementation.
const isc::log::MessageID HOST_CACHE_INIT_OK
const isc::log::MessageID HOST_CACHE_DEINIT_OK
HostDataSourcePtr factory(const DatabaseConnection::ParameterMap &)
Host Cache factory.
HostCachePtr hcptr
Pointer to the Host Cache instance.
isc::log::Logger host_cache_logger("host-cache-hooks")
Host Cache Logger.
Defines the logger used by the top-level component of kea-lfc.