Kea 3.3.4
cb_cmds_dhcp6.cc
Go to the documentation of this file.
1// Copyright (C) 2026 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#include <config.h>
8
11#include <hooks/hooks.h>
12
13#include <functional>
14
16#include <cb_cmds/cb_parsers.h>
17
18using namespace isc::config;
19using namespace isc::data;
20using namespace isc::dhcp;
21using namespace isc::db;
22using namespace isc::hooks;
23
24namespace isc {
25namespace cb {
26
28 { "compatibility.lenient-option-parsing", Element::boolean },
29 { "dhcp-ddns.enable-updates", Element::boolean },
30 { "dhcp-ddns.max-queue-size", Element::integer },
31 { "dhcp-ddns.ncr-format", Element::string },
32 { "dhcp-ddns.ncr-protocol", Element::string },
33 { "dhcp-ddns.sender-ip", Element::string },
34 { "dhcp-ddns.sender-port", Element::integer },
35 { "dhcp-ddns.server-ip", Element::string },
36 { "dhcp-ddns.server-port", Element::integer },
37 { "expired-leases-processing.flush-reclaimed-timer-wait-time", Element::integer },
38 { "expired-leases-processing.hold-reclaimed-time", Element::integer },
39 { "expired-leases-processing.max-reclaim-leases", Element::integer },
40 { "expired-leases-processing.max-reclaim-time", Element::integer },
41 { "expired-leases-processing.reclaim-timer-wait-time", Element::integer },
42 { "expired-leases-processing.unwarned-reclaim-cycles", Element::integer },
43 { "multi-threading.enable-multi-threading", Element::boolean },
44 { "multi-threading.thread-pool-size", Element::integer },
45 { "multi-threading.packet-queue-size", Element::integer },
46 { "sanity-checks.lease-checks", Element::string },
47 { "sanity-checks.extended-info-checks", Element::string },
48 { "server-id.type", Element::string },
49 { "server-id.enterprise-id", Element::integer },
50 { "server-id.identifier", Element::string },
51 { "server-id.persist", Element::boolean },
52 { "dhcp-queue-control.enable-queue", Element::boolean },
53 { "dhcp-queue-control.queue-type", Element::string },
54 { "dhcp-queue-control.capacity", Element::integer },
55 /* not yet supported
56 { "interfaces-config.re-detect", Element::boolean },
57 { "interfaces-config.interfaces", Element::list },
58 { "interfaces-config.service-sockets-require-all", Element::boolean },
59 { "interfaces-config.service-sockets-max-retries", Element::integer },
60 { "interfaces-config.service-sockets-retry-wait-time", Element::integer },
61 { "lease-database.lfc-interval", Element::integer },
62 { "lease-database.max-row-errors", Element::integer },
63 { "lease-database.name", Element::string },
64 { "lease-database.persist", Element::boolean },
65 { "lease-database.type", Element::string },
66 { "lease-database.host", Element::string },
67 { "lease-database.password", Element::string },
68 { "lease-database.port", Element::integer },
69 { "lease-database.user", Element::string },
70 { "lease-database.readonly", Element::boolean },
71 { "lease-database.trust-anchor", Element::string },
72 { "lease-database.cert-file", Element::string },
73 { "lease-database.key-file", Element::string },
74 { "lease-database.ssl-mode", Element::string },
75 { "lease-database.cipher-list", Element::string },
76 { "lease-database.reconnect-wait-time", Element::integer },
77 { "lease-database.max-reconnect-tries", Element::integer },
78 { "lease-database.on-fail", Element::string },
79 { "lease-database.retry-on-startup", Element::boolean },
80 { "lease-database.connect-timeout", Element::integer },
81 { "lease-database.read-timeout", Element::integer },
82 { "lease-database.write-timeout", Element::integer },
83 { "lease-database.tcp-user-timeout", Element::integer },
84 { "config-control.config-fetch-wait-time", Element::integer },
85 */
86};
87
89ConfigCmdsDhcp6Impl::initGlobalContainersParameters() {
91 // Add supported top level map parameters.
94 // Remove unsupported top level list parameters.
95 auto globals_copy = globals;
96 for (auto const& key : globals_copy) {
97 if (key.second == Element::list &&
100 globals.erase(key.first);
101 }
102 }
103
104 return (globals);
105}
106
108ConfigCmdsDhcp6Impl::getGlobalContainersParameters() {
109 static SimpleKeywords parameters = ConfigCmdsDhcp6Impl::initGlobalContainersParameters();
110 return (parameters);
111}
112
113void
115 auto create_update_fun = [] (const BackendSelector& backend_selector,
116 const ServerSelector& server_selector,
117 const StampedValuePtr& stamped_value) {
119 createUpdateGlobalParameter6(backend_selector, server_selector,
120 stamped_value);
121 };
122 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
123 setGlobalParameter(callout_handle, globals, SimpleParser6::GLOBAL6_LIST_PARAMETER_TYPES, AF_INET6, create_update_fun);
124}
125
126void
128 auto delete_fun = [] (const BackendSelector& backend_selector,
129 const ServerSelector& server_selector,
130 const std::string& name) {
131 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
132 deleteGlobalParameter6(backend_selector, server_selector, name));
133 };
134 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
135 delGlobalParameter(callout_handle, globals, AF_INET6, delete_fun);
136}
137
138void
140 auto get_fun = [] (const BackendSelector& backend_selector,
141 const ServerSelector& server_selector,
142 const std::string& name) {
143 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
144 getGlobalParameter6(backend_selector, server_selector, name));
145 };
146 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
147 getGlobalParameter(callout_handle, globals, AF_INET6, get_fun);
148}
149
150void
152 auto get_all_fun = [] (const BackendSelector& backend_selector,
153 const ServerSelector& server_selector) {
154 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
155 getAllGlobalParameters6(backend_selector, server_selector));
156 };
157 auto const& globals = ConfigCmdsDhcp6Impl::getGlobalContainersParameters();
158 getAllGlobalParameters(callout_handle, globals, AF_INET6, get_all_fun);
159}
160
161void
163 auto create_update_fun = [] (const BackendSelector& backend_selector,
164 const ServerSelector& server_selector,
165 const Subnet6Ptr& subnet) {
167 createUpdateSubnet6(backend_selector, server_selector, subnet);
168 };
170 AF_INET6,
171 create_update_fun);
172}
173
174void
176 auto delete_fun = [] (const BackendSelector& backend_selector,
177 const ServerSelector& server_selector,
178 const SubnetID& subnet_id) {
179 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
180 deleteSubnet6(backend_selector, server_selector, subnet_id));
181 };
182 delSubnetId(callout_handle, AF_INET6, delete_fun);
183}
184
185void
187 auto delete_fun = [] (const BackendSelector& backend_selector,
188 const ServerSelector& server_selector,
189 const std::string& subnet_prefix) {
190 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
191 deleteSubnet6(backend_selector, server_selector, subnet_prefix));
192 };
193 delSubnetPrefix(callout_handle, AF_INET6, delete_fun);
194}
195
196void
198 auto get_fun = [] (const BackendSelector& backend_selector,
199 const ServerSelector& server_selector,
200 const SubnetID& subnet_id) {
201 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
202 getSubnet6(backend_selector, server_selector, subnet_id));
203 };
204 getSubnetId<Subnet6Ptr>(callout_handle, AF_INET6, get_fun);
205}
206
207void
209 auto get_fun = [] (const BackendSelector& backend_selector,
210 const ServerSelector& server_selector,
211 const std::string& subnet_prefix) {
212 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
213 getSubnet6(backend_selector, server_selector, subnet_prefix));
214 };
215 getSubnetPrefix<Subnet6Ptr>(callout_handle, AF_INET6, get_fun);
216}
217
218void
220 auto get_all_fun = [] (const BackendSelector& backend_selector,
221 const ServerSelector& server_selector) {
222 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
223 getAllSubnets6(backend_selector, server_selector));
224 };
225 listSubnets<Subnet6Collection>(callout_handle, AF_INET6, get_all_fun);
226}
227
228void
230 auto create_update_fun = [] (const BackendSelector& backend_selector,
231 const ServerSelector& server_selector,
232 const SharedNetwork6Ptr& shared_network) {
234 createUpdateSharedNetwork6(backend_selector, server_selector, shared_network);
235 };
237 (callout_handle, AF_INET6, create_update_fun);
238}
239
240void
242 auto delete_fun = [] (const BackendSelector& backend_selector,
243 const ServerSelector& server_selector,
244 const std::string& name) {
245 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
246 deleteSharedNetwork6(backend_selector, server_selector, name));
247 };
248 auto delete_all_fun = [] (const BackendSelector& backend_selector,
249 const ServerSelector& server_selector,
250 const std::string& name) {
252 deleteSharedNetworkSubnets6(backend_selector, server_selector, name);
253 };
254 delSharedNetwork(callout_handle, AF_INET6, delete_fun, delete_all_fun);
255}
256
257void
259 auto get_fun = [] (const BackendSelector& backend_selector,
260 const ServerSelector& server_selector,
261 const std::string& name) {
262 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
263 getSharedNetwork6(backend_selector, server_selector, name));
264
265 };
266 auto get_all_fun = [] (const BackendSelector& backend_selector,
267 const ServerSelector& server_selector,
268 const std::string& name) {
269 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
270 getSharedNetworkSubnets6(backend_selector, server_selector, name));
271 };
273 (callout_handle, AF_INET6, get_fun, get_all_fun);
274}
275
276void
278 auto get_all_fun = [] (const BackendSelector& backend_selector,
279 const ServerSelector& server_selector) {
280 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
281 getAllSharedNetworks6(backend_selector, server_selector));
282 };
284 (callout_handle, AF_INET6, get_all_fun);
285}
286
287void
289 auto create_update_fun = [] (const BackendSelector& backend_selector,
290 const ServerSelector& server_selector,
291 const ClientClassDefPtr& client_class,
292 const std::string& follow_class_name) {
294 createUpdateClientClass6(backend_selector, server_selector, client_class,
295 follow_class_name);
296 };
297 setClientClass(callout_handle, AF_INET6, create_update_fun);
298}
299
300void
302 auto delete_fun = [] (const BackendSelector& backend_selector,
303 const ServerSelector& server_selector,
304 const std::string& name) {
305 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
306 deleteClientClass6(backend_selector, server_selector, name));
307 };
308 delClientClass(callout_handle, AF_INET6, delete_fun);
309}
310
311void
313 auto get_fun = [] (const BackendSelector& backend_selector,
314 const ServerSelector& server_selector,
315 const std::string& name) {
316 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
317 getClientClass6(backend_selector, server_selector, name));
318
319 };
320 getClientClass(callout_handle, AF_INET6, get_fun);
321}
322
323void
325 auto get_all_fun = [] (const BackendSelector& backend_selector,
326 const ServerSelector& server_selector) {
327 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
328 getAllClientClasses6(backend_selector, server_selector));
329 };
330 getAllClientClasses(callout_handle, AF_INET6, get_all_fun);
331}
332
333void
335 auto create_update_fun = [] (const BackendSelector& backend_selector,
336 const ServerSelector& server_selector,
337 const OptionDefinitionPtr& option_def) {
339 createUpdateOptionDef6(backend_selector, server_selector, option_def);
340 };
341 setOptionDef(callout_handle, AF_INET6, create_update_fun);
342}
343
344void
346 auto delete_fun = [] (const BackendSelector& backend_selector,
347 const ServerSelector& server_selector,
348 const uint16_t code,
349 const std::string& space,
350 bool force) {
351 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
352 deleteOptionDef6(backend_selector, server_selector,
353 code, space, force));
354 };
355 delOptionDef(callout_handle, AF_INET6, delete_fun);
356}
357
358void
360 auto get_fun = [] (const BackendSelector& backend_selector,
361 const ServerSelector& server_selector,
362 const uint16_t code,
363 const std::string& space) {
364 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
365 getOptionDef6(backend_selector, server_selector,
366 code, space));
367 };
368 getOptionDef(callout_handle, AF_INET6, get_fun);
369}
370
371void
373 auto get_all_fun = [] (const BackendSelector& backend_selector,
374 const ServerSelector& server_selector) {
375 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
376 getAllOptionDefs6(backend_selector, server_selector));
377
378 };
379 getAllOptionDefs(callout_handle, AF_INET6, get_all_fun);
380}
381
382void
384 auto create_update_fun = [] (const BackendSelector& backend_selector,
385 const ServerSelector& server_selector,
386 OptionDescriptor option_descriptor) {
387 const OptionDescriptorPtr& option =
388 OptionDescriptorPtr(new OptionDescriptor(option_descriptor));
390 createUpdateOption6(backend_selector, server_selector, option);
391 };
392 setGlobalOption(callout_handle, AF_INET6, create_update_fun);
393}
394
395void
397 auto delete_fun = [] (const BackendSelector& backend_selector,
398 const ServerSelector& server_selector,
399 const uint16_t code,
400 const std::string& space,
401 const ClientClassesPtr client_classes) {
402 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
403 deleteOption6(backend_selector, server_selector, code,
404 space, client_classes));
405 };
406 delGlobalOption(callout_handle, AF_INET6, delete_fun);
407}
408
409void
411 auto get_fun = [] (const BackendSelector& backend_selector,
412 const ServerSelector& server_selector,
413 const uint16_t code,
414 const std::string& space,
415 const ClientClassesPtr client_classes) {
416 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
417 getOption6(backend_selector, server_selector, code,
418 space, client_classes));
419 };
420 getGlobalOption(callout_handle, AF_INET6, get_fun);
421}
422
423void
425 auto get_all_fun = [] (const BackendSelector& backend_selector,
426 const ServerSelector& server_selector) {
427 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
428 getAllOptions6(backend_selector, server_selector));
429 };
430 getAllGlobalOptions(callout_handle, AF_INET6, get_all_fun);
431}
432
433void
435 auto create_update_fun = [] (const BackendSelector& backend_selector,
436 const ServerPtr& server) {
438 createUpdateServer6(backend_selector, server);
439 };
440 setServer(callout_handle, AF_INET6, create_update_fun);
441}
442
443void
445 auto delete_fun = [] (const BackendSelector& backend_selector,
446 const ServerTag& server_tag) {
447 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
448 deleteServer6(backend_selector, server_tag));
449 };
450 delServer(callout_handle, AF_INET6, delete_fun);
451}
452
453void
455 auto get_fun = [] (const BackendSelector& backend_selector,
456 const ServerTag& server_tag) {
457 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
458 getServer6(backend_selector, server_tag));
459 };
460 getServer(callout_handle, AF_INET6, get_fun);
461}
462
463void
465 auto get_all_fun = [] (const BackendSelector& backend_selector) {
466 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
467 getAllServers6(backend_selector));
468 };
469 getAllServers(callout_handle, AF_INET6, get_all_fun);
470}
471
472void
474 auto create_update_fun = [] (const BackendSelector& backend_selector,
475 const ServerSelector& server_selector,
476 const std::string& shared_network_name,
477 OptionDescriptor option_descriptor) {
478 const OptionDescriptorPtr& option =
479 OptionDescriptorPtr(new OptionDescriptor(option_descriptor));
481 createUpdateOption6(backend_selector, server_selector,
482 shared_network_name, option);
483 };
484 setSharedNetworkOption(callout_handle, AF_INET6, create_update_fun);
485}
486
487void
489 auto delete_fun = [] (const BackendSelector& backend_selector,
490 const ServerSelector& server_selector,
491 const std::string& shared_network_name,
492 const uint16_t code,
493 const std::string& space,
494 const ClientClassesPtr client_classes) {
495 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
496 deleteOption6(backend_selector, server_selector,
497 shared_network_name, code, space, client_classes));
498 };
499 delSharedNetworkOption(callout_handle, AF_INET6, delete_fun);
500}
501
502void
504 auto create_update_fun = [] (const BackendSelector& backend_selector,
505 const ServerSelector& server_selector,
506 const SubnetID& subnet_id,
507 OptionDescriptor option_descriptor) {
508 const OptionDescriptorPtr& option =
509 OptionDescriptorPtr(new OptionDescriptor(option_descriptor));
511 createUpdateOption6(backend_selector, server_selector,
512 subnet_id, option);
513 };
514 setSubnetOption(callout_handle, AF_INET6, create_update_fun);
515}
516
517void
519 auto delete_fun = [] (const BackendSelector& backend_selector,
520 const ServerSelector& server_selector,
521 const SubnetID& subnet_id,
522 const uint16_t code,
523 const std::string& space,
524 const ClientClassesPtr client_classes) {
525 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
526 deleteOption6(backend_selector, server_selector,
527 subnet_id, code, space, client_classes));
528 };
529 delSubnetOption(callout_handle, AF_INET6, delete_fun);
530}
531
532void
534 auto create_update_fun = [] (const BackendSelector& backend_selector,
535 const ServerSelector& server_selector,
536 const asiolink::IOAddress& pool_start_address,
537 const asiolink::IOAddress& pool_end_address,
538 OptionDescriptor option_descriptor) {
539 const OptionDescriptorPtr& option =
540 OptionDescriptorPtr(new OptionDescriptor(option_descriptor));
542 createUpdateOption6(backend_selector, server_selector,
543 pool_start_address, pool_end_address,
544 option);
545 };
546 setPoolOption(callout_handle, AF_INET6, create_update_fun);
547}
548
549void
551 auto delete_fun = [] (const BackendSelector& backend_selector,
552 const ServerSelector& server_selector,
553 const asiolink::IOAddress& pool_start_address,
554 const asiolink::IOAddress& pool_end_address,
555 const uint16_t code,
556 const std::string& space,
557 const ClientClassesPtr client_classes) {
558 return (ConfigBackendDHCPv6Mgr::instance().getPool()->
559 deleteOption6(backend_selector, server_selector,
560 pool_start_address, pool_end_address,
561 code, space, client_classes));
562 };
563 delPoolOption(callout_handle, AF_INET6, delete_fun);
564}
565
566void
568 try {
569 // Parse the command and store the pd pool prefix.
570 std::pair<asiolink::IOAddress, uint8_t> pd_pool_prefix =
571 std::make_pair(asiolink::IOAddress::IPV6_ZERO_ADDRESS(), 128);
572 db::BackendSelector backend_selector;
574 parser_->parseInputListElement<CBPdPoolPrefixParser>
575 (callout_handle, "pd-pools", pd_pool_prefix,
576 backend_selector, server_selector,
578
579 // Parse again the command and store the option data in
580 // the option_pair object.
581 std::pair<dhcp::OptionDescriptor, std::string> option_pair =
582 std::make_pair(dhcp::OptionDescriptor(false, false), "");
583 parser_->parseInputListElement
585 (callout_handle, "options", AF_INET6,
586 dhcp::CfgMgr::instance().getCurrentCfg()->getCfgOptionDef(),
587 option_pair);
588
589 auto option_descriptor = option_pair.first;
590 option_descriptor.space_name_ = option_pair.second;
591
592 // Pass the received arguments into the configuration backend.
593 const OptionDescriptorPtr& option =
594 OptionDescriptorPtr(new OptionDescriptor(option_descriptor));
596 createUpdateOption6(backend_selector, server_selector,
597 pd_pool_prefix.first, pd_pool_prefix.second,
598 option);
599
600 // The response contains option code and space.
602 option_info->set("code",
603 data::Element::create(static_cast<int64_t>
604 (option_descriptor.option_->getType())));
605 option_info->set("space",
606 data::Element::create(option_descriptor.space_name_));
607
608 // The option information is encapsulated in a single element list.
610 response_list->add(option_info);
611
612 data::ElementPtr response_arguments = data::Element::createMap();
613 response_arguments->set("options", response_list);
614
615 // Configuration backend didn't complain so let's return the success status.
616 std::ostringstream msg;
617 msg << "DHCPv6 option successfully set.";
618 data::ConstElementPtr response =
620 msg.str(), response_arguments);
621 callout_handle.setArgument("response", response);
622
623 } catch (const std::exception& ex) {
624 // Something went wrong. Return an error response to the client.
625 data::ConstElementPtr response =
627 callout_handle.setArgument("response", response);
628 }
629}
630
631void
633 try {
634 // Parse the command and store the pd pool prefix.
635 std::pair<asiolink::IOAddress, uint8_t> pd_pool_prefix =
636 std::make_pair(asiolink::IOAddress::IPV6_ZERO_ADDRESS(), 128);
637 db::BackendSelector backend_selector;
639 parser_->parseInputListElement<CBPdPoolPrefixParser>
640 (callout_handle, "pd-pools", pd_pool_prefix,
641 backend_selector, server_selector,
643
644 // Parse again the command and store the option code/space/client classes tuple.
645 CBOptionTuple option_tuple;
646 parser_->parseInputListElement<CBOptionTupleParser, uint16_t>
647 (callout_handle, "options", AF_INET6, option_tuple);
648
649 // Pass the received arguments into the configuration backend.
650 uint64_t count = ConfigBackendDHCPv6Mgr::instance().getPool()->
651 deleteOption6(backend_selector, server_selector,
652 pd_pool_prefix.first, pd_pool_prefix.second,
653 std::get<0>(option_tuple),
654 std::get<1>(option_tuple),
655 std::get<2>(option_tuple));
656
657 data::ElementPtr response_arguments = data::Element::createMap();
658 response_arguments->set("count",
659 data::Element::create(static_cast<long int>(count)));
660
661 // Configuration backend didn't complain so let's return the success status.
662 std::ostringstream msg;
663 msg << count << " DHCPv6 option(s) deleted.";
664 int rcode =
666 data::ConstElementPtr response =
667 config::createAnswer(rcode, msg.str(), response_arguments);
668 callout_handle.setArgument("response", response);
669
670 } catch (const std::exception& ex) {
671 // Something went wrong. Return an error response to the client.
672 data::ConstElementPtr response =
674 callout_handle.setArgument("response", response);
675 }
676}
677
678} // end of namespace isc::cb
679} // end of namespace isc
Parsers for a subset of an object specification, e.g.
@ integer
Definition data.h:153
@ boolean
Definition data.h:155
@ list
Definition data.h:159
@ string
Definition data.h:157
ConfigBackendPoolPtr getPool() const
Returns underlying config backend pool.
Implements a parser for parsing the option code and space and client-classes.
Definition cb_parsers.h:173
Implements a parser for a prefix delegation pool prefix.
Definition cb_parsers.h:548
void getSubnet6Id(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-get-by-id command.
void listSubnets6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-list command.
void delSubnet6Id(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-del-by-id command.
void delOptionDef6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-del command.
void getGlobalParameter6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-get command.
void delSharedNetwork6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-del command.
void listSharedNetworks6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-list command.
void getClientClass6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-get command.
void setGlobalParameter6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-set command.
void delGlobalParameter6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-del command.
void delGlobalOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-del command.
static const data::SimpleKeywords GLOBAL6_MAP_PARAMETERS
Supported global maps parameters (scalars only).
void delSharedNetworkOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-network-del command.
void getOptionDef6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-get command.
void getAllOptionDefs6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-get-all command.
void getGlobalOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-get command.
void delPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pool-del command.
void getAllGlobalOptions6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-get-all command.
void delServer6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-del command.
void setSubnetOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-subnet-set command.
void getServer6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-get command.
void getAllClientClasses6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-get-all command.
void delPdPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pd-pool-del command.
void setOptionDef6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option-def6-set command.
void delClientClass6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-del command.
void setClientClass6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-class6-set command.
void getAllGlobalParameters6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-global-parameter6-get-all command.
void delSubnet6Prefix(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-del-by-prefix command.
void setServer6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-set command.
void setSharedNetwork6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-set command.
void setGlobalOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-global-set command.
void getAllServers6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-server6-get-all command.
void setPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pool-set command.
void delSubnetOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-subnet-del command.
void getSharedNetwork6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-shared-network6-get command.
void setSubnet6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-set command.
void getSubnet6Prefix(hooks::CalloutHandle &callout_handle)
Implements handler for remote-subnet6-get-by-prefix command.
void setPdPoolOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-pd-pool-set command.
void setSharedNetworkOption6(hooks::CalloutHandle &callout_handle)
Implements handler for remote-option6-network-set command.
void setClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-class[46]-set command.
void getSubnetId(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-subnet[46]-get-by-id command.
void getGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-option[46]-global-get command.
void delPoolOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-pool-del command.
void getClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-class[46]-get command.
void getSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun, FunType2 get_all)
Implements handler for remote-shared-network[46]-get command.
void setSharedNetworkOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-network-set command.
void setSubnetOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-subnet-set command.
void getAllServers(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-server[46]-get-all command.
void setServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-server[46]-set command.
void delGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-global-parameter[46]-del command.
void delSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun, FunType2 delete_all_fun)
Implements handler for remote-shared-network[46]-del command.
void getGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType get_fun)
Implements handler for remote-global-parameter[46]-get command.
void getServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-server[46]-get command.
void delSubnetOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-subnet-del command.
void getOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-option-def[46]-get command.
void setGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-global-set command.
void getAllGlobalParameters(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-global-parameter[46]-get-all command.
void delOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option-def[46]-del command.
void delSubnetPrefix(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-subnet[46]-del-by-prefix command.
void delSharedNetworkOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-network-del command.
void delClientClass(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-class[46]-del command.
void getSubnetPrefix(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_fun)
Implements handler for remote-subnet[46]-get-by-prefix command.
void setPoolOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option[46]-pool-set command.
void listSubnets(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-subnet[46]-list command.
void getAllClientClasses(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all)
Implements handler for remote-class[46]-get-all command.
void getAllOptionDefs(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-option-def[46]-get-all command.
void getAllGlobalOptions(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all_fun)
Implements handler for remote-option[46]-global-get-all command.
boost::shared_ptr< ConfigCmdsParser > parser_
Shared pointer to the commands parser.
void delGlobalOption(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-option[46]-global-del command.
void delSubnetId(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-subnet[46]-del-by-id command.
void setSharedNetwork(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-shared-network[46]-set command.
void delServer(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType delete_fun)
Implements handler for remote-server[46]-del command.
void listSharedNetworks(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType get_all)
Implements handler for remote-shared-network[46]-list command.
void setSubnet(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-subnet[46]-set command.
void setGlobalParameter(hooks::CalloutHandle &callout_handle, const data::SimpleKeywords &keywords, const data::SimpleKeywords &list_keywords, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-global-parameter[46]-set command.
void setOptionDef(hooks::CalloutHandle &callout_handle, const uint16_t address_family, FunType create_update_fun)
Implements handler for remote-option-def[46]-set command.
@ TAGS_FORBIDDEN
server-tags is not allowed
static ElementPtr create(const Position &pos=ZERO_POSITION())
Create a NullElement.
Definition data.cc:300
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
Definition data.cc:355
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
Definition data.cc:350
Represents a server tag.
Definition server_tag.h:25
Config Backend selector.
Server selector for associating objects in a database with specific servers.
static ServerSelector UNASSIGNED()
Factory returning "unassigned" server selector.
static CfgMgr & instance()
returns a single instance of Configuration Manager
Definition cfgmgr.cc:29
SrvConfigPtr getCurrentCfg()
Returns a pointer to the current configuration.
Definition cfgmgr.cc:116
static ConfigBackendDHCPv6Mgr & instance()
Returns a sole instance of the ConfigBackendDHCPv6Mgr.
Parser for option data value.
Option descriptor.
Definition cfg_option.h:50
static const isc::data::SimpleKeywords GLOBAL6_PARAMETERS
This table defines all global parameters in DHCPv6.
static const isc::data::SimpleKeywords GLOBAL6_LIST_PARAMETERS
static const isc::data::SimpleKeywords GLOBAL6_LIST_PARAMETER_TYPES
Per-packet callout handle.
void setArgument(const std::string &name, T value)
Set argument.
std::tuple< uint16_t, std::string, ClientClassesPtr > CBOptionTuple
Defines a tuple for the three values that may be used as a key for an option.
Definition cb_parsers.h:168
const int CONTROL_RESULT_EMPTY
Status code indicating that the specified command was completed correctly, but failed to produce any ...
const int CONTROL_RESULT_ERROR
Status code indicating a general failure.
ConstElementPtr createAnswer()
Creates a standard config/command level success answer message (i.e.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
boost::shared_ptr< StampedValue > StampedValuePtr
Pointer to the stamped value.
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:30
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
Definition server.h:22
boost::shared_ptr< CfgOptionDef > CfgOptionDefPtr
Non-const pointer.
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition subnet.h:623
boost::shared_ptr< ClientClasses > ClientClassesPtr
Smart pointer to ClientClasses object.
Definition classify.h:304
boost::shared_ptr< ClientClassDef > ClientClassDefPtr
a pointer to an ClientClassDef
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
boost::shared_ptr< SharedNetwork6 > SharedNetwork6Ptr
Pointer to SharedNetwork6 object.
boost::shared_ptr< OptionDescriptor > OptionDescriptorPtr
A pointer to option descriptor.
Definition cfg_option.h:39
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
Defines the logger used by the top-level component of kea-lfc.