Kea 3.1.1
host_cache_callout.cc File Reference
#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>
+ Include dependency graph for host_cache_callout.cc:

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.
 

Function Documentation

◆ cache_clear()

int cache_clear ( CalloutHandle & handle)

This is a command callout for 'cache-clear' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 64 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_flush()

int cache_flush ( CalloutHandle & handle)

This is a command callout for 'cache-flush' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 74 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_get()

int cache_get ( CalloutHandle & handle)

This is a command callout for 'cache-get' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 84 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_get_by_id()

int cache_get_by_id ( CalloutHandle & handle)

This is a command callout for 'cache-get-by-id' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 94 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_insert()

int cache_insert ( CalloutHandle & handle)

This is a command callout for 'cache-insert' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 104 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_load()

int cache_load ( CalloutHandle & handle)

This is a command callout for 'cache-load' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 124 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_remove()

int cache_remove ( CalloutHandle & handle)

This is a command callout for 'cache-remove' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 134 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_size()

int cache_size ( CalloutHandle & handle)

This is a command callout for 'cache-size' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 54 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ cache_write()

int cache_write ( CalloutHandle & handle)

This is a command callout for 'cache-write' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 otherwise.

Definition at line 114 of file host_cache_callout.cc.

References isc::host_cache::hcptr.

Referenced by load().

◆ load()

◆ multi_threading_compatible()

int multi_threading_compatible ( )

This function is called to retrieve the multi-threading compatibility.

Returns
1 which means compatible with multi-threading.

Definition at line 198 of file host_cache_callout.cc.

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
0 if deregistration was successful, 1 otherwise

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.

+ Here is the call graph for this function: