Kea 3.1.9
sflq_cmds.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#include <config/cmds_impl.h>
9#include <cc/data.h>
10#include <cc/simple_parser.h>
11#include <asiolink/io_address.h>
14#include <dhcpsrv/lease_mgr.h>
16#include <dhcpsrv/subnet_id.h>
17#include <hooks/hooks.h>
19#include <lease_cmds_log.h>
20#include <sflq_cmds.h>
22
23#include <string>
24#include <sstream>
25
26using namespace isc::dhcp;
27using namespace isc::data;
28using namespace isc::config;
29using namespace isc::asiolink;
30using namespace isc::hooks;
31using namespace isc::util;
32using namespace isc::log;
33using namespace std;
34
35namespace isc {
36namespace lease_cmds {
37
38int
40 static const data::SimpleKeywords keywords =
41 {
42 { "start-address", Element::string },
43 { "end-address", Element::string },
44 };
45
46 static const data::SimpleRequiredKeywords required_keywords =
47 {
48 "start-address",
49 "end-address",
50 };
51
52 stringstream resp;
53 try {
54 extractCommand(handle);
55 if (!cmd_args_ || cmd_args_->getType() != Element::map) {
56 isc_throw(isc::BadValue, "no parameters specified for the command");
57 }
58
59 SimpleParser::checkRequired(required_keywords, cmd_args_);
61
62 // Fetch the command parameters.
65 extractRange(cmd_args_, AF_INET, start_address, end_address);
66
67 // Fetch pools by range.
68 auto pools = LeaseMgrFactory::instance().sflqPool4Get(start_address, end_address);
69
70 // Since get can return more than one, look for an exact match.
71 bool rebuilt = false;
72 for (auto const& pool : *pools ) {
73 if (pool->start_address_ == start_address && pool->end_address_ == end_address) {
74 // Found a match, rebuild it.
75 // Invoke the pool create function inside a CriticalSection. Rebuilding
76 // large pools can take a long time.
78 LeaseMgrFactory::instance().sflqCreateFlqPool4(start_address, end_address,
79 pool->subnet_id_, true);
80 rebuilt = true;
81 break;
82 }
83 }
84
85 if (rebuilt){
87 "SFLQ pool rebuilt.", cmd_args_);
88 setResponse(handle, response);
89 } else {
90 auto response = createAnswer(CONTROL_RESULT_EMPTY,
91 "SFLQ pool does not exist.", cmd_args_);
92 setResponse(handle, response);
93 }
94
96 .arg(cmd_args_->str())
97 .arg(rebuilt ? 1 : 0);
98
99 } catch (const std::exception& ex) {
101 .arg(cmd_args_ ? cmd_args_->str() : "<no args>")
102 .arg(ex.what());
103 setErrorResponse(handle, ex.what());
104 return (1);
105 }
106
107 return (0);
108}
109
110int
112 return (sflqPoolGetAll(handle, AF_INET));
113}
114
115int
117 return (sflqPoolGetBySubnet(handle, AF_INET));
118}
119
120int
122 return (sflqPoolGetByRange(handle, AF_INET));
123}
124
125int
127 return (sflqPoolDel(handle, AF_INET));
128}
129
130int
132 static const data::SimpleKeywords keywords =
133 {
134 { "start-address", Element::string },
135 { "end-address", Element::string },
136 };
137
138 static const data::SimpleRequiredKeywords required_keywords =
139 {
140 "start-address",
141 "end-address",
142 };
143
144 stringstream resp;
145 try {
146 extractCommand(handle);
147 if (!cmd_args_ || cmd_args_->getType() != Element::map) {
148 isc_throw(isc::BadValue, "no parameters specified for the command");
149 }
150
151 SimpleParser::checkRequired(required_keywords, cmd_args_);
153
154 // Fetch the command parameters.
157 extractRange(cmd_args_, AF_INET6, start_address, end_address);
158
159 // Fetch pools by range.
160 auto pools = LeaseMgrFactory::instance().sflqPool6Get(start_address, end_address);
161
162 // Since get can return more than one, look for an exact match.
163 bool rebuilt = false;
164 for (auto const& pool : *pools ) {
165 if (pool->start_address_ == start_address && pool->end_address_ == end_address) {
166 // Found a match, rebuild it.
167 // Invoke the pool create function inside a CriticalSection. Rebuilding
168 // large pools can take a long time.
170 LeaseMgrFactory::instance().sflqCreateFlqPool6(start_address, end_address,
171 pool->lease_type_,
172 pool->delegated_len_,
173 pool->subnet_id_, true);
174 rebuilt = true;
175 break;
176 }
177 }
178
179 if (rebuilt){
180 auto response = createAnswer(CONTROL_RESULT_SUCCESS,
181 "SFLQ pool rebuilt.", cmd_args_);
182 setResponse(handle, response);
183 } else {
184 auto response = createAnswer(CONTROL_RESULT_EMPTY,
185 "SFLQ pool does not exist.", cmd_args_);
186 setResponse(handle, response);
187 }
188
190 .arg(cmd_args_->str())
191 .arg(rebuilt ? 1 : 0);
192 } catch (const std::exception& ex) {
194 .arg(cmd_args_ ? cmd_args_->str() : "<no args>")
195 .arg(ex.what());
196 setErrorResponse(handle, ex.what());
197 return (1);
198 }
199
200 return (0);
201}
202
203int
205 return (sflqPoolGetAll(handle, AF_INET6));
206}
207
208int
210 return (sflqPoolGetBySubnet(handle, AF_INET6));
211}
212
213int
215 return (sflqPoolGetByRange(handle, AF_INET6));
216}
217
218int
220 return (sflqPoolDel(handle, AF_INET6));
221}
222
223int
224SflqCmdsImpl::sflqPoolGetAll(CalloutHandle& handle, uint16_t family) {
225 static const data::SimpleKeywords keywords;
226 try {
227 extractCommand(handle);
228 if (cmd_args_ && ((cmd_args_->getType() != Element::map) ||
229 (cmd_args_->mapValue().size()) > 0)) {
230 isc_throw(BadValue, "command does not take any arguments");
231 }
232
233 // Invoke the pool get function.
234 auto pools = (family == AF_INET ? LeaseMgrFactory::instance().sflqPool4GetAll()
236
237 auto resp = buildGetResponse(pools);
238 setResponse(handle, resp);
240 (family == AF_INET ? SFLQ_POOL4_GET_ALL : SFLQ_POOL6_GET_ALL))
241 .arg(pools->size());
242 } catch (const std::exception& ex) {
245 .arg(cmd_args_ ? cmd_args_->str() : "<no args>")
246 .arg(ex.what());
247 setErrorResponse(handle, ex.what());
248 return (1);
249 }
250
251 return (0);
252}
253
254int
255SflqCmdsImpl::sflqPoolGetBySubnet(CalloutHandle& handle, uint16_t family) {
256 static const data::SimpleKeywords keywords =
257 {
258 { "subnet-id", Element::integer },
259 };
260
261 static const data::SimpleRequiredKeywords required_keywords =
262 {
263 "subnet-id",
264 };
265
266 try {
267 extractCommand(handle);
268 if (!cmd_args_ || cmd_args_->getType() != Element::map) {
269 isc_throw(isc::BadValue, "no parameters specified for the command");
270 }
271
272 SimpleParser::checkRequired(required_keywords, cmd_args_);
274
275 // Extract subnet-id.
276 int64_t subnet_id = SimpleParser::getInteger(cmd_args_, "subnet-id");
277 if ((subnet_id < 1) || (subnet_id >= SUBNET_ID_UNUSED)) {
278 isc_throw(isc::BadValue, "'subnet-id' " << subnet_id << " is invalid,"
279 " must be greater than zero and less than "
280 << SUBNET_ID_UNUSED);
281 }
282
283 // Invoke the pool get by subnet function.
284 auto pools = (family == AF_INET ? LeaseMgrFactory::instance().sflqPool4Get(subnet_id)
286
287 auto resp = buildGetResponse(pools);
288 setResponse(handle, resp);
291 .arg(cmd_args_->str())
292 .arg(pools->size());
293 } catch (const std::exception& ex) {
296 .arg(cmd_args_ ? cmd_args_->str() : "<no args>")
297 .arg(ex.what());
298 setErrorResponse(handle, ex.what());
299 return (1);
300 }
301
302 return (0);
303}
304
305int
306SflqCmdsImpl::sflqPoolGetByRange(CalloutHandle& handle, uint16_t family) {
307 static const data::SimpleKeywords keywords =
308 {
309 { "start-address", Element::string },
310 { "end-address", Element::string },
311 };
312
313 static const data::SimpleRequiredKeywords required_keywords =
314 {
315 "start-address",
316 "end-address",
317 };
318
319 try {
320 extractCommand(handle);
321 if (!cmd_args_ || cmd_args_->getType() != Element::map) {
322 isc_throw(isc::BadValue, "no parameters specified for the command");
323 }
324
325 SimpleParser::checkRequired(required_keywords, cmd_args_);
327
328 // Fetch the command parameters.
329 IOAddress start_address(IOAddress::IPV4_ZERO_ADDRESS());
330 IOAddress end_address(IOAddress::IPV4_ZERO_ADDRESS());
331 extractRange(cmd_args_, family, start_address, end_address);
332
333 // Invoke the pool get by subnet function.
334 auto pools = (family == AF_INET
335 ? LeaseMgrFactory::instance().sflqPool4Get(start_address, end_address)
336 : LeaseMgrFactory::instance().sflqPool6Get(start_address, end_address));
337
338 auto resp = buildGetResponse(pools);
339 setResponse(handle, resp);
341 (family == AF_INET ? SFLQ_POOL4_GET_BY_RANGE : SFLQ_POOL6_GET_BY_RANGE))
342 .arg(cmd_args_->str())
343 .arg(pools->size());
344 } catch (const std::exception& ex) {
347 .arg(cmd_args_ ? cmd_args_->str() : "<no args>")
348 .arg(ex.what());
349 setErrorResponse(handle, ex.what());
350 return (1);
351 }
352
353 return (0);
354}
355
356int
357SflqCmdsImpl::sflqPoolDel(CalloutHandle& handle, uint16_t family) {
358 static const data::SimpleKeywords keywords =
359 {
360 { "start-address", Element::string },
361 { "end-address", Element::string },
362 { "force", Element::boolean },
363 };
364
365 static const data::SimpleRequiredKeywords required_keywords =
366 {
367 "start-address",
368 "end-address",
369 };
370
371 try {
372 extractCommand(handle);
373 if (!cmd_args_ || cmd_args_->getType() != Element::map) {
374 isc_throw(isc::BadValue, "no parameters specified for the command");
375 }
376
377 SimpleParser::checkRequired(required_keywords, cmd_args_);
379
380 // Fetch the command parameters.
381 IOAddress start_address(IOAddress::IPV4_ZERO_ADDRESS());
382 IOAddress end_address(IOAddress::IPV4_ZERO_ADDRESS());
383 extractRange(cmd_args_, family, start_address, end_address);
384 bool force = extractBool(cmd_args_, "force", false);
385
386 // Invoke the pool get by subnet function.
387 bool deleted = (family == AF_INET
388 ? LeaseMgrFactory::instance().sflqPool4Del(start_address,
389 end_address, force)
390 : LeaseMgrFactory::instance().sflqPool6Del(start_address,
391 end_address, force));
392
393 if (deleted) {
394 auto response = createAnswer(CONTROL_RESULT_SUCCESS,
395 "SFLQ pool deleted", cmd_args_);
396 setResponse(handle, response);
397 } else {
398 auto response = createAnswer(CONTROL_RESULT_EMPTY,
399 "SFLQ pool does not exist", cmd_args_);
400 setResponse(handle, response);
401 }
402
404 (family == AF_INET ? SFLQ_POOL4_DEL : SFLQ_POOL6_DEL))
405 .arg(cmd_args_->str())
406 .arg(deleted ? 1 : 0);
407 } catch (const std::exception& ex) {
410 .arg(cmd_args_ ? cmd_args_->str() : "<no args>")
411 .arg(ex.what());
412 setErrorResponse(handle, ex.what());
413 return (1);
414 }
415
416 return (0);
417}
418
421 ElementPtr pools_json = Element::createList();
422 for (auto const& pool : *pools) {
423 pools_json->add(pool->toElement());
424 }
425
426 auto pool_cnt = pools_json->size();
427 stringstream resp_msg;
428 resp_msg << pool_cnt << " pool(s) found.";
429
431 args->set("pools", pools_json);
432
433 auto response = createAnswer(pool_cnt > 0 ?
435 resp_msg.str(), args);
436 return(response);
437}
438
439
440void
442 IOAddress& start_address, IOAddress& end_address) {
443 start_address = SimpleParser::getAddress(params, "start-address");
444 end_address = SimpleParser::getAddress(params, "end-address");
445 if (family == AF_INET) {
446 validateV4Range(start_address, end_address);
447 } else {
448 validateV6Range(start_address, end_address);
449 }
450}
451
452bool
453SflqCmdsImpl::extractBool(ConstElementPtr& params, const std::string& name,
454 bool default_value) {
455 auto tmp = params->get(name);
456 if (!tmp) {
457 return (default_value);
458 }
459
460 if (tmp->getType() != Element::boolean) {
461 isc_throw(BadValue, "'" << name << "' parameter is not boolean.");
462 }
463
464 return (tmp->boolValue());
465}
466
469 auto tmp = SimpleParser::getString(params, "lease-type");
470 if (family == AF_INET) {
471 if (tmp == "V4" || tmp == "3") {
472 return (Lease::TYPE_V4);
473 }
474
475 isc_throw(BadValue, "invalid 'lease-type': " << tmp << " must be 'V4'");
476 }
477
478 if (tmp == "IA_NA" || tmp == "0") {
479 return (Lease::TYPE_NA);
480 } else if (tmp == "IA_PD" || tmp == "2") {
481 return (Lease::TYPE_PD);
482 }
483
484 isc_throw(BadValue, "invalid V6 'lease-type': "
485 << tmp << ", valid values are IA_NA and IA_PD");
486}
487
489 : sflq_impl_(new SflqCmdsImpl()) {
490}
491
492int
494 return (sflq_impl_->sflqPool4RebuildHandler(handle));
495}
496
497int
499 return (sflq_impl_->sflqPool4GetAllHandler(handle));
500}
501
502int
504 return (sflq_impl_->sflqPool4GetBySubnetHandler(handle));
505}
506
507int
509 return (sflq_impl_->sflqPool4GetByRangeHandler(handle));
510}
511
512int
514 return (sflq_impl_->sflqPool4DelHandler(handle));
515}
516
517int
519 return (sflq_impl_->sflqPool6RebuildHandler(handle));
520}
521
522int
524 return (sflq_impl_->sflqPool6GetAllHandler(handle));
525}
526
527int
529 return (sflq_impl_->sflqPool6GetBySubnetHandler(handle));
530}
531
532int
534 return (sflq_impl_->sflqPool6GetByRangeHandler(handle));
535}
536
537int
539 return (sflq_impl_->sflqPool6DelHandler(handle));
540}
541
542} // end of namespace lease_cmds
543} // end of namespace isc
@ map
Definition data.h:160
@ integer
Definition data.h:153
@ boolean
Definition data.h:155
@ string
Definition data.h:157
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
Definition data.cc:354
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
Definition data.cc:349
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
void setErrorResponse(hooks::CalloutHandle &handle, const std::string &text, int status=CONTROL_RESULT_ERROR)
Set the callout argument "response" to indicate an error.
Definition cmds_impl.h:54
data::ConstElementPtr cmd_args_
Stores the command arguments extracted by a call to extractCommand.
Definition cmds_impl.h:72
void extractCommand(hooks::CalloutHandle &handle)
Extracts the command name and arguments from a Callout handle.
Definition cmds_impl.h:29
void setResponse(hooks::CalloutHandle &handle, data::ConstElementPtr &response)
Set the callout argument "response" to the given response.
Definition cmds_impl.h:64
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 isc::asiolink::IOAddress getAddress(const ConstElementPtr &scope, const std::string &name)
Returns a IOAddress parameter from a scope.
static std::string getString(isc::data::ConstElementPtr scope, const std::string &name)
Returns a string parameter from a scope.
static int64_t getInteger(isc::data::ConstElementPtr scope, const std::string &name)
Returns an integer parameter from a scope.
static TrackingLeaseMgr & instance()
Return current lease manager.
virtual bool sflqPool4Del(asiolink::IOAddress start_address, asiolink::IOAddress end_address, bool force=false)
Delete the SFLQ V4 pool that matches a start and end address.
virtual bool sflqPool6Del(asiolink::IOAddress start_address, asiolink::IOAddress end_address, bool force=false)
Delete the SFLQ V6 pool that matches a start and end address.
virtual SflqPoolInfoCollectionPtr sflqPool4Get(SubnetID subnet_id)
Fetch all SFLQ V4 pools belonging to a subnet.
virtual SflqPoolInfoCollectionPtr sflqPool4GetAll()
Fetch all SFLQ V4 pools.
virtual bool sflqCreateFlqPool4(asiolink::IOAddress start_address, asiolink::IOAddress end_address, SubnetID subnet_id, bool recreate=false)
Creates a v4 SFLQ Pool.
virtual SflqPoolInfoCollectionPtr sflqPool6GetAll()
Fetch all SFLQ V6 pools.
virtual SflqPoolInfoCollectionPtr sflqPool6Get(SubnetID subnet_id)
Fetch all SFLQ V6 pools belonging to a subnet.
virtual bool sflqCreateFlqPool6(asiolink::IOAddress start_address, asiolink::IOAddress end_address, Lease::Type lease_type, uint8_t delegated_len, SubnetID subnet_id, bool recreate=false)
Calls stored procedure to create an SFLQ pool for v6.
Per-packet callout handle.
Implements the logic for processing commands pertaining to SFLQ pools and data.
Definition sflq_cmds.h:26
int sflqPool6DelHandler(hooks::CalloutHandle &handle)
Delete the SFLQ V6 pool that matches a start and end address.
Definition sflq_cmds.cc:219
static bool extractBool(data::ConstElementPtr &params, const std::string &name, bool default_value=false)
Extracts a boolean from given parameters map.
Definition sflq_cmds.cc:453
static dhcp::Lease::Type extractLeaseType(data::ConstElementPtr &params, uint16_t family)
Extracts 'lease-type' from given parameters map.
Definition sflq_cmds.cc:468
static data::ConstElementPtr buildGetResponse(dhcp::SflqPoolInfoCollectionPtr pools)
Creates a success response from a list of SqlPoolInfos.
Definition sflq_cmds.cc:420
int sflqPool6RebuildHandler(hooks::CalloutHandle &handle)
The 'sflq-pool6-rebuild' command handler.
Definition sflq_cmds.cc:131
int sflqPool6GetBySubnetHandler(hooks::CalloutHandle &handle)
The 'sflq-pool6-by-subnet' command handler.
Definition sflq_cmds.cc:209
static void extractRange(data::ConstElementPtr &params, uint8_t family, asiolink::IOAddress &start_address, asiolink::IOAddress &end_address)
Extracts an ip address range from given parameters map.
Definition sflq_cmds.cc:441
int sflqPool4GetByRangeHandler(hooks::CalloutHandle &handle)
Handles a 'sflq-pool4-by-range' command.
Definition sflq_cmds.cc:121
int sflqPool4GetAllHandler(hooks::CalloutHandle &handle)
The 'sflq-pool4-get-all' command handler.
Definition sflq_cmds.cc:111
int sflqPool4RebuildHandler(hooks::CalloutHandle &handle)
The 'sflq-pool4-rebuild' command handler.
Definition sflq_cmds.cc:39
int sflqPool4GetBySubnetHandler(hooks::CalloutHandle &handle)
The 'sflq-pool4-by-subnet' command handler.
Definition sflq_cmds.cc:116
int sflqPool6GetByRangeHandler(hooks::CalloutHandle &handle)
Handles a 'sflq-pool6-by-range' command.
Definition sflq_cmds.cc:214
int sflqPool6GetAllHandler(hooks::CalloutHandle &handle)
The 'sflq-pool6-get-all' command handler.
Definition sflq_cmds.cc:204
int sflqPool4DelHandler(hooks::CalloutHandle &handle)
Delete the SFLQ V4 pool that matches a start and end address.
Definition sflq_cmds.cc:126
int sflqPool4DelHandler(hooks::CalloutHandle &handle)
Delete the SFLQ V4 pool that matches a start and end address.
Definition sflq_cmds.cc:513
int sflqPool4GetBySubnetHandler(hooks::CalloutHandle &handle)
The 'sflq-pool4-get-by-subnet' command handler.
Definition sflq_cmds.cc:503
int sflqPool6RebuildHandler(hooks::CalloutHandle &handle)
The 'sflq-pool6-rebuild' command handler.
Definition sflq_cmds.cc:518
int sflqPool6GetAllHandler(hooks::CalloutHandle &handle)
The 'sflq-pool6-get-all' command handler.
Definition sflq_cmds.cc:523
int sflqPool4GetByRangeHandler(hooks::CalloutHandle &handle)
Handles a 'sflq-pool4-by-range' command.
Definition sflq_cmds.cc:508
int sflqPool4GetAllHandler(hooks::CalloutHandle &handle)
The 'sflq-pool4-get-all' command handler.
Definition sflq_cmds.cc:498
int sflqPool6GetByRangeHandler(hooks::CalloutHandle &handle)
Handles a 'sflq-pool6-by-range' command.
Definition sflq_cmds.cc:533
int sflqPool6DelHandler(hooks::CalloutHandle &handle)
Delete the SFLQ V6 pool that matches a start and end address.
Definition sflq_cmds.cc:538
int sflqPool6GetBySubnetHandler(hooks::CalloutHandle &handle)
The 'sflq-pool6-get-by-subnet' command handler.
Definition sflq_cmds.cc:528
int sflqPool4RebuildHandler(hooks::CalloutHandle &handle)
sflq-pool4-rebuild handler.
Definition sflq_cmds.cc:493
RAII class creating a critical section.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
const isc::log::MessageID SFLQ_POOL6_GET_BY_RANGE_FAILED
const isc::log::MessageID SFLQ_POOL4_REBUILD
const isc::log::MessageID SFLQ_POOL4_GET_BY_SUBNET_FAILED
const isc::log::MessageID SFLQ_POOL4_GET_ALL
const isc::log::MessageID SFLQ_POOL4_DEL_FAILED
const isc::log::MessageID SFLQ_POOL6_GET_ALL
const isc::log::MessageID SFLQ_POOL6_GET_BY_RANGE
const isc::log::MessageID SFLQ_POOL4_GET_BY_RANGE_FAILED
const isc::log::MessageID SFLQ_POOL6_DEL_FAILED
const isc::log::MessageID SFLQ_POOL6_DEL
const isc::log::MessageID SFLQ_POOL4_GET_ALL_FAILED
const isc::log::MessageID SFLQ_POOL4_REBUILD_FAILED
const isc::log::MessageID SFLQ_POOL6_GET_BY_SUBNET_FAILED
const isc::log::MessageID SFLQ_POOL4_GET_BY_RANGE
const isc::log::MessageID SFLQ_POOL4_GET_BY_SUBNET
const isc::log::MessageID SFLQ_POOL6_REBUILD
const isc::log::MessageID SFLQ_POOL6_GET_BY_SUBNET
const isc::log::MessageID SFLQ_POOL4_DEL
const isc::log::MessageID SFLQ_POOL6_REBUILD_FAILED
const isc::log::MessageID SFLQ_POOL6_GET_ALL_FAILED
An abstract API for lease database.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
Definition macros.h:32
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
Definition macros.h:14
const int CONTROL_RESULT_EMPTY
Status code indicating that the specified command was completed correctly, but failed to produce any ...
ConstElementPtr createAnswer()
Creates a standard config/command level success answer message (i.e.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
std::vector< std::string > SimpleRequiredKeywords
This specifies all required keywords.
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< SflqPoolInfoCollection > SflqPoolInfoCollectionPtr
Definition lease_mgr.h:262
const int LEASE_CMDS_DBG_COMMAND_DATA
Logging level used to log successful commands.
isc::log::Logger lease_cmds_logger("lease-cmds-hooks")
Defines the logger used by the top-level component of kea-lfc.
Type
Type of lease or pool.
Definition lease.h:46
@ TYPE_PD
the lease contains IPv6 prefix (for prefix delegation)
Definition lease.h:49
@ TYPE_V4
IPv4 lease.
Definition lease.h:50
@ TYPE_NA
the lease contains non-temporary IPv6 address
Definition lease.h:47