15const std::map<std::string, int>
18 {
"valid-lifetime", VALID_LIFETIME },
19 {
"min-valid-lifetime", MIN_VALID_LIFETIME },
20 {
"max-valid-lifetime", MAX_VALID_LIFETIME },
21 {
"renew-timer", RENEW_TIMER },
22 {
"rebind-timer", REBIND_TIMER },
23 {
"decline-probation-period", DECLINE_PROBATION_PERIOD },
24 {
"dhcp4o6-port", DHCP4O6_PORT },
26 {
"server-tag", SERVER_TAG },
27 {
"reservations-global", RESERVATIONS_GLOBAL },
28 {
"reservations-in-subnet", RESERVATIONS_IN_SUBNET },
29 {
"reservations-out-of-pool", RESERVATIONS_OUT_OF_POOL },
30 {
"calculate-tee-times", CALCULATE_TEE_TIMES },
31 {
"t1-percent", T1_PERCENT },
32 {
"t2-percent", T2_PERCENT },
33 {
"hostname-char-set", HOSTNAME_CHAR_SET },
34 {
"hostname-char-replacement", HOSTNAME_CHAR_REPLACEMENT },
35 {
"ddns-send-updates", DDNS_SEND_UPDATES },
36 {
"ddns-override-no-update", DDNS_OVERRIDE_NO_UPDATE },
37 {
"ddns-override-client-update", DDNS_OVERRIDE_CLIENT_UPDATE },
38 {
"ddns-replace-client-name", DDNS_REPLACE_CLIENT_NAME },
39 {
"ddns-generated-prefix", DDNS_GENERATED_PREFIX },
40 {
"ddns-qualifying-suffix", DDNS_QUALIFYING_SUFFIX },
41 {
"store-extended-info", STORE_EXTENDED_INFO },
42 {
"statistic-default-sample-count", STATISTIC_DEFAULT_SAMPLE_COUNT },
43 {
"statistic-default-sample-age", STATISTIC_DEFAULT_SAMPLE_AGE },
44 {
"cache-threshold", CACHE_THRESHOLD },
45 {
"cache-max-age", CACHE_MAX_AGE },
46 {
"early-global-reservations-lookup", EARLY_GLOBAL_RESERVATIONS_LOOKUP },
47 {
"ip-reservations-unique", IP_RESERVATIONS_UNIQUE },
48 {
"reservations-lookup-first", RESERVATIONS_LOOKUP_FIRST },
49 {
"ddns-update-on-renew", DDNS_UPDATE_ON_RENEW },
50 {
"parked-packet-limit", PARKED_PACKET_LIMIT },
51 {
"allocator", ALLOCATOR },
52 {
"ddns-ttl-percent", DDNS_TTL_PERCENT },
53 {
"ddns-conflict-resolution-mode", DDNS_CONFLICT_RESOLUTION_MODE },
54 {
"compatibility", COMPATIBILITY },
55 {
"dhcp-ddns", DHCP_DDNS },
56 {
"expired-leases-processing", EXPIRED_LEASES_PROCESSING },
57 {
"multi-threading", MULTI_THREADING },
58 {
"sanity-checks", SANITY_CHECKS },
59 {
"dhcp-queue-control", DHCP_QUEUE_CONTROL },
60 {
"ddns-ttl", DDNS_TTL },
61 {
"ddns-ttl-min", DDNS_TTL_MIN },
62 {
"ddns-ttl-max", DDNS_TTL_MAX },
65 {
"echo-client-id", ECHO_CLIENT_ID },
66 {
"match-client-id", MATCH_CLIENT_ID },
67 {
"authoritative", AUTHORITATIVE },
68 {
"next-server", NEXT_SERVER },
69 {
"server-hostname", SERVER_HOSTNAME },
70 {
"boot-file-name", BOOT_FILE_NAME },
71 {
"offer-lifetime", OFFER_LIFETIME },
72 {
"stash-agent-options", STASH_AGENT_OPTIONS },
75 {
"data-directory", DATA_DIRECTORY },
76 {
"preferred-lifetime", PREFERRED_LIFETIME },
77 {
"min-preferred-lifetime", MIN_PREFERRED_LIFETIME },
78 {
"max-preferred-lifetime", MAX_PREFERRED_LIFETIME },
79 {
"pd-allocator", PD_ALLOCATOR },
80 {
"server-id", SERVER_ID }
85struct CfgGlobalsChecks {
95 std::vector<std::string> names;
101 <<
" for name " << it.first);
103 if (!names[idx].empty()) {
105 <<
" got " << names[idx]);
107 names[idx] = it.first;
112 if (names[idx].empty()) {
119CfgGlobalsChecks check;
131 return (
get(it->second));
149 set(it->second, value);
176 map.insert(make_pair(it.first, value));
189 result->set(it.first, value);
A generic exception that is thrown when an object can not be found.
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
A generic exception that is thrown when an unexpected error condition occurs.
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
void clear()
Clear configured parameter values.
void set(const std::string &name, isc::data::ConstElementPtr value)
Set a configured parameter value by name.
std::map< std::string, isc::data::ConstElementPtr > MapType
Type of name and value map.
const MapType valuesMap() const
Returns configured parameters as a map.
CfgGlobals()
Instance members.
static const std::map< std::string, int > nameToIndex
Name to index map.
isc::data::ElementPtr toElement() const
Unparse configured global parameters.
isc::data::ConstElementPtr get(const std::string &name) const
Get a configured parameter value by name.
std::vector< isc::data::ConstElementPtr > values_
Vectors of values.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.