Kea  1.9.9-git
isc::dhcp::SimpleParser6 Class Reference

#include <simple_parser6.h>

+ Inheritance diagram for isc::dhcp::SimpleParser6:

Static Public Member Functions

static size_t deriveParameters (isc::data::ElementPtr global)
 Derives (inherits) all parameters from global to more specific scopes. More...
 
static size_t setAllDefaults (isc::data::ElementPtr global)
 Sets all defaults for DHCPv6 configuration. More...
 
- Static Public Member Functions inherited from isc::data::SimpleParser
static void checkKeywords (const SimpleKeywords &keywords, isc::data::ConstElementPtr scope)
 Checks acceptable keywords with their expected type. More...
 
static void checkRequired (const SimpleRequiredKeywords &required, isc::data::ConstElementPtr scope)
 Checks that all required keywords are present. More...
 
static size_t deriveParams (isc::data::ConstElementPtr parent, isc::data::ElementPtr child, const ParamsList &params)
 Derives (inherits) parameters from parent scope to a child. More...
 
static isc::asiolink::IOAddress getAddress (const ConstElementPtr &scope, const std::string &name)
 Returns a IOAddress parameter from a scope. More...
 
static bool getBoolean (isc::data::ConstElementPtr scope, const std::string &name)
 Returns a boolean parameter from a scope. More...
 
static double getDouble (const ConstElementPtr &scope, const std::string &name)
 Returns a floating point parameter from a scope. More...
 
static int64_t getInteger (isc::data::ConstElementPtr scope, const std::string &name)
 Returns an integer parameter from a scope. More...
 
static int64_t getInteger (isc::data::ConstElementPtr scope, const std::string &name, int64_t min, int64_t max)
 Returns an integer parameter from a scope and checks its range. More...
 
static const data::Element::PositiongetPosition (const std::string &name, const data::ConstElementPtr parent)
 Utility method that returns position of an element. More...
 
static std::string getString (isc::data::ConstElementPtr scope, const std::string &name)
 Returns a string parameter from a scope. More...
 
static size_t setDefaults (isc::data::ElementPtr scope, const SimpleDefaults &default_values)
 Sets the default values. More...
 
static size_t setListDefaults (isc::data::ConstElementPtr list, const SimpleDefaults &default_values)
 Sets the default values for all entries in a list. More...
 

Static Public Attributes

static const isc::data::SimpleKeywords GLOBAL6_PARAMETERS
 This table defines all global parameters in DHCPv6. More...
 
static const isc::data::SimpleDefaults GLOBAL6_DEFAULTS
 This table defines default global values for DHCPv6. More...
 
static const isc::data::SimpleKeywords OPTION6_DEF_PARAMETERS
 This table defines all option definition parameters. More...
 
static const isc::data::SimpleDefaults OPTION6_DEF_DEFAULTS
 This table defines default values for option definitions in DHCPv6. More...
 
static const isc::data::SimpleKeywords OPTION6_PARAMETERS
 This table defines all option parameters. More...
 
static const isc::data::SimpleDefaults OPTION6_DEFAULTS
 This table defines default values for options in DHCPv6. More...
 
static const isc::data::SimpleKeywords SUBNET6_PARAMETERS
 This table defines all subnet parameters for DHCPv6. More...
 
static const isc::data::SimpleDefaults SUBNET6_DEFAULTS
 This table defines default values for each IPv6 subnet. More...
 
static const isc::data::SimpleDefaults SHARED_SUBNET6_DEFAULTS
 This table defines default values for each IPv6 subnet. More...
 
static const isc::data::ParamsList INHERIT_TO_SUBNET6
 List of parameters that can be inherited from the global to subnet6 scope. More...
 
static const isc::data::SimpleKeywords POOL6_PARAMETERS
 This table defines all pool parameters. More...
 
static const isc::data::SimpleKeywords PD_POOL6_PARAMETERS
 This table defines all prefix delegation pool parameters. More...
 
static const isc::data::SimpleKeywords SHARED_NETWORK6_PARAMETERS
 This table defines all shared network parameters for DHCPv6. More...
 
static const isc::data::SimpleDefaults SHARED_NETWORK6_DEFAULTS
 This table defines default values for each IPv6 subnet that is part of a shared network. More...
 
static const isc::data::SimpleDefaults IFACE6_DEFAULTS
 This table defines default values for interfaces for DHCPv6. More...
 
static const isc::data::SimpleDefaults DHCP_QUEUE_CONTROL6_DEFAULTS
 This table defines default values for dhcp-queue-control in DHCPv6. More...
 
static const isc::data::SimpleDefaults DHCP_MULTI_THREADING6_DEFAULTS
 This table defines default values for multi-threading in DHCPv6. More...
 
static const isc::data::SimpleDefaults SANITY_CHECKS6_DEFAULTS
 This defines default values for sanity checking for DHCPv6. More...
 

Additional Inherited Members

- Public Member Functions inherited from isc::data::SimpleParser
uint16_t getUint16 (isc::data::ConstElementPtr scope, const std::string &name)
 Returns a value converted to uint16_t. More...
 
uint32_t getUint32 (isc::data::ConstElementPtr scope, const std::string &name)
 Returns a value converted to uint32_t. More...
 
uint8_t getUint8 (ConstElementPtr scope, const std::string &name)
 Get an uint8_t value. More...
 
const dhcp::Triplet< uint32_t > parseIntTriplet (const data::ConstElementPtr &scope, const std::string &name)
 Parses an integer triplet. More...
 
- Protected Member Functions inherited from isc::data::SimpleParser
template<typename target_type , target_type convert>
target_type getAndConvert (isc::data::ConstElementPtr scope, const std::string &name, const std::string &type_name)
 Returns a converted value from a scope. More...
 
template<typename int_type >
int_type getIntType (isc::data::ConstElementPtr scope, const std::string &name)
 Returns an integer value with range checking from a scope. More...
 

Detailed Description

Definition at line 21 of file simple_parser6.h.

Member Function Documentation

size_t isc::dhcp::SimpleParser6::deriveParameters ( isc::data::ElementPtr  global)
static

Derives (inherits) all parameters from global to more specific scopes.

This method currently does the following:

  • derives global parameters to subnets (lifetimes for now)
    Parameters
    globalscope to be modified if needed (subnet6 will be extracted)
    Returns
    number of default values derived

Definition at line 502 of file simple_parser6.cc.

References isc::data::SimpleParser::deriveParams().

+ Here is the call graph for this function:

size_t isc::dhcp::SimpleParser6::setAllDefaults ( isc::data::ElementPtr  global)
static

Sets all defaults for DHCPv6 configuration.


— end of default values ----------------------------------------------—

This method sets global, option data and option definitions defaults.

Parameters
globalscope to be filled in with defaults.
Returns
number of default values added

Definition at line 413 of file simple_parser6.cc.

References isc::data::Element::createMap(), and isc::data::SimpleParser::setDefaults().

+ Here is the call graph for this function:

Member Data Documentation

const SimpleDefaults isc::dhcp::SimpleParser6::DHCP_MULTI_THREADING6_DEFAULTS
static
Initial value:
= {
{ "enable-multi-threading", Element::boolean, "false" },
{ "thread-pool-size", Element::integer, "0" },
{ "packet-queue-size", Element::integer, "64" }
}

This table defines default values for multi-threading in DHCPv6.

Definition at line 63 of file simple_parser6.h.

const SimpleDefaults isc::dhcp::SimpleParser6::DHCP_QUEUE_CONTROL6_DEFAULTS
static
Initial value:
= {
{ "enable-queue", Element::boolean, "false"},
{ "queue-type", Element::string, "kea-ring6"},
{ "capacity", Element::integer, "64"}
}

This table defines default values for dhcp-queue-control in DHCPv6.

Definition at line 62 of file simple_parser6.h.

const SimpleDefaults isc::dhcp::SimpleParser6::GLOBAL6_DEFAULTS
static
Initial value:
= {
{ "preferred-lifetime", Element::integer, "3600" },
{ "valid-lifetime", Element::integer, "7200" },
{ "decline-probation-period", Element::integer, "86400" },
{ "dhcp4o6-port", Element::integer, "0" },
{ "server-tag", Element::string, "" },
{ "reservations-global", Element::boolean, "false" },
{ "reservations-in-subnet", Element::boolean, "true" },
{ "reservations-out-of-pool", Element::boolean, "false" },
{ "calculate-tee-times", Element::boolean, "true" },
{ "t1-percent", Element::real, ".50" },
{ "t2-percent", Element::real, ".80" },
{ "ddns-send-updates", Element::boolean, "true" },
{ "ddns-override-no-update", Element::boolean, "false" },
{ "ddns-override-client-update", Element::boolean, "false" },
{ "ddns-replace-client-name", Element::string, "never" },
{ "ddns-generated-prefix", Element::string, "myhost" },
{ "ddns-qualifying-suffix", Element::string, "" },
{ "hostname-char-set", Element::string, "[^A-Za-z0-9.-]" },
{ "hostname-char-replacement", Element::string, "" },
{ "store-extended-info", Element::boolean, "false" },
{ "statistic-default-sample-count", Element::integer, "20" },
{ "statistic-default-sample-age", Element::integer, "0" },
{ "ip-reservations-unique", Element::boolean, "true" },
{ "ddns-update-on-renew", Element::boolean, "false" },
{ "ddns-use-conflict-resolution", Element::boolean, "true" }
}

This table defines default global values for DHCPv6.

Some of the global parameters defined in the global scope (i.e. directly in Dhcp6) are optional. If not defined, the following values will be used.

Definition at line 42 of file simple_parser6.h.

const SimpleKeywords isc::dhcp::SimpleParser6::GLOBAL6_PARAMETERS
static

This table defines all global parameters in DHCPv6.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows global_param rule in bison grammar.

Definition at line 41 of file simple_parser6.h.

const SimpleDefaults isc::dhcp::SimpleParser6::IFACE6_DEFAULTS
static
Initial value:
= {
{ "re-detect", Element::boolean, "true" }
}

This table defines default values for interfaces for DHCPv6.

Definition at line 61 of file simple_parser6.h.

const ParamsList isc::dhcp::SimpleParser6::INHERIT_TO_SUBNET6
static
Initial value:
= {
"preferred-lifetime",
"min-preferred-lifetime",
"max-preferred-lifetime",
"rebind-timer",
"relay",
"renew-timer",
"valid-lifetime",
"min-valid-lifetime",
"max-valid-lifetime",
"calculate-tee-times",
"t1-percent",
"t2-percent",
"store-extended-info",
"cache-threshold",
"cache-max-age"
}

List of parameters that can be inherited from the global to subnet6 scope.

Some parameters may be defined on both global (directly in Dhcp6) and subnet (Dhcp6/subnet6/...) scope. If not defined in the subnet scope, the value is being inherited (derived) from the global scope. This array lists all of such parameters.

This list is also used for inheriting from global to shared networks and from shared networks to subnets within it.

Definition at line 53 of file simple_parser6.h.

const SimpleDefaults isc::dhcp::SimpleParser6::OPTION6_DEF_DEFAULTS
static
Initial value:
= {
{ "record-types", Element::string, ""},
{ "space", Element::string, "dhcp6"},
{ "array", Element::boolean, "false"},
{ "encapsulate", Element::string, "" }
}

This table defines default values for option definitions in DHCPv6.

Dhcp6 may contain an array called option-def that enumerates new option definitions. This array lists default values for those option definitions.

Definition at line 45 of file simple_parser6.h.

const SimpleKeywords isc::dhcp::SimpleParser6::OPTION6_DEF_PARAMETERS
static
Initial value:
= {
{ "name", Element::string },
{ "code", Element::integer },
{ "type", Element::string },
{ "record-types", Element::string },
{ "space", Element::string },
{ "encapsulate", Element::string },
{ "array", Element::boolean, },
{ "user-context", Element::map },
{ "comment", Element::string },
{ "metadata", Element::map }
}

This table defines all option definition parameters.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows option_def_param rules in bison grammar.

Definition at line 44 of file simple_parser6.h.

Referenced by isc::dhcp::OptionDefParser::parse().

const SimpleDefaults isc::dhcp::SimpleParser6::OPTION6_DEFAULTS
static
Initial value:
= {
{ "space", Element::string, "dhcp6"},
{ "csv-format", Element::boolean, "true"},
{ "always-send", Element::boolean, "false"}
}

This table defines default values for options in DHCPv6.

Dhcp6 usually contains option values (option-data) defined in global, subnet, class or host reservations scopes. This array lists default values for those option-data declarations.

Definition at line 48 of file simple_parser6.h.

const SimpleKeywords isc::dhcp::SimpleParser6::OPTION6_PARAMETERS
static
Initial value:
= {
{ "name", Element::string },
{ "data", Element::string },
{ "code", Element::integer },
{ "space", Element::string },
{ "csv-format", Element::boolean },
{ "always-send", Element::boolean },
{ "user-context", Element::map },
{ "comment", Element::string },
{ "metadata", Element::map }
}

This table defines all option parameters.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows option_param rules in bison grammar.

Definition at line 47 of file simple_parser6.h.

Referenced by isc::dhcp::OptionDataParser::parse().

const SimpleKeywords isc::dhcp::SimpleParser6::PD_POOL6_PARAMETERS
static
Initial value:
= {
{ "prefix", Element::string },
{ "prefix-len", Element::integer },
{ "delegated-len", Element::integer },
{ "option-data", Element::list },
{ "client-class", Element::string },
{ "require-client-classes", Element::list },
{ "excluded-prefix", Element::string },
{ "excluded-prefix-len", Element::integer },
{ "user-context", Element::map },
{ "comment", Element::string },
{ "metadata", Element::map }
}

This table defines all prefix delegation pool parameters.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows pd_pool_param rules in bison grammar.

Definition at line 56 of file simple_parser6.h.

Referenced by isc::dhcp::PdPoolParser::parse().

const SimpleKeywords isc::dhcp::SimpleParser6::POOL6_PARAMETERS
static
Initial value:
= {
{ "pool", Element::string },
{ "option-data", Element::list },
{ "client-class", Element::string },
{ "require-client-classes", Element::list },
{ "user-context", Element::map },
{ "comment", Element::string },
{ "metadata", Element::map }
}

This table defines all pool parameters.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows pool_param rules in bison grammar.

Definition at line 55 of file simple_parser6.h.

Referenced by isc::dhcp::PoolParser::parse().

const SimpleDefaults isc::dhcp::SimpleParser6::SANITY_CHECKS6_DEFAULTS
static
Initial value:
= {
{ "lease-checks", Element::string, "warn" }
}

This defines default values for sanity checking for DHCPv6.

Definition at line 64 of file simple_parser6.h.

const SimpleDefaults isc::dhcp::SimpleParser6::SHARED_NETWORK6_DEFAULTS
static
Initial value:
= {
{ "client-class", Element::string, "" },
{ "interface", Element::string, "" },
{ "interface-id", Element::string, "" },
{ "rapid-commit", Element::boolean, "false" }
}

This table defines default values for each IPv6 subnet that is part of a shared network.

This is mostly the same as SUBNET6_DEFAULTS, except the parameters that can be derived from shared-network, but cannot from global scope.

Definition at line 59 of file simple_parser6.h.

const SimpleKeywords isc::dhcp::SimpleParser6::SHARED_NETWORK6_PARAMETERS
static

This table defines all shared network parameters for DHCPv6.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows shared_network_param rule in bison grammar.

Definition at line 58 of file simple_parser6.h.

Referenced by isc::dhcp::SharedNetwork6Parser::parse().

const SimpleDefaults isc::dhcp::SimpleParser6::SHARED_SUBNET6_DEFAULTS
static
Initial value:
= {
{ "id", Element::integer, "0" }
}

This table defines default values for each IPv6 subnet.

Definition at line 52 of file simple_parser6.h.

const SimpleDefaults isc::dhcp::SimpleParser6::SUBNET6_DEFAULTS
static
Initial value:
= {
{ "id", Element::integer, "0" },
{ "interface", Element::string, "" },
{ "client-class", Element::string, "" },
{ "rapid-commit", Element::boolean, "false" },
{ "interface-id", Element::string, "" }
}

This table defines default values for each IPv6 subnet.

Note: When updating this array, please also update SHARED_SUBNET6_DEFAULTS below. In most cases, those two should be kept in sync, except cases where a parameter can be derived from shared-networks, but is not defined on global level.

Definition at line 51 of file simple_parser6.h.

const SimpleKeywords isc::dhcp::SimpleParser6::SUBNET6_PARAMETERS
static

This table defines all subnet parameters for DHCPv6.

Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows subnet6_param rule in bison grammar.

Definition at line 50 of file simple_parser6.h.

Referenced by isc::dhcp::Subnet6ConfigParser::parse().


The documentation for this class was generated from the following files: