Parcourir la source

[3589] Added a paragraph about CfgOption class into developer's guide.

This was also suggested in the review.
Marcin Siodelski il y a 10 ans
Parent
commit
3307c99263
2 fichiers modifiés avec 32 ajouts et 0 suppressions
  1. 1 0
      doc/devel/mainpage.dox
  2. 31 0
      src/lib/dhcpsrv/libdhcpsrv.dox

+ 1 - 0
doc/devel/mainpage.dox

@@ -88,6 +88,7 @@
  * - @subpage libdhcpsrv
  *   - @subpage leasemgr
  *   - @subpage cfgmgr
+ *   - @subpage optionsConfig
  *   - @subpage allocengine
  * - @subpage libdhcp_ddns
  * - @subpage dhcpDatabaseBackends

+ 31 - 0
src/lib/dhcpsrv/libdhcpsrv.dox

@@ -81,6 +81,37 @@ 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 optionsConfig Options Configuration Information
+
+The \ref isc::dhcp::CfgOption object holds a collection of options being
+sent to the client. Since, each subnet comes with a distnict set of
+options, every \ref isc::dhcp::Subnet object holds its own copy of the
+\ref isc::dhcp::CfgOption object with specific options.
+
+The DHCP server also allows for configuration of "global" options
+which are shared by all subnets. The rule here is that if a particular
+option appears in the global options set and the subnet specific options
+set, the subnet specific option takes precedence. The global options
+configuration is held in the dedicated instance of the
+\ref isc::dhcp::CfgOption class. This instance is owned by the
+\ref isc::dhcp::SrvConfig class.
+
+When the new configuration is parsed, the global options are merged into
+the \ref isc::dhcp::CfgOption instances for all subnets. This is
+causing some overhead during the reconfiguration of the server but on
+the other hand it avoids the lookup of options in two places (among
+subnet specific options and global options) during each packet
+processing. Note that the merge of global options to the subnet
+specific options doesn't affect the set of global options but only
+adds copies of global options to the subnet specific options.
+
+One of the benefits of keeping a separate set of global options is
+that there may be cases when the server administrator doesn't specify
+any subnet configuration and only wants global options to be used.
+This is the case, when the DHCP server is used for stateless
+configuration, i.e. client's are not allocated an address or prefix,
+and only stateless configruation is handed out.
+
 @section allocengine Allocation Engine
 
 Allocation Engine (\ref isc::dhcp::AllocEngine) is what its name say - an engine