From: Marcin Siodelski Date: Mon, 1 Dec 2014 17:08:29 +0000 (+0100) Subject: [3561] Updated doxygen documentation with the info about HostMgr. X-Git-Tag: kea-eng-20141219~16^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4fbc9485ce503203457be819e5484930a161fb9;p=thirdparty%2Fkea.git [3561] Updated doxygen documentation with the info about HostMgr. --- diff --git a/doc/devel/mainpage.dox b/doc/devel/mainpage.dox index f33e0f956d..2bfff65a21 100644 --- a/doc/devel/mainpage.dox +++ b/doc/devel/mainpage.dox @@ -88,6 +88,7 @@ * - @subpage libdhcpsrv * - @subpage leasemgr * - @subpage cfgmgr + * - @subpage hostmgr * - @subpage optionsConfig * - @subpage allocengine * - @subpage libdhcp_ddns diff --git a/src/lib/dhcpsrv/libdhcpsrv.dox b/src/lib/dhcpsrv/libdhcpsrv.dox index b9caca197c..e285c7038f 100644 --- a/src/lib/dhcpsrv/libdhcpsrv.dox +++ b/src/lib/dhcpsrv/libdhcpsrv.dox @@ -81,6 +81,39 @@ one that occurred before it etc. the \ref isc::dhcp::SrvConfig object. Kea developers are actively working on migrating the other configuration parameters to it. +@section hostmgr Host Manager + +Host Manager implemented by the \ref isc::dhcp::HostMgr is a singleton object +which provides means to retrieve resources statically assigned to the DHCP +clients, such as IP addresses, prefixes or hostnames. The statically assigned +resources are called reservations (or host reservations) and they are +represented in the code by the \ref isc::dhcp::Host class. + +The reservations can be specified in the configuration file or in some +other storage (typically in a database). A dedicated object, called +host data source, is needed to retrieve the host reservations from the +database. This object must implement the \ref isc::dhcp::BaseHostDataSource +interface and its implementation is specific to the type of storage +holding the reservations. For example, the host data source managing +host reservations in the MySQL database is required to establish +connection to the MySQL databse and issue specific queries. Once +implemented, the \ref isc::dhcp::HostMgr::create method must be updated +to create an instance of this datasource. Note, that this instance is +created as "alternate host data source" as opposed to the primary data +source which returns host reservations specified in the configuration file. +The primary data source is implemented internally in the +\ref isc::dhcp::HostMgr and uses the configuration data structures held by +the \ref isc::dhcp::CfgMgr to retrieve the reservations. In general, the +\ref isc::dhcp::HostMgr first searches for the reservations using the +primary data source and falls back to the use of alternate data source +when nothing has been found. For those methods which are meant to return +multiple reservations (e.g. find all reservations for the particular +client), the \ref isc::dhcp::HostMgr will use both primary and alternate +data source (if present) and concatenate results. + +For more information about the \ref isc::dhcp::HostMgr please refer to its +documentation. + @section optionsConfig Options Configuration Information The \ref isc::dhcp::CfgOption object holds a collection of options being