![]() |
Kea 3.1.1
|
#include <config.h>
#include <database/audit_entry.h>
#include <ddns_tuning.h>
#include <ddns_tuning_log.h>
#include <cc/command_interpreter.h>
#include <dhcp/option_string.h>
#include <dhcp/option4_client_fqdn.h>
#include <dhcp/option6_client_fqdn.h>
#include <dhcpsrv/cfgmgr.h>
#include <dhcpsrv/subnet.h>
#include <dhcp/pkt4.h>
#include <dhcp/pkt6.h>
#include <hooks/hooks.h>
#include <process/daemon.h>
#include <string>
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::ddns_tuning |
Functions | |
int | cb4_updated (CalloutHandle &handle) |
This callout is called at the "cb4_updated" hook. | |
int | cb6_updated (CalloutHandle &handle) |
This callout is called at the "cb6_updated" hook. | |
int | ddns4_update (CalloutHandle &handle) |
This callout is called at the "ddns4_update" hook. | |
int | ddns6_update (CalloutHandle &handle) |
This callout is called at the "ddns6_update" hook. | |
int | dhcp4_srv_configured (CalloutHandle &handle) |
This callout is called at the "dhcp4_srv_configured" hook. | |
int | dhcp6_srv_configured (CalloutHandle &handle) |
This callout is called at the "dhcp6_srv_configured" hook. | |
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 | |
DdnsTuningImplPtr | isc::ddns_tuning::impl |
int cb4_updated | ( | CalloutHandle & | handle | ) |
This callout is called at the "cb4_updated" hook.
If it detects that any subnets were altered by the update it replaces the subnet expression cache contents with new expressions for the subnets contained in current server configuration. If any of the subnet expressions fail to parse this function will return a non-zero value.
handle | CalloutHandle. |
Definition at line 57 of file ddns_tuning_callouts.cc.
References isc::hooks::CalloutHandle::getArgument(), isc::ddns_tuning::impl, and isc::dhcp::CfgMgr::instance().
int cb6_updated | ( | CalloutHandle & | handle | ) |
This callout is called at the "cb6_updated" hook.
If it detects that any subnets were altered by the update it replaces the subnet expression cache contents with new expressions for the subnets contained in current server configuration. If any of the subnet expressions fail to parse this function will return a non-zero value.
handle | CalloutHandle. |
Definition at line 189 of file ddns_tuning_callouts.cc.
References isc::hooks::CalloutHandle::getArgument(), isc::ddns_tuning::impl, and isc::dhcp::CfgMgr::instance().
int ddns4_update | ( | CalloutHandle & | handle | ) |
This callout is called at the "ddns4_update" hook.
Attempts to calculate a host name for the given client query for the given subnet based on configured host name expressions. If this results in a different, non-empty host name value then the original host name:
The forward and reverse flag arguments are not currently used.
handle | CalloutHandle. |
Definition at line 112 of file ddns_tuning_callouts.cc.
References isc::log::DBGLVL_TRACE_BASIC, DDNS_TUNING4_CALCULATED_HOSTNAME, DDNS_TUNING4_PROCESS_ERROR, DDNS_TUNING4_SKIPPING_DDNS, isc::ddns_tuning::ddns_tuning_logger, isc::hooks::CalloutHandle::getArgument(), isc::dhcp::CfgMgr::getD2ClientMgr(), isc::dhcp::OptionDataTypeUtil::getLabelCount(), isc::hooks::CalloutHandle::getStatus(), isc::ddns_tuning::impl, isc::dhcp::CfgMgr::instance(), isc_throw, LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, isc::dhcp::D2ClientMgr::qualifyName(), and isc::hooks::CalloutHandle::setArgument().
int ddns6_update | ( | CalloutHandle & | handle | ) |
This callout is called at the "ddns6_update" hook.
Attempts to calculate a host name for the given client query for the given subnet based on configured host name expressions. If this results in a different, non-empty host name value then the original host name:
The forward and reverse flag arguments are not currently used.
handle | CalloutHandle. |
Definition at line 244 of file ddns_tuning_callouts.cc.
References isc::log::DBGLVL_TRACE_BASIC, DDNS_TUNING6_CALCULATED_HOSTNAME, DDNS_TUNING6_PROCESS_ERROR, DDNS_TUNING6_SKIPPING_DDNS, isc::ddns_tuning::ddns_tuning_logger, isc::hooks::CalloutHandle::getArgument(), isc::dhcp::CfgMgr::getD2ClientMgr(), isc::dhcp::OptionDataTypeUtil::getLabelCount(), isc::hooks::CalloutHandle::getStatus(), isc::ddns_tuning::impl, isc::dhcp::CfgMgr::instance(), isc_throw, LOG_DEBUG, LOG_ERROR, CalloutHandle::NEXT_STEP_DROP, isc::dhcp::D2ClientMgr::qualifyName(), and isc::hooks::CalloutHandle::setArgument().
int dhcp4_srv_configured | ( | CalloutHandle & | handle | ) |
This callout is called at the "dhcp4_srv_configured" hook.
It replaces the subnet expression cache contents with new expressions for the subnets contained in the server configuration passed in via the handle. If any of the subnet expressions fail to parse this function will return a non-zero value.
handle | CalloutHandle. |
Definition at line 86 of file ddns_tuning_callouts.cc.
References isc::db::error, isc::hooks::CalloutHandle::getArgument(), isc::ddns_tuning::impl, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::setArgument(), and isc::hooks::CalloutHandle::setStatus().
int dhcp6_srv_configured | ( | CalloutHandle & | handle | ) |
This callout is called at the "dhcp6_srv_configured" hook.
It replaces the subnet expression cache contents with new expressions for the subnets contained in the server configuration passed in via the handle. If any of the subnet expressions fail to parse this function will return a non-zero value.
handle | CalloutHandle. |
Definition at line 218 of file ddns_tuning_callouts.cc.
References isc::db::error, isc::hooks::CalloutHandle::getArgument(), isc::ddns_tuning::impl, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::setArgument(), and isc::hooks::CalloutHandle::setStatus().
int load | ( | LibraryHandle & | handle | ) |
This function is called when the library is loaded.
handle | library handle |
Definition at line 314 of file ddns_tuning_callouts.cc.
References DDNS_TUNING_LOAD_ERROR, DDNS_TUNING_LOAD_OK, isc::ddns_tuning::ddns_tuning_logger, isc::dhcp::CfgMgr::getFamily(), isc::hooks::LibraryHandle::getParameters(), isc::process::Daemon::getProcName(), isc::ddns_tuning::impl, isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, and LOG_INFO.
int multi_threading_compatible | ( | ) |
This function is called to retrieve the multi-threading compatibility.
Definition at line 356 of file ddns_tuning_callouts.cc.
int unload | ( | ) |
This function is called when the library is unloaded.
Definition at line 347 of file ddns_tuning_callouts.cc.
References isc::ddns_tuning::ddns_tuning_logger, DDNS_TUNING_UNLOAD, isc::ddns_tuning::impl, and LOG_INFO.