Kea 3.3.3
pool.cc
Go to the documentation of this file.
1// Copyright (C) 2012-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 <dhcpsrv/pool.h>
12#include <boost/make_shared.hpp>
13#include <sstream>
14
15using namespace isc::asiolink;
16using namespace isc::data;
17
18namespace isc {
19namespace dhcp {
20
22 const isc::asiolink::IOAddress& last)
23 : id_(0), first_(first), last_(last), type_(type), capacity_(0),
24 cfg_option_(new CfgOption()) {
25}
26
27bool
29 return (first_ <= addr && addr <= last_);
30}
31
32bool
33Pool::clientSupported(const ClientClasses& classes) const {
34 return (client_classes_.empty() || client_classes_.intersects(classes));
35}
36
37void
39 if (!client_classes_.contains(class_name)) {
40 client_classes_.insert(class_name);
41 }
42}
43
44void
46 if (!additional_classes_.contains(class_name)) {
47 additional_classes_.insert(class_name);
48 }
49}
50
51std::string
52Pool::toText() const {
53 std::stringstream tmp;
54 tmp << "type=" << Lease::typeToText(type_) << ", " << first_
55 << "-" << last_;
56 return (tmp.str());
57}
58
59bool
61 return (!(ddns_send_updates_.unspecified() &&
62 ddns_override_no_update_.unspecified() &&
63 ddns_override_client_update_.unspecified() &&
64 ddns_replace_client_name_mode_.unspecified() &&
65 ddns_generated_prefix_.unspecified() &&
66 ddns_qualifying_suffix_.unspecified() &&
67 ddns_update_on_renew_.unspecified() &&
68 ddns_conflict_resolution_mode_.unspecified() &&
69 ddns_ttl_percent_.unspecified() &&
70 ddns_ttl_.unspecified() &&
71 ddns_ttl_min_.unspecified() &&
72 ddns_ttl_max_.unspecified() &&
73 hostname_char_set_.unspecified() &&
74 hostname_char_replacement_.unspecified()));
75}
76
78 const isc::asiolink::IOAddress& last)
79 : Pool(Lease::TYPE_V4, first, last) {
80 // check if specified address boundaries are sane
81 if (!first.isV4() || !last.isV4()) {
82 isc_throw(BadValue, "Invalid Pool4 address boundaries: not IPv4");
83 }
84
85 if (last < first) {
86 isc_throw(BadValue, "Upper boundary is smaller than lower boundary.");
87 }
88
89 // This is IPv4 pool, which only has one type. We can calculate
90 // the number of theoretically possible leases in it. As there's 2^32
91 // possible IPv4 addresses, we'll be able to accurately store that
92 // info.
93 capacity_ = addrsInRange(first, last);
94}
95
96Pool4::Pool4(const isc::asiolink::IOAddress& prefix, uint8_t prefix_len)
97 : Pool(Lease::TYPE_V4, prefix, IOAddress("0.0.0.0")) {
98
99 // check if the prefix is sane
100 if (!prefix.isV4()) {
101 isc_throw(BadValue, "Invalid Pool4 address boundaries: not IPv4");
102 }
103
104 // check if the prefix length is sane
105 if (prefix_len == 0 || prefix_len > 32) {
106 isc_throw(BadValue, "Invalid prefix length");
107 }
108
109 IOAddress first_address = firstAddrInPrefix(prefix, prefix_len);
110 if (first_address != prefix) {
111 isc_throw(BadValue, "Invalid Pool4 address boundaries: " << prefix
112 << " is not the first address in prefix: " << first_address
113 << "/" << static_cast<uint32_t>(prefix_len));
114 }
115
116 // Let's now calculate the last address in defined pool
117 last_ = lastAddrInPrefix(prefix, prefix_len);
118
119 // This is IPv4 pool, which only has one type. We can calculate
120 // the number of theoretically possible leases in it. As there's 2^32
121 // possible IPv4 addresses, we'll be able to accurately store that
122 // info.
123 capacity_ = addrsInRange(prefix, last_);
124}
125
127Pool4::create(const IOAddress& first, const IOAddress& last) {
128 return (boost::make_shared<Pool4>(first, last));
129}
130
132Pool4::create(const IOAddress& prefix, uint8_t prefix_len) {
133 return (boost::make_shared<Pool4>(prefix, prefix_len));
134}
135
138 // Prepare the map
140
141 // Set user-context
142 contextToElement(map);
143
144 // Set pool options
146 map->set("option-data", opts->toElement());
147
148 // Set client-classes
149 if (!client_classes_.empty()) {
150 map->set("client-classes", client_classes_.toElement());
151 }
152
153 // Set evaluate-additional-classes
154 if (!additional_classes_.empty()) {
155 map->set("evaluate-additional-classes",
156 additional_classes_.toElement());
157 }
158
159 if (id_) {
160 map->set("pool-id", Element::create(static_cast<long long>(id_)));
161 }
162
163 // Add in DDNS parameters for non-prefix pools.
164 if (type_ != Lease::TYPE_PD) {
165 if (!ddns_send_updates_.unspecified()) {
166 map->set("ddns-send-updates", Element::create(ddns_send_updates_));
167 }
168
169 if (!ddns_override_no_update_.unspecified()) {
170 map->set("ddns-override-no-update", Element::create(ddns_override_no_update_));
171 }
172
173 if (!ddns_override_client_update_.unspecified()) {
174 map->set("ddns-override-client-update", Element::create(ddns_override_client_update_));
175 }
176
177 if (!ddns_replace_client_name_mode_.unspecified()) {
178 map->set("ddns-replace-client-name",
180 replaceClientNameModeToString(ddns_replace_client_name_mode_)));
181 }
182
183 if (!ddns_generated_prefix_.unspecified()) {
184 map->set("ddns-generated-prefix", Element::create(ddns_generated_prefix_));
185 }
186
187 if (!ddns_qualifying_suffix_.unspecified()) {
188 map->set("ddns-qualifying-suffix", Element::create(ddns_qualifying_suffix_));
189 }
190
191 if (!ddns_reverse_zone_.unspecified()) {
192 map->set("ddns-reverse-zone", Element::create(ddns_reverse_zone_));
193 }
194
195 if (!ddns_update_on_renew_.unspecified()) {
196 map->set("ddns-update-on-renew", Element::create(ddns_update_on_renew_));
197 }
198
199 if (!ddns_conflict_resolution_mode_.unspecified()) {
200 map->set("ddns-conflict-resolution-mode", Element::create(ddns_conflict_resolution_mode_));
201 }
202
203 if (!ddns_ttl_percent_.unspecified()) {
204 map->set("ddns-ttl-percent", Element::create(ddns_ttl_percent_));
205 }
206
207 if (!ddns_ttl_.unspecified()) {
208 map->set("ddns-ttl", Element::create(ddns_ttl_));
209 }
210
211 if (!ddns_ttl_min_.unspecified()) {
212 map->set("ddns-ttl-min", Element::create(ddns_ttl_min_));
213 }
214
215 if (!ddns_ttl_max_.unspecified()) {
216 map->set("ddns-ttl-max", Element::create(ddns_ttl_max_));
217 }
218
219 if (!hostname_char_set_.unspecified()) {
220 map->set("hostname-char-set", Element::create(hostname_char_set_));
221 }
222
223 if (!hostname_char_replacement_.unspecified()) {
224 map->set("hostname-char-replacement", Element::create(hostname_char_replacement_));
225 }
226 }
227
228 return (map);
229}
230
233 // Prepare the map
235
236 // Set pool
237 const IOAddress& first = getFirstAddress();
238 const IOAddress& last = getLastAddress();
239 std::string range = first.toText() + "-" + last.toText();
240
241 // Try to output a prefix (vs a range)
242 int prefix_len = prefixLengthFromRange(first, last);
243 if (prefix_len >= 0) {
244 std::ostringstream oss;
245 oss << first.toText() << "/" << prefix_len;
246 range = oss.str();
247 }
248
249 map->set("pool", Element::create(range));
250 return (map);
251}
252
254 const isc::asiolink::IOAddress& last)
255 : Pool(type, first, last), prefix_len_(128), pd_exclude_option_() {
256
257 // check if specified address boundaries are sane
258 if (!first.isV6() || !last.isV6()) {
259 isc_throw(BadValue, "Invalid Pool6 address boundaries: not IPv6");
260 }
261
262 if ((type != Lease::TYPE_NA) && (type != Lease::TYPE_PD)) {
263 isc_throw(BadValue, "Invalid Pool6 type: " << static_cast<int>(type)
264 << ", must be TYPE_IA or TYPE_PD");
265 }
266
267 if (last < first) {
268 isc_throw(BadValue, "Upper boundary is smaller than lower boundary.");
269 // This check is a bit strict. If we decide that it is too strict,
270 // we need to comment it and uncomment lines below.
271 // On one hand, letting the user specify 2001::f - 2001::1 is nice, but
272 // on the other hand, 2001::1 may be a typo and the user really meant
273 // 2001::1:0 (or 1 followed by some hex digit), so a at least a warning
274 // would be useful.
275
276 // first_ = last;
277 // last_ = first;
278 }
279
280 // TYPE_PD is not supported by this constructor. first-last style
281 // parameters are for NA only. There is another dedicated
282 // constructor for that (it uses prefix/length)
283 if (type != Lease::TYPE_NA) {
284 isc_throw(BadValue, "Invalid Pool6 type specified: "
285 << static_cast<int>(type));
286 }
287
288 // Let's calculate the theoretical number of leases in this pool.
289 // If the pool is extremely large (i.e. contains more than 2^64 addresses,
290 // we'll just cap it at max value of uint64_t).
291 capacity_ = addrsInRange(first, last);
292}
293
295 const uint8_t prefix_len, const uint8_t delegated_len /* = 128 */)
296 : Pool(type, prefix, IOAddress::IPV6_ZERO_ADDRESS()),
297 prefix_len_(delegated_len), pd_exclude_option_() {
298
299 init(type, prefix, prefix_len, delegated_len,
301}
302
303Pool6::Pool6(const asiolink::IOAddress& prefix, const uint8_t prefix_len,
304 const uint8_t delegated_len,
305 const asiolink::IOAddress& excluded_prefix,
306 const uint8_t excluded_prefix_len)
307 : Pool(Lease::TYPE_PD, prefix, IOAddress::IPV6_ZERO_ADDRESS()),
308 prefix_len_(delegated_len), pd_exclude_option_() {
309
310 init(Lease::TYPE_PD, prefix, prefix_len, delegated_len, excluded_prefix,
311 excluded_prefix_len);
312
313 // The excluded prefix can only be specified using this constructor.
314 // Therefore, the initialization of the excluded prefix is takes place
315 // here, rather than in the init(...) function.
316 if (!excluded_prefix.isV6()) {
317 isc_throw(BadValue, "excluded prefix must be an IPv6 prefix");
318 }
319
320 // An "unspecified" prefix should have both value and length equal to 0.
321 if ((excluded_prefix.isV6Zero() && (excluded_prefix_len != 0)) ||
322 (!excluded_prefix.isV6Zero() && (excluded_prefix_len == 0))) {
323 isc_throw(BadValue, "invalid excluded prefix "
324 << excluded_prefix << "/"
325 << static_cast<unsigned>(excluded_prefix_len));
326 }
327
328 // If excluded prefix has been specified.
329 if (!excluded_prefix.isV6Zero() && (excluded_prefix_len != 0)) {
330 // Excluded prefix length must not be greater than 128.
331 if (excluded_prefix_len > 128) {
332 isc_throw(BadValue, "excluded prefix length "
333 << static_cast<unsigned>(excluded_prefix_len)
334 << " must not be greater than 128");
335 }
336
337 // Excluded prefix must be a sub-prefix of a delegated prefix. First
338 // check the prefix length as it is less involved.
339 if (excluded_prefix_len <= prefix_len_) {
340 isc_throw(BadValue, "excluded prefix length "
341 << static_cast<unsigned>(excluded_prefix_len)
342 << " must be longer than the delegated prefix length "
343 << static_cast<unsigned>(prefix_len_));
344 }
345
351 }
352}
353
355Pool6::create(Lease::Type type, const IOAddress& first, const IOAddress& last) {
356 return (boost::make_shared<Pool6>(type, first, last));
357}
358
361 uint8_t prefix_len, uint8_t delegated_len) {
362 return (boost::make_shared<Pool6>(type, prefix, prefix_len, delegated_len));
363}
364
366Pool6::create(const IOAddress& prefix, const uint8_t prefix_len,
367 const uint8_t delegated_len, const IOAddress& excluded_prefix,
368 const uint8_t excluded_prefix_len) {
369 return (boost::make_shared<Pool6>(prefix, prefix_len,
370 delegated_len, excluded_prefix,
371 excluded_prefix_len));
372}
373
374void
375Pool6::init(const Lease::Type& type,
376 const asiolink::IOAddress& prefix,
377 const uint8_t prefix_len,
378 const uint8_t delegated_len,
379 const asiolink::IOAddress& excluded_prefix,
380 const uint8_t excluded_prefix_len) {
381 // Check if the prefix is sane
382 if (!prefix.isV6()) {
383 isc_throw(BadValue, "Invalid Pool6 address boundaries: not IPv6");
384 }
385
386 // Check if the prefix length is sane
387 if (prefix_len == 0 || prefix_len > 128) {
388 isc_throw(BadValue, "Invalid prefix length: "
389 << static_cast<unsigned>(prefix_len));
390 }
391
392 if (prefix_len > delegated_len) {
393 isc_throw(BadValue, "Delegated length ("
394 << static_cast<int>(delegated_len)
395 << ") must be longer than or equal to prefix length ("
396 << static_cast<int>(prefix_len) << ")");
397 }
398
399 if ((type != Lease::TYPE_PD) && (delegated_len != 128)) {
400 isc_throw(BadValue, "For NA or TA pools, delegated prefix length must"
401 << " be 128.");
402 }
403
404 // excluded_prefix_len == 0 means there's no excluded prefix at all.
405 if (excluded_prefix_len && (excluded_prefix_len <= delegated_len)) {
406 isc_throw(BadValue, "Excluded prefix ("
407 << static_cast<int>(excluded_prefix_len)
408 << ") must be longer than the delegated prefix length ("
409 << static_cast<int>(delegated_len) << ")");
410 }
411
412 if (prefix_len != 128) {
413 IOAddress first_address = firstAddrInPrefix(prefix, prefix_len);
414 if (first_address != prefix) {
415 isc_throw(BadValue, "Invalid Pool6 address boundaries: " << prefix
416 << " is not the first address in prefix: " << first_address
417 << "/" << static_cast<uint32_t>(prefix_len));
418 }
419 }
420
423
424 // Let's now calculate the last address in defined pool
425 last_ = lastAddrInPrefix(prefix, prefix_len);
426
427 // Let's calculate the theoretical number of leases in this pool.
428 // For addresses, we could use addrsInRange(prefix, last_), but it's
429 // much faster to do calculations on prefix lengths.
430 capacity_ = prefixesInRange(prefix_len, delegated_len);
431
432 // If user specified an excluded prefix, create an option that will
433 // be sent to clients obtaining prefixes from this pool.
434 if (excluded_prefix_len > 0) {
435 pd_exclude_option_.reset(new Option6PDExclude(prefix, delegated_len,
436 excluded_prefix,
437 excluded_prefix_len));
438 }
439}
440
443 // Prepare the map
445
446 switch (getType()) {
447 case Lease::TYPE_NA: {
448 const IOAddress& first = getFirstAddress();
449 const IOAddress& last = getLastAddress();
450 std::string range = first.toText() + "-" + last.toText();
451
452 // Try to output a prefix (vs a range)
453 int prefix_len = prefixLengthFromRange(first, last);
454 if (prefix_len >= 0) {
455 std::ostringstream oss;
456 oss << first.toText() << "/" << prefix_len;
457 range = oss.str();
458 }
459
460 map->set("pool", Element::create(range));
461 break;
462 }
463 case Lease::TYPE_PD: {
464 // Set prefix
465 const IOAddress& prefix = getFirstAddress();
466 map->set("prefix", Element::create(prefix.toText()));
467
468 // Set prefix-len (get it from min - max)
469 const IOAddress& last = getLastAddress();
470 int prefix_len = prefixLengthFromRange(prefix, last);
471 if (prefix_len < 0) {
472 // The pool is bad: give up
473 isc_throw(ToElementError, "invalid prefix range "
474 << prefix.toText() << "-" << last.toText());
475 }
476 map->set("prefix-len", Element::create(prefix_len));
477
478 // Set delegated-len
479 uint8_t len = getLength();
480 map->set("delegated-len", Element::create(static_cast<int>(len)));
481
482 // Set excluded prefix
484 if (xopt) {
485 const IOAddress& xprefix = xopt->getExcludedPrefix(prefix, len);
486 map->set("excluded-prefix", Element::create(xprefix.toText()));
487
488 uint8_t xlen = xopt->getExcludedPrefixLength();
489 map->set("excluded-prefix-len",
490 Element::create(static_cast<int>(xlen)));
491 }
492 // Let's not insert empty excluded-prefix values. If we ever
493 // decide to insert it after all, here's the code to do it:
494 // else {
495 // map->set("excluded-prefix",
496 // Element::create(std::string("::")));
497 // map->set("excluded-prefix-len", Element::create(0));
499
500 break;
501 }
502 default:
503 isc_throw(ToElementError, "Lease type: " << getType()
504 << ", unsupported for Pool6");
505 break;
506 }
507
508 return (map);
509}
510
511std::string
513 std::ostringstream s;
514 s << "type=" << Lease::typeToText(type_) << ", " << first_
515 << "-" << last_ << ", delegated_len="
516 << static_cast<unsigned>(prefix_len_);
517
518 if (pd_exclude_option_) {
519 s << ", excluded_prefix="
520 << pd_exclude_option_->getExcludedPrefix(first_, prefix_len_).toText()
521 << "/"
522 << static_cast<unsigned>(pd_exclude_option_->getExcludedPrefixLength());
523 }
524 return (s.str());
525}
526
527} // namespace dhcp
528} // namespace isc
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
Cannot unparse error.
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
Represents option data configuration for the DHCP server.
Definition cfg_option.h:405
Container for storing client class names.
Definition classify.h:111
Acts as a storage vault for D2 client configuration.
virtual data::ElementPtr toElement() const
Unparse a Pool4 object.
Definition pool.cc:232
Pool4(const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
the constructor for Pool4 "min-max" style definition
Definition pool.cc:77
static Pool4Ptr create(const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
Factory function for creating an instance of the Pool4.
Definition pool.cc:127
uint8_t getLength() const
returns delegated prefix length
Definition pool.h:684
virtual data::ElementPtr toElement() const
Unparse a Pool6 object.
Definition pool.cc:442
Option6PDExcludePtr getPrefixExcludeOption() const
Returns instance of the pool specific Prefix Exclude option.
Definition pool.h:692
static Pool6Ptr create(Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
Factory function for creating an instance of the Pool6.
Definition pool.cc:355
virtual std::string toText() const
returns textual representation of the pool
Definition pool.cc:512
Pool6(Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
the constructor for Pool6 "min-max" style definition
Definition pool.cc:253
Lease::Type getType() const
returns pool type
Definition pool.h:675
virtual data::ElementPtr toElement() const
Unparse a pool object.
Definition pool.cc:137
util::Optional< uint32_t > ddns_ttl_
Explicit value to use for DNS TTL.
Definition pool.h:473
CfgOptionPtr cfg_option_
Pointer to the option data configuration for this pool.
Definition pool.h:419
util::Optional< std::string > hostname_char_replacement_
A string to replace invalid characters when scrubbing hostnames.
Definition pool.h:487
util::Optional< uint32_t > ddns_ttl_max_
Maximum value to use for DNS TTL.
Definition pool.h:479
util::Optional< bool > ddns_update_on_renew_
Should Kea perform updates when leases are extended.
Definition pool.h:464
Pool(Lease::Type type, const isc::asiolink::IOAddress &first, const isc::asiolink::IOAddress &last)
protected constructor
Definition pool.cc:21
util::Optional< std::string > ddns_qualifying_suffix_
Suffix Kea should use when to qualify partial domain-names.
Definition pool.h:458
util::Optional< std::string > hostname_char_set_
Regular expression describing invalid characters for client hostnames.
Definition pool.h:483
const isc::asiolink::IOAddress & getFirstAddress() const
Returns the first address in a pool.
Definition pool.h:63
util::Optional< D2ClientConfig::ReplaceClientNameMode > ddns_replace_client_name_mode_
How Kea should handle the domain-name supplied by the client.
Definition pool.h:452
ClientClasses additional_classes_
Additional classes.
Definition pool.h:432
bool hasDdnsParameters() const
Checks if any of the DDNS parameters has a value.
Definition pool.cc:60
util::Optional< uint32_t > ddns_ttl_min_
Minimum value to use for DNS TTL.
Definition pool.h:476
uint64_t id_
pool-id
Definition pool.h:399
const isc::asiolink::IOAddress & getLastAddress() const
Returns the last address in a pool.
Definition pool.h:69
util::Optional< std::string > ddns_generated_prefix_
Prefix Kea should use when generating domain-names.
Definition pool.h:455
util::Optional< bool > ddns_override_client_update_
Should Kea perform updates, even if client requested delegation.
Definition pool.h:449
util::Optional< double > ddns_ttl_percent_
Percentage of the lease lifetime to use for DNS TTL.
Definition pool.h:470
isc::util::uint128_t capacity_
Stores number of possible leases.
Definition pool.h:416
ClientClasses client_classes_
List of client classes allowed to use this pool.
Definition pool.h:427
void allowClientClass(const isc::dhcp::ClientClass &class_name)
Adds class clas_name to the allowed client classes list.
Definition pool.cc:38
util::Optional< bool > ddns_override_no_update_
Should Kea perform updates, even if client requested no updates.
Definition pool.h:446
isc::asiolink::IOAddress last_
The last address in a pool.
Definition pool.h:405
util::Optional< std::string > ddns_reverse_zone_
Reverse zone Kea should use for PTR records.
Definition pool.h:461
isc::asiolink::IOAddress first_
The first address in a pool.
Definition pool.h:402
util::Optional< std::string > ddns_conflict_resolution_mode_
DDNS conflict resolution mode.
Definition pool.h:467
util::Optional< bool > ddns_send_updates_
Should Kea perform DNS updates.
Definition pool.h:442
CfgOptionPtr getCfgOption()
Returns pointer to the option data configuration for this pool.
Definition pool.h:106
virtual std::string toText() const
returns textual representation of the pool
Definition pool.cc:52
bool inRange(const isc::asiolink::IOAddress &addr) const
Checks if a given address is in the range.
Definition pool.cc:28
void addAdditionalClass(const ClientClass &class_name)
Adds class class_name to the additional classes list.
Definition pool.cc:45
bool clientSupported(const ClientClasses &client_classes) const
Checks whether this pool supports client that belongs to specified classes.
Definition pool.cc:33
Lease::Type type_
defines a lease type that will be served from this pool
Definition pool.h:408
if(!(yy_init))
Definition d2_lexer.cc:1515
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< Element > ElementPtr
Definition data.h:29
boost::shared_ptr< Pool4 > Pool4Ptr
a pointer an IPv4 Pool
Definition pool.h:493
std::string ClientClass
Defines a single class name.
Definition classify.h:45
boost::shared_ptr< Option6PDExclude > Option6PDExcludePtr
Pointer to the Option6PDExclude object.
boost::shared_ptr< const CfgOption > ConstCfgOptionPtr
Const pointer.
Definition cfg_option.h:986
boost::shared_ptr< Pool6 > Pool6Ptr
a pointer an IPv6 Pool
Definition pool.h:552
Defines the logger used by the top-level component of kea-lfc.
void contextToElement(data::ElementPtr map) const
Merge unparse a user_context object.
a common structure for IPv4 and IPv6 leases
Definition lease.h:33
Type
Type of lease or pool.
Definition lease.h:48
@ TYPE_PD
the lease contains IPv6 prefix (for prefix delegation)
Definition lease.h:51
@ TYPE_NA
the lease contains non-temporary IPv6 address
Definition lease.h:49
static std::string typeToText(Type type)
returns text representation of a lease type
Definition lease.cc:56