Kea 3.3.4
Kea Config Backend Commands Hooks Library

Welcome to Kea Config Backend Commands Hooks Library.

This documentation is addressed at developers who are interested in internal operation of the library. This file provides information needed to understand and perhaps extend this library.

This documentation is stand-alone: you should have read and understood Kea Developer's Guide and in particular its section about hooks: Hooks Developer's Guide.

Overview

The cb_cmds hooks library provides support for commands to manipulate Kea configuration information in the databases via the configuration backends. The server receiving those commands must be configured to use the configuration backend(s) connected to the database(s) where the data is stored. Each command may include a "remote" map which specifies the database where the data should be stored or from which the data should be fetched.

Library Internals

The structure of the library is very simple. The cb_cmds_callouts.cc file contains the command handlers registered during the library initialization. Each such handler calls respective methods of the ConfigCmdsDhcp4Impl and ConfigCmdsDhcp6Impl classes to process the commands. The ConfigCmdsDhcp4Impl and ConfigCmdsDhcp6Impl methods are responsible for extracting the commands from the provided CalloutHandle objects, validating them, running through the parsers, processing and returning a response within the CalloutHandle object.

When possible, the cb_cmds hooks library uses Kea configuration parsers (the same that are used to parse configuration information from the config file) to parse the data carried in the commands.

Multi-Threading Compatibility

The cb_cmds hooks library is compatible with multi-threading. (it is orthogonal to the DHCP service).