![]() |
Kea 3.1.1
|
#include <config.h>
#include <host_cache.h>
#include <host_cache_log.h>
#include <cc/command_interpreter.h>
#include <hooks/hooks.h>
#include <dhcpsrv/cfgmgr.h>
#include <dhcpsrv/host_mgr.h>
#include <dhcpsrv/host_data_source_factory.h>
#include <process/daemon.h>
Go to the source code of this file.
Namespaces | |
namespace | isc |
Defines the logger used by the top-level component of kea-lfc. | |
namespace | isc::host_cache |
Functions | |
int | cache_clear (CalloutHandle &handle) |
This is a command callout for 'cache-clear' command. | |
int | cache_flush (CalloutHandle &handle) |
This is a command callout for 'cache-flush' command. | |
int | cache_get (CalloutHandle &handle) |
This is a command callout for 'cache-get' command. | |
int | cache_get_by_id (CalloutHandle &handle) |
This is a command callout for 'cache-get-by-id' command. | |
int | cache_insert (CalloutHandle &handle) |
This is a command callout for 'cache-insert' command. | |
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_size (CalloutHandle &handle) |
This is a command callout for 'cache-size' command. | |
int | cache_write (CalloutHandle &handle) |
This is a command callout for 'cache-write' command. | |
HostDataSourcePtr | isc::host_cache::factory (const DatabaseConnection::ParameterMap &) |
Host Cache factory. | |
int | load (LibraryHandle &handle) |
This function is called when the library is loaded. | |
int | multi_threading_compatible () |
This function is called to retrieve the multi-threading compatibility. | |
int | unload () |
This function is called when the library is unloaded. | |
Variables | |
HostCachePtr | isc::host_cache::hcptr |
Pointer to the Host Cache instance. | |
int cache_clear | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-clear' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 64 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_flush | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-flush' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 74 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_get | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-get' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 84 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_get_by_id | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-get-by-id' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 94 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_insert | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-insert' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 104 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_load | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-load' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 124 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_remove | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-remove' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 134 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_size | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-size' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 54 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int cache_write | ( | CalloutHandle & | handle | ) |
This is a command callout for 'cache-write' command.
handle | Callout handle used to retrieve a command and provide a response. |
Definition at line 114 of file host_cache_callout.cc.
References isc::host_cache::hcptr.
Referenced by load().
int load | ( | LibraryHandle & | handle | ) |
This function is called when the library is loaded.
handle | library handle |
Definition at line 142 of file host_cache_callout.cc.
References isc::dhcp::HostMgr::addBackend(), cache_clear(), cache_flush(), cache_get(), cache_get_by_id(), cache_insert(), cache_load(), cache_remove(), cache_size(), cache_write(), isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::host_cache::factory(), isc::dhcp::CfgMgr::getFamily(), isc::hooks::LibraryHandle::getParameter(), isc::process::Daemon::getProcName(), isc::host_cache::hcptr, isc::host_cache::HOST_CACHE_CONFIGURATION_FAILED, isc::host_cache::HOST_CACHE_INIT_OK, isc::host_cache::host_cache_logger, isc::dhcp::CfgMgr::instance(), isc::dhcp::HostMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, isc::hooks::LibraryHandle::registerCommandCallout(), and isc::dhcp::HostDataSourceFactory::registerFactory().
int multi_threading_compatible | ( | ) |
This function is called to retrieve the multi-threading compatibility.
Definition at line 198 of file host_cache_callout.cc.
int unload | ( | ) |
This function is called when the library is unloaded.
Definition at line 187 of file host_cache_callout.cc.
References isc::config::CONTROL_RESULT_SUCCESS, isc::dhcp::HostMgr::delBackend(), isc::dhcp::HostDataSourceFactory::deregisterFactory(), isc::host_cache::hcptr, isc::host_cache::HOST_CACHE_DEINIT_OK, isc::host_cache::host_cache_logger, and LOG_INFO.