|
@@ -52,7 +52,7 @@ src/bin/dhcp6/json_config_parser.cc.
|
|
@section dhcpv6ConfigInherit DHCPv6 Configuration Inheritance
|
|
@section dhcpv6ConfigInherit DHCPv6 Configuration Inheritance
|
|
|
|
|
|
One notable useful feature of DHCP configuration is its parameter inheritance.
|
|
One notable useful feature of DHCP configuration is its parameter inheritance.
|
|
-For example, "renew-timer" value may be specified at a global scope and it then
|
|
|
|
|
|
+For example, the "renew-timer" value may be specified at a global scope and it then
|
|
applies to all subnets. However, some subnets may have it overwritten with subnet
|
|
applies to all subnets. However, some subnets may have it overwritten with subnet
|
|
specific values that takes precedence over global values that are considered
|
|
specific values that takes precedence over global values that are considered
|
|
defaults. The parameters inheritance is implemented by means of the "global
|
|
defaults. The parameters inheritance is implemented by means of the "global
|
|
@@ -64,7 +64,7 @@ parsers being invoked to parse the global values. Parsers will store the
|
|
parsed values into these storages. Once the global parameters are stored in the
|
|
parsed values into these storages. Once the global parameters are stored in the
|
|
global context, the parsers for the nested configuration parameters are invoked.
|
|
global context, the parsers for the nested configuration parameters are invoked.
|
|
These parsers check the presence of the parameters overriding the values of
|
|
These parsers check the presence of the parameters overriding the values of
|
|
-the global parameters. If a value is not present, the values from the global
|
|
|
|
|
|
+the global parameters. If a value is not present, the value from the global
|
|
context is used.
|
|
context is used.
|
|
|
|
|
|
A good example of inheritance is the implementation of the @ref
|
|
A good example of inheritance is the implementation of the @ref
|
|
@@ -96,7 +96,7 @@ SubnetConfigParser::getParam(const std::string& name) {
|
|
@endcode
|
|
@endcode
|
|
|
|
|
|
Note that if the value is neither present in the local storage nor in the global
|
|
Note that if the value is neither present in the local storage nor in the global
|
|
-context an error is signalled.
|
|
|
|
|
|
+context, an error is signalled.
|
|
|
|
|
|
Parameter inheritance is done once, during the reconfiguration phase.
|
|
Parameter inheritance is done once, during the reconfiguration phase.
|
|
Reconfigurations are rare, so extra logic here is not a problem. On the other
|
|
Reconfigurations are rare, so extra logic here is not a problem. On the other
|
|
@@ -105,9 +105,9 @@ access to these parameters must be as efficient as possible. In fact,
|
|
currently the code has to only call @c Subnet6::getT1(), regardless if the
|
|
currently the code has to only call @c Subnet6::getT1(), regardless if the
|
|
"renew-timer" has been specified as a global or subnet specific value.
|
|
"renew-timer" has been specified as a global or subnet specific value.
|
|
|
|
|
|
-Debugging configuration parser may be confusing. Therefore there is a special
|
|
|
|
|
|
+Debugging a configuration parser may be confusing. Therefore there is a special
|
|
class called DebugParser. It does not configure anything, but just
|
|
class called DebugParser. It does not configure anything, but just
|
|
-accepts any parameter of any type. If requested to commit configuration, it will
|
|
|
|
|
|
+accepts any parameter of any type. If requested to commit a configuration, it will
|
|
print out received parameter name and its value. This class is not currently used,
|
|
print out received parameter name and its value. This class is not currently used,
|
|
but it is convenient to have it every time a new parameter is added to DHCP
|
|
but it is convenient to have it every time a new parameter is added to DHCP
|
|
configuration. For that purpose it should be left in the code.
|
|
configuration. For that purpose it should be left in the code.
|