Kea  1.9.9-git
flex_option_callouts.cc File Reference
#include <config.h>
#include <flex_option.h>
#include <flex_option_log.h>
#include <cc/command_interpreter.h>
#include <hooks/hooks.h>
#include <dhcp/pkt4.h>
#include <dhcp/pkt6.h>
+ Include dependency graph for flex_option_callouts.cc:

Go to the source code of this file.

Namespaces

 isc
 Defines the logger used by the top-level component of kea-dhcp-ddns.
 
 isc::flex_option
 

Functions

int load (LibraryHandle &handle)
 This function is called when the library is loaded. More...
 
int multi_threading_compatible ()
 This function is called to retrieve the multi-threading compatibility. More...
 
int pkt4_send (CalloutHandle &handle)
 This callout is called at the "pkt4_send" hook. More...
 
int pkt6_send (CalloutHandle &handle)
 This callout is called at the "pkt6_send" hook. More...
 
int unload ()
 This function is called when the library is unloaded. More...
 

Variables

FlexOptionImplPtr isc::flex_option::impl
 

Function Documentation

int load ( LibraryHandle handle)

This function is called when the library is loaded.

Parameters
handlelibrary handle
Returns
0 when initialization is successful, 1 otherwise

Definition at line 121 of file flex_option_callouts.cc.

References FLEX_OPTION_LOAD_ERROR, isc::flex_option::flex_option_logger, isc::hooks::LibraryHandle::getParameter(), isc::flex_option::impl, and LOG_ERROR.

+ Here is the call graph for this function:

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 147 of file flex_option_callouts.cc.

int pkt4_send ( CalloutHandle handle)

This callout is called at the "pkt4_send" hook.

It retrieves v4 query and response packets, and then adds, supersedes or removes option values in the response according to expressions evaluated on the query.

Parameters
handleCalloutHandle.
Returns
0 upon success, non-zero otherwise

Definition at line 44 of file flex_option_callouts.cc.

References isc::flex_option::flex_option_logger, FLEX_OPTION_PROCESS_ERROR, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), isc::flex_option::impl, isc_throw, and LOG_ERROR.

+ Here is the call graph for this function:

int pkt6_send ( CalloutHandle handle)

This callout is called at the "pkt6_send" hook.

It retrieves v6 query and response packets, and then adds, supersedes or removes option values in the response according to expressions evaluated on the query.

Parameters
handleCalloutHandle.
Returns
0 upon success, non-zero otherwise

Definition at line 85 of file flex_option_callouts.cc.

References isc::flex_option::flex_option_logger, FLEX_OPTION_PROCESS_ERROR, isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), isc::flex_option::impl, isc_throw, and LOG_ERROR.

+ Here is the call graph for this function:

int unload ( )

This function is called when the library is unloaded.

Returns
always 0.

Definition at line 138 of file flex_option_callouts.cc.

References isc::flex_option::flex_option_logger, FLEX_OPTION_UNLOAD, isc::flex_option::impl, and LOG_INFO.