Kea 2.7.6
|
#include <simple_parser4.h>
Static Public Member Functions | |
static size_t | deriveParameters (isc::data::ElementPtr global) |
Derives (inherits) all parameters from global to more specific scopes. | |
static size_t | setAllDefaults (isc::data::ElementPtr global) |
Sets all defaults for DHCPv4 configuration. | |
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. | |
static void | checkRequired (const SimpleRequiredKeywords &required, isc::data::ConstElementPtr scope) |
Checks that all required keywords are present. | |
static size_t | deriveParams (isc::data::ConstElementPtr parent, isc::data::ElementPtr child, const ParamsList ¶ms) |
Derives (inherits) parameters from parent scope to a child. | |
static isc::asiolink::IOAddress | getAddress (const ConstElementPtr &scope, const std::string &name) |
Returns a IOAddress parameter from a scope. | |
static bool | getBoolean (isc::data::ConstElementPtr scope, const std::string &name) |
Returns a boolean parameter from a scope. | |
static double | getDouble (const ConstElementPtr &scope, const std::string &name) |
Returns a floating point parameter from a scope. | |
static int64_t | getInteger (isc::data::ConstElementPtr scope, const std::string &name) |
Returns an integer parameter from a scope. | |
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. | |
static const data::Element::Position & | getPosition (const std::string &name, const data::ConstElementPtr parent) |
Utility method that returns position of an element. | |
static std::string | getString (isc::data::ConstElementPtr scope, const std::string &name) |
Returns a string parameter from a scope. | |
static size_t | setDefaults (isc::data::ElementPtr scope, const SimpleDefaults &default_values) |
Sets the default values. | |
static size_t | setListDefaults (isc::data::ConstElementPtr list, const SimpleDefaults &default_values) |
Sets the default values for all entries in a list. | |
Static Public Attributes | |
static const isc::data::SimpleKeywords | GLOBAL4_PARAMETERS |
This table defines all global parameters in DHCPv4. | |
static const isc::data::SimpleDefaults | GLOBAL4_DEFAULTS |
This table defines default global values for DHCPv4. | |
static const isc::data::SimpleKeywords | OPTION4_DEF_PARAMETERS |
This table defines all option definition parameters. | |
static const isc::data::SimpleDefaults | OPTION4_DEF_DEFAULTS |
This table defines default values for option definitions in DHCPv4. | |
static const isc::data::SimpleKeywords | OPTION4_PARAMETERS |
This table defines all option parameters. | |
static const isc::data::SimpleDefaults | OPTION4_DEFAULTS |
This table defines default values for options in DHCPv4. | |
static const isc::data::SimpleKeywords | SUBNET4_PARAMETERS |
This table defines all subnet parameters for DHCPv4. | |
static const isc::data::SimpleDefaults | SUBNET4_DEFAULTS |
This table defines default values for each IPv4 subnet. | |
static const isc::data::SimpleDefaults | SHARED_SUBNET4_DEFAULTS |
This table defines default values for each IPv4 subnet that is part of a shared network. | |
static const isc::data::ParamsList | INHERIT_TO_SUBNET4 |
List of parameters that can be inherited to subnet4 scope. | |
static const isc::data::SimpleKeywords | POOL4_PARAMETERS |
This table defines all pool parameters. | |
static const isc::data::SimpleKeywords | SHARED_NETWORK4_PARAMETERS |
This table defines all shared network parameters for DHCPv4. | |
static const isc::data::SimpleDefaults | SHARED_NETWORK4_DEFAULTS |
This table defines default values for each IPv4 shared network. | |
static const isc::data::SimpleDefaults | IFACE4_DEFAULTS |
This table defines default values for interfaces for DHCPv4. | |
static const isc::data::SimpleDefaults | DHCP_QUEUE_CONTROL4_DEFAULTS |
This table defines default values for dhcp-queue-control in DHCPv4. | |
static const isc::data::SimpleDefaults | DHCP_MULTI_THREADING4_DEFAULTS |
This table defines default values for multi-threading in DHCPv4. | |
static const isc::data::SimpleDefaults | SANITY_CHECKS4_DEFAULTS |
This defines default values for sanity checking for DHCPv4. | |
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. | |
uint32_t | getUint32 (isc::data::ConstElementPtr scope, const std::string &name) |
Returns a value converted to uint32_t. | |
uint8_t | getUint8 (ConstElementPtr scope, const std::string &name) |
Get an uint8_t value. | |
const isc::util::Triplet< uint32_t > | parseIntTriplet (const data::ConstElementPtr &scope, const std::string &name) |
Parses an integer triplet. | |
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. | |
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. | |
Definition at line 21 of file simple_parser4.h.
|
static |
Derives (inherits) all parameters from global to more specific scopes.
This method currently does the following:
global | scope to be modified if needed (subnet4 will be extracted) |
Definition at line 519 of file simple_parser4.cc.
References isc::data::SimpleParser::deriveParams(), and INHERIT_TO_SUBNET4.
Referenced by isc::dhcp::processDhcp4Config().
|
static |
Sets all defaults for DHCPv4 configuration.
This method sets global, option data and option definitions defaults.
global | scope to be filled in with defaults. |
Definition at line 432 of file simple_parser4.cc.
References isc::data::Element::createMap(), DHCP_MULTI_THREADING4_DEFAULTS, DHCP_QUEUE_CONTROL4_DEFAULTS, GLOBAL4_DEFAULTS, IFACE4_DEFAULTS, OPTION4_DEF_DEFAULTS, OPTION4_DEFAULTS, SANITY_CHECKS4_DEFAULTS, isc::data::SimpleParser::setDefaults(), isc::data::SimpleParser::setListDefaults(), SHARED_NETWORK4_DEFAULTS, SHARED_SUBNET4_DEFAULTS, and SUBNET4_DEFAULTS.
Referenced by isc::dhcp::processDhcp4Config().
|
static |
This table defines default values for multi-threading in DHCPv4.
Definition at line 62 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
This table defines default values for dhcp-queue-control in DHCPv4.
Definition at line 61 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
This table defines default global values for DHCPv4.
Some of the global parameters defined in the global scope (i.e. directly in Dhcp4) are optional. If not defined, the following values will be used.
Definition at line 42 of file simple_parser4.h.
Referenced by isc::dhcp::CBControlDHCPv4::databaseConfigApply(), and setAllDefaults().
|
static |
This table defines all global parameters in DHCPv4.
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_parser4.h.
|
static |
This table defines default values for interfaces for DHCPv4.
Definition at line 60 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
List of parameters that can be inherited to subnet4 scope.
Some parameters may be defined on both global (directly in Dhcp4) and subnet (Dhcp4/subnet4/...) 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_parser4.h.
Referenced by deriveParameters().
|
static |
This table defines default values for option definitions in DHCPv4.
Dhcp4 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_parser4.h.
Referenced by isc::dhcp::ClientClassDefParser::parse(), and setAllDefaults().
|
static |
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_parser4.h.
Referenced by isc::dhcp::OptionDefParser::parse().
|
static |
This table defines default values for options in DHCPv4.
Dhcp4 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_parser4.h.
Referenced by setAllDefaults().
|
static |
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_parser4.h.
Referenced by isc::dhcp::OptionDataParser::parse().
|
static |
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_parser4.h.
Referenced by isc::dhcp::PoolParser::parse().
|
static |
This defines default values for sanity checking for DHCPv4.
Definition at line 63 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
This table defines default values for each IPv4 shared network.
Definition at line 58 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
This table defines all shared network parameters for DHCPv4.
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 57 of file simple_parser4.h.
Referenced by isc::dhcp::SharedNetwork4Parser::parse().
|
static |
This table defines default values for each IPv4 subnet that is part of a shared network.
This is mostly the same as SUBNET4_DEFAULTS, except one parameter that can be derived from shared-network, but cannot from global scope. This is: interface.
Definition at line 52 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
This table defines default values for each IPv4 subnet.
Note: When updating this array, please also update SHARED_SUBNET4_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. Currently there in only one such parameter: interface.
Definition at line 51 of file simple_parser4.h.
Referenced by setAllDefaults().
|
static |
This table defines all subnet parameters for DHCPv4.
Boolean, integer, real and string types are for scalar parameters, list and map types for entries. Order follows subnet4_param rule in bison grammar.
Definition at line 50 of file simple_parser4.h.
Referenced by isc::dhcp::Subnet4ConfigParser::parse().