Kea 3.1.9
lease_cmds_callouts.cc File Reference
#include <config.h>
#include <lease_cmds.h>
#include <lease_cmds_log.h>
#include <binding_variables.h>
#include <cc/command_interpreter.h>
#include <dhcpsrv/cfgmgr.h>
#include <hooks/hooks.h>
#include <process/daemon.h>
#include <sflq_cmds.h>
Include dependency graph for lease_cmds_callouts.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::lease_cmds

Functions

int lease4_add (CalloutHandle &handle)
 This is a command callout for 'lease4-add' command.
int lease4_del (CalloutHandle &handle)
 This is a command callout for 'lease4-del' command.
int lease4_get (CalloutHandle &handle)
 This is a command callout for 'lease4-get' command.
int lease4_get_all (CalloutHandle &handle)
 This is a command callout for 'lease4-get-all' command.
int lease4_get_by_client_id (CalloutHandle &handle)
 This is a command callout for 'lease4-get-by-client-id' command.
int lease4_get_by_hostname (CalloutHandle &handle)
 This is a command callout for 'lease4-get-by-hostname' command.
int lease4_get_by_hw_address (CalloutHandle &handle)
 This is a command callout for 'lease4-get-by-hw-address' command.
int lease4_get_by_state (CalloutHandle &handle)
 This is a command callout for 'lease4-get-by-state' command.
int lease4_get_page (CalloutHandle &handle)
 This is a command callout for 'lease4-get-page' command.
int lease4_offer (CalloutHandle &handle)
 lease4_offer callout implementation.
int lease4_resend_ddns (CalloutHandle &handle)
 This is a command callout for 'lease4-resend-ddns' command.
int lease4_update (CalloutHandle &handle)
 This is a command callout for 'lease4-update' command.
int lease4_wipe (CalloutHandle &handle)
 This is a command callout for 'lease4-wipe' command.
int lease4_write (CalloutHandle &handle)
 This is a command callout for 'lease4-write' command.
int lease6_add (CalloutHandle &handle)
 This is a command callout for 'lease6-add' command.
int lease6_bulk_apply (CalloutHandle &handle)
 This is a command callout for 'lease6-bulk-apply' command.
int lease6_del (CalloutHandle &handle)
 This is a command callout for 'lease6-del' command.
int lease6_get (CalloutHandle &handle)
 This is a command callout for 'lease6-get' command.
int lease6_get_all (CalloutHandle &handle)
 This is a command callout for 'lease6-get-all' command.
int lease6_get_by_duid (CalloutHandle &handle)
 This is a command callout for 'lease6-get-by-duid' command.
int lease6_get_by_hostname (CalloutHandle &handle)
 This is a command callout for 'lease6-get-by-hostname' command.
int lease6_get_by_hw_address (CalloutHandle &handle)
 This is a command callout for 'lease6-get-by-hw-address' command.
int lease6_get_by_state (CalloutHandle &handle)
 This is a command callout for 'lease6-get-by-state' command.
int lease6_get_page (CalloutHandle &handle)
 This is a command callout for 'lease6-get-page' command.
int lease6_resend_ddns (CalloutHandle &handle)
 This is a command callout for 'lease6-resend-ddns' command.
int lease6_update (CalloutHandle &handle)
 This is a command callout for 'lease6-update' command.
int lease6_wipe (CalloutHandle &handle)
 This is a command callout for 'lease6-wipe' command.
int lease6_write (CalloutHandle &handle)
 This is a command callout for 'lease6-write' command.
int leases4_committed (CalloutHandle &handle)
 leases4_committed callout implementation.
int leases6_committed (CalloutHandle &handle)
 leases6_committed callout implementation.
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 sflq_pool4_del (CalloutHandle &handle)
 This is a command callout for 'sflq-pool4-del' command.
int sflq_pool4_get_all (CalloutHandle &handle)
 This is a command callout for 'sflq-pool4-get-all' command.
int sflq_pool4_get_by_range (CalloutHandle &handle)
 This is a command callout for 'sflq-pool4-get-by-range' command.
int sflq_pool4_get_by_subnet (CalloutHandle &handle)
 This is a command callout for 'sflq-pool4-get-by-subnet' command.
int sflq_pool4_rebuild (CalloutHandle &handle)
 This is a command callout for 'sflq-pool4-rebuild' command.
int sflq_pool6_del (CalloutHandle &handle)
 This is a command callout for 'sflq-pool6-del' command.
int sflq_pool6_get_all (CalloutHandle &handle)
 This is a command callout for 'sflq-pool6-get-all' command.
int sflq_pool6_get_by_range (CalloutHandle &handle)
 This is a command callout for 'sflq-pool6-get-by-range' command.
int sflq_pool6_get_by_subnet (CalloutHandle &handle)
 This is a command callout for 'sflq-pool6-get-by-subnet' command.
int sflq_pool6_rebuild (CalloutHandle &handle)
 This is a command callout for 'sflq-pool6-rebuild' command.
int unload ()
 This function is called when the library is unloaded.

Variables

BindingVariableMgrPtr isc::lease_cmds::binding_var_mgr
 Singleton that manages configured binding variables.

Function Documentation

◆ lease4_add()

int lease4_add ( CalloutHandle & handle)

This is a command callout for 'lease4-add' 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 47 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_del()

int lease4_del ( CalloutHandle & handle)

This is a command callout for 'lease4-del' 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 234 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get()

int lease4_get ( CalloutHandle & handle)

This is a command callout for 'lease4-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 80 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get_all()

int lease4_get_all ( CalloutHandle & handle)

This is a command callout for 'lease4-get-all' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 102 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get_by_client_id()

int lease4_get_by_client_id ( CalloutHandle & handle)

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

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 168 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get_by_hostname()

int lease4_get_by_hostname ( CalloutHandle & handle)

This is a command callout for 'lease4-get-by-hostname' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 212 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get_by_hw_address()

int lease4_get_by_hw_address ( CalloutHandle & handle)

This is a command callout for 'lease4-get-by-hw-address' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 146 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get_by_state()

int lease4_get_by_state ( CalloutHandle & handle)

This is a command callout for 'lease4-get-by-state' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 190 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_get_page()

int lease4_get_page ( CalloutHandle & handle)

This is a command callout for 'lease4-get-page' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 124 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_offer()

int lease4_offer ( CalloutHandle & handle)

lease4_offer callout implementation.

Parameters
handlecallout handle.

Definition at line 548 of file lease_cmds_callouts.cc.

References isc::lease_cmds::binding_var_mgr, isc::hooks::CalloutHandle::getStatus(), LEASE_CMDS_LEASE4_OFFER_FAILED, isc::lease_cmds::lease_cmds_logger, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, and CalloutHandle::NEXT_STEP_SKIP.

Here is the call graph for this function:

◆ lease4_resend_ddns()

int lease4_resend_ddns ( CalloutHandle & handle)

This is a command callout for 'lease4-resend-ddns' 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 300 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_update()

int lease4_update ( CalloutHandle & handle)

This is a command callout for 'lease4-update' 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 256 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_wipe()

int lease4_wipe ( CalloutHandle & handle)

This is a command callout for 'lease4-wipe' 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 278 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease4_write()

int lease4_write ( CalloutHandle & handle)

This is a command callout for 'lease4-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 322 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_add()

int lease6_add ( CalloutHandle & handle)

This is a command callout for 'lease6-add' 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 58 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_bulk_apply()

int lease6_bulk_apply ( CalloutHandle & handle)

This is a command callout for 'lease6-bulk-apply' 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 69 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_del()

int lease6_del ( CalloutHandle & handle)

This is a command callout for 'lease6-del' 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 245 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get()

int lease6_get ( CalloutHandle & handle)

This is a command callout for 'lease6-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 91 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get_all()

int lease6_get_all ( CalloutHandle & handle)

This is a command callout for 'lease6-get-all' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 113 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get_by_duid()

int lease6_get_by_duid ( CalloutHandle & handle)

This is a command callout for 'lease6-get-by-duid' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 179 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get_by_hostname()

int lease6_get_by_hostname ( CalloutHandle & handle)

This is a command callout for 'lease6-get-by-hostname' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 223 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get_by_hw_address()

int lease6_get_by_hw_address ( CalloutHandle & handle)

This is a command callout for 'lease6-get-by-hw-address' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 157 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get_by_state()

int lease6_get_by_state ( CalloutHandle & handle)

This is a command callout for 'lease6-get-by-state' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 201 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_get_page()

int lease6_get_page ( CalloutHandle & handle)

This is a command callout for 'lease6-get-page' command.

Parameters
handleCallout handle used to retrieve a command and provide a response.
Returns
0 if this callout has been invoked successfully, 1 if an error occurs, 3 if no leases are returned.

Definition at line 135 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_resend_ddns()

int lease6_resend_ddns ( CalloutHandle & handle)

This is a command callout for 'lease6-resend-ddns' 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 311 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_update()

int lease6_update ( CalloutHandle & handle)

This is a command callout for 'lease6-update' 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 267 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_wipe()

int lease6_wipe ( CalloutHandle & handle)

This is a command callout for 'lease6-wipe' 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 289 of file lease_cmds_callouts.cc.

Referenced by load().

◆ lease6_write()

int lease6_write ( CalloutHandle & handle)

This is a command callout for 'lease6-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 333 of file lease_cmds_callouts.cc.

Referenced by load().

◆ leases4_committed()

int leases4_committed ( CalloutHandle & handle)

leases4_committed callout implementation.

Parameters
handlecallout handle.

Definition at line 570 of file lease_cmds_callouts.cc.

References isc::lease_cmds::binding_var_mgr, isc::hooks::CalloutHandle::getStatus(), LEASE_CMDS_LEASES4_COMMITTED_FAILED, isc::lease_cmds::lease_cmds_logger, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, and CalloutHandle::NEXT_STEP_SKIP.

Here is the call graph for this function:

◆ leases6_committed()

int leases6_committed ( CalloutHandle & handle)

leases6_committed callout implementation.

Parameters
handlecallout handle.

Definition at line 592 of file lease_cmds_callouts.cc.

References isc::lease_cmds::binding_var_mgr, isc::hooks::CalloutHandle::getStatus(), LEASE_CMDS_LEASES6_COMMITTED_FAILED, isc::lease_cmds::lease_cmds_logger, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, and CalloutHandle::NEXT_STEP_SKIP.

Here is the call graph for this function:

◆ 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 541 of file lease_cmds_callouts.cc.

◆ sflq_pool4_del()

int sflq_pool4_del ( CalloutHandle & handle)

This is a command callout for 'sflq-pool4-del' 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 388 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool4DelHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool4_get_all()

int sflq_pool4_get_all ( CalloutHandle & handle)

This is a command callout for 'sflq-pool4-get-all' 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 355 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool4GetAllHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool4_get_by_range()

int sflq_pool4_get_by_range ( CalloutHandle & handle)

This is a command callout for 'sflq-pool4-get-by-range' 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 377 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool4GetByRangeHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool4_get_by_subnet()

int sflq_pool4_get_by_subnet ( CalloutHandle & handle)

This is a command callout for 'sflq-pool4-get-by-subnet' 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 366 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool4GetBySubnetHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool4_rebuild()

int sflq_pool4_rebuild ( CalloutHandle & handle)

This is a command callout for 'sflq-pool4-rebuild' 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 344 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool4RebuildHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool6_del()

int sflq_pool6_del ( CalloutHandle & handle)

This is a command callout for 'sflq-pool6-del' 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 443 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool6DelHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool6_get_all()

int sflq_pool6_get_all ( CalloutHandle & handle)

This is a command callout for 'sflq-pool6-get-all' 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 410 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool6GetAllHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool6_get_by_range()

int sflq_pool6_get_by_range ( CalloutHandle & handle)

This is a command callout for 'sflq-pool6-get-by-range' 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 432 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool6GetByRangeHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool6_get_by_subnet()

int sflq_pool6_get_by_subnet ( CalloutHandle & handle)

This is a command callout for 'sflq-pool6-get-by-subnet' 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 421 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool6GetBySubnetHandler().

Referenced by load().

Here is the call graph for this function:

◆ sflq_pool6_rebuild()

int sflq_pool6_rebuild ( CalloutHandle & handle)

This is a command callout for 'sflq-pool6-rebuild' 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 399 of file lease_cmds_callouts.cc.

References isc::lease_cmds::SflqCmds::sflqPool6RebuildHandler().

Referenced by load().

Here is the call graph for this function:

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
0 if deregistration was successful, 1 otherwise

Definition at line 533 of file lease_cmds_callouts.cc.

References LEASE_CMDS_DEINIT_OK, isc::lease_cmds::lease_cmds_logger, and LOG_INFO.