Kea 3.1.7
memfile_lease_storage.h
Go to the documentation of this file.
1// Copyright (C) 2015-2025 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#ifndef MEMFILE_LEASE_STORAGE_H
8#define MEMFILE_LEASE_STORAGE_H
9
10#include <asiolink/io_address.h>
11#include <dhcpsrv/lease.h>
12#include <dhcpsrv/subnet_id.h>
13
14#include <boost/multi_index/indexed_by.hpp>
15#include <boost/multi_index/member.hpp>
16#include <boost/multi_index/mem_fun.hpp>
17#include <boost/multi_index/hashed_index.hpp>
18#include <boost/multi_index/ordered_index.hpp>
19#include <boost/multi_index_container.hpp>
20#include <boost/multi_index/composite_key.hpp>
21
22#include <functional>
23#include <vector>
24
25namespace isc {
26namespace dhcp {
27
29struct AddressIndexTag { };
30
33
36
39
42
45
48
51
53struct DuidIndexTag { };
54
57
60
62struct RelayIdIndexTag { };
63
65struct StateIndexTag { };
66
69
70
84typedef boost::multi_index_container<
85 // It holds pointers to Lease6 objects.
87 boost::multi_index::indexed_by<
88 // Specification of the first index starts here.
89 // This index sorts leases by IPv6 addresses represented as
90 // IOAddress objects.
91 boost::multi_index::ordered_unique<
92 boost::multi_index::tag<AddressIndexTag>,
93 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
94 >,
95
96 // Specification of the second index starts here.
97 boost::multi_index::ordered_non_unique<
98 boost::multi_index::tag<DuidIaidTypeIndexTag>,
99 // This is a composite index that will be used to search for
100 // the lease using three attributes: DUID, IAID and lease type.
101 boost::multi_index::composite_key<
102 Lease6,
103 // The DUID can be retrieved from the Lease6 object using
104 // a getDuidVector const function.
105 boost::multi_index::const_mem_fun<Lease6, const std::vector<uint8_t>&,
107 // The two other ingredients of this index are IAID and
108 // lease type.
109 boost::multi_index::member<Lease6, uint32_t, &Lease6::iaid_>,
110 boost::multi_index::member<Lease6, Lease::Type, &Lease6::type_>
111 >
112 >,
113
114 // Specification of the third index starts here.
115 boost::multi_index::ordered_non_unique<
116 boost::multi_index::tag<ExpirationIndexTag>,
117 // This is a composite index that is used to search for
118 // the expired leases. Depending on the value of the first component
119 // of the search key, the reclaimed or not reclaimed leases can
120 // be searched.
121 boost::multi_index::composite_key<
122 Lease6,
123 // The boolean value specifying if lease is reclaimed or not.
124 boost::multi_index::const_mem_fun<Lease, bool,
126 // Lease expiration time.
127 boost::multi_index::const_mem_fun<Lease, int64_t,
129 >
130 >,
131
132 // Specification of the fourth index starts here.
133 // This index sorts leases by SubnetID and address.
134 boost::multi_index::ordered_unique<
135 boost::multi_index::tag<SubnetIdIndexTag>,
136 boost::multi_index::composite_key<
137 Lease6,
138 // Subnet id.
139 boost::multi_index::member<Lease,
142 // Address.
143 boost::multi_index::member<Lease,
146 >
147 >,
148
149 // Specification of the fifth index starts here
150 // This index is used to retrieve leases for matching duid.
151 boost::multi_index::ordered_non_unique<
152 boost::multi_index::tag<DuidIndexTag>,
153 boost::multi_index::const_mem_fun<Lease6,
154 const std::vector<uint8_t>&,
156 >,
157
158 // Specification of the sixth index starts here
159 // This index is used to retrieve leases for matching hostname.
160 boost::multi_index::ordered_non_unique<
161 boost::multi_index::tag<HostnameIndexTag>,
162 boost::multi_index::member<Lease, std::string, &Lease::hostname_>
163 >,
164
165 // Specification of the seventh index starts here.
166 boost::multi_index::ordered_non_unique<
167 boost::multi_index::tag<SubnetIdPoolIdIndexTag>,
168 // This is a composite index that combines two attributes of the
169 // Lease6 object: subnet id and pool id.
170 boost::multi_index::composite_key<
171 Lease6,
172 // The subnet id is held in the subnet_id_ member of Lease6
173 // class. Note that the subnet_id_ is defined in the base
174 // class (Lease) so we have to point to this class rather
175 // than derived class: Lease6.
176 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>,
177 // The pool id is held in the pool_id_ member of Lease6
178 // class. Note that the pool_id_ is defined in the base
179 // class (Lease) so we have to point to this class rather
180 // than derived class: Lease6.
181 boost::multi_index::member<Lease, uint32_t, &Lease::pool_id_>
182 >
183 >,
184
185 // Specification of the eighth index starts here.
186 boost::multi_index::hashed_non_unique<
187 boost::multi_index::tag<HWAddressIndexTag>,
188 // The hardware address is held in the hwaddr_ member of the
189 // Lease6 object, which is a HWAddr object. Boost does not
190 // provide a key extractor for getting a member of a member,
191 // so we need a simple method for that.
192 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
194 >,
195
196 // Specification of the ninth index starts here.
197 boost::multi_index::ordered_non_unique<
198 boost::multi_index::tag<StateIndexTag>,
199 // This is a composite index that combines two attributes of the
200 // Lease6 object: state and pool id.
201 boost::multi_index::composite_key<
202 Lease6,
203 // The state is held in the state_ member of Lease6 class.
204 // Note that the state_ is defined in the base class (Lease)
205 // so we have to point to this class rather than derived
206 // class: Lease6.
207 boost::multi_index::member<Lease, uint32_t, &Lease::state_>,
208 // The subnet id is held in the subnet_id_ member of Lease6
209 // class. Note that the subnet_id_ is defined in the base
210 // class (Lease) so we have to point to this class rather
211 // than derived class: Lease6.
212 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
213 >
214 >
215 >
216> Lease6Storage; // Specify the type name of this container.
217
234typedef boost::multi_index_container<
235 // It holds pointers to Lease4 objects.
236 Lease4Ptr,
237 // Specification of search indexes starts here.
238 boost::multi_index::indexed_by<
239 // Specification of the first index starts here.
240 // This index sorts leases by IPv4 addresses represented as
241 // IOAddress objects.
242 boost::multi_index::ordered_unique<
243 boost::multi_index::tag<AddressIndexTag>,
244 // The IPv4 address are held in addr_ members that belong to
245 // Lease class.
246 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
247 >,
248
249 // Specification of the second index starts here.
250 boost::multi_index::ordered_non_unique<
251 boost::multi_index::tag<HWAddressSubnetIdIndexTag>,
252 // This is a composite index that combines two attributes of the
253 // Lease4 object: hardware address and subnet id.
254 boost::multi_index::composite_key<
255 Lease4,
256 // The hardware address is held in the hwaddr_ member of the
257 // Lease4 object, which is a HWAddr object. Boost does not
258 // provide a key extractor for getting a member of a member,
259 // so we need a simple method for that.
260 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
262 // The subnet id is held in the subnet_id_ member of Lease4
263 // class. Note that the subnet_id_ is defined in the base
264 // class (Lease) so we have to point to this class rather
265 // than derived class: Lease4.
266 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
267 >
268 >,
269
270 // Specification of the third index starts here.
271 boost::multi_index::ordered_non_unique<
272 boost::multi_index::tag<ClientIdSubnetIdIndexTag>,
273 // This is a composite index that uses two values to search for a
274 // lease: client id and subnet id.
275 boost::multi_index::composite_key<
276 Lease4,
277 // The client id can be retrieved from the Lease4 object by
278 // calling getClientIdVector const function.
279 boost::multi_index::const_mem_fun<Lease4, const std::vector<uint8_t>&,
281 // The subnet id is accessed through the subnet_id_ member.
282 boost::multi_index::member<Lease, uint32_t, &Lease::subnet_id_>
283 >
284 >,
285
286 // Specification of the fourth index starts here.
287 boost::multi_index::ordered_non_unique<
288 boost::multi_index::tag<ExpirationIndexTag>,
289 // This is a composite index that will be used to search for
290 // the expired leases. Depending on the value of the first component
291 // of the search key, the reclaimed or not reclaimed leases will can
292 // be searched.
293 boost::multi_index::composite_key<
294 Lease4,
295 // The boolean value specifying if lease is reclaimed or not.
296 boost::multi_index::const_mem_fun<Lease, bool,
298 // Lease expiration time.
299 boost::multi_index::const_mem_fun<Lease, int64_t,
301 >
302 >,
303
304 // Specification of the fifth index starts here.
305 // This index sorts leases by SubnetID.
306 boost::multi_index::ordered_non_unique<
307 boost::multi_index::tag<SubnetIdIndexTag>,
308 boost::multi_index::member<Lease, isc::dhcp::SubnetID, &Lease::subnet_id_>
309 >,
310
311 // Specification of the sixth index starts here.
312 // This index is used to retrieve leases for matching hostname.
313 boost::multi_index::ordered_non_unique<
314 boost::multi_index::tag<HostnameIndexTag>,
315 boost::multi_index::member<Lease, std::string, &Lease::hostname_>
316 >,
317
318 // Specification of the seventh index starts here.
319 // This index is used to retrieve leases for matching remote id
320 // for Bulk Lease Query.
321 boost::multi_index::hashed_non_unique<
322 boost::multi_index::tag<RemoteIdIndexTag>,
323 boost::multi_index::member<Lease4,
324 std::vector<uint8_t>,
326 >,
327
328 // Specification of the eighth index starts here.
329 // This index is used to retrieve leases for matching relay id
330 // for Bulk Lease Query.
331 boost::multi_index::ordered_non_unique<
332 boost::multi_index::tag<RelayIdIndexTag>,
333 boost::multi_index::composite_key<
334 Lease4,
335 // Relay id.
336 boost::multi_index::member<Lease4,
337 std::vector<uint8_t>,
339 // Address.
340 boost::multi_index::member<Lease,
343 >
344 >,
345
346 // Specification of the ninth index starts here.
347 boost::multi_index::ordered_non_unique<
348 boost::multi_index::tag<SubnetIdPoolIdIndexTag>,
349 // This is a composite index that combines two attributes of the
350 // Lease4 object: subnet id and pool id.
351 boost::multi_index::composite_key<
352 Lease4,
353 // The subnet id is held in the subnet_id_ member of Lease4
354 // class. Note that the subnet_id_ is defined in the base
355 // class (Lease) so we have to point to this class rather
356 // than derived class: Lease4.
357 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>,
358 // The pool id is held in the pool_id_ member of Lease4
359 // class. Note that the pool_id_ is defined in the base
360 // class (Lease) so we have to point to this class rather
361 // than derived class: Lease4.
362 boost::multi_index::member<Lease, uint32_t, &Lease::pool_id_>
363 >
364 >,
365
366 // Specification of the tenth index starts here.
367 boost::multi_index::ordered_non_unique<
368 boost::multi_index::tag<StateIndexTag>,
369 // This is a composite index that combines two attributes of the
370 // Lease4 object: state and pool id.
371 boost::multi_index::composite_key<
372 Lease4,
373 // The state is held in the state_ member of Lease4 class.
374 // Note that the state_ is defined in the base class (Lease)
375 // so we have to point to this class rather than derived
376 // class: Lease4.
377 boost::multi_index::member<Lease, uint32_t, &Lease::state_>,
378 // The subnet id is held in the subnet_id_ member of Lease4
379 // class. Note that the subnet_id_ is defined in the base
380 // class (Lease) so we have to point to this class rather
381 // than derived class: Lease4.
382 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
383 >
384 >
385 >
386> Lease4Storage; // Specify the type name for this container.
387
389
392
393
395typedef Lease6Storage::index<AddressIndexTag>::type Lease6StorageAddressIndex;
396
398typedef Lease6Storage::index<DuidIaidTypeIndexTag>::type Lease6StorageDuidIaidTypeIndex;
399
401typedef Lease6Storage::index<ExpirationIndexTag>::type Lease6StorageExpirationIndex;
402
404typedef Lease6Storage::index<HWAddressIndexTag>::type
406
408typedef Lease6Storage::index<SubnetIdIndexTag>::type Lease6StorageSubnetIdIndex;
409
411typedef Lease6Storage::index<SubnetIdPoolIdIndexTag>::type Lease6StorageSubnetIdPoolIdIndex;
412
414typedef Lease6Storage::index<DuidIndexTag>::type Lease6StorageDuidIndex;
415
417typedef Lease6Storage::index<HostnameIndexTag>::type Lease6StorageHostnameIndex;
418
420typedef Lease6Storage::index<StateIndexTag>::type Lease6StorageStateIndex;
421
423typedef Lease4Storage::index<AddressIndexTag>::type Lease4StorageAddressIndex;
424
426typedef Lease4Storage::index<ExpirationIndexTag>::type Lease4StorageExpirationIndex;
427
429typedef Lease4Storage::index<HWAddressSubnetIdIndexTag>::type
431
433typedef Lease4Storage::index<ClientIdSubnetIdIndexTag>::type
435
437typedef Lease4Storage::index<SubnetIdIndexTag>::type Lease4StorageSubnetIdIndex;
438
440typedef Lease4Storage::index<SubnetIdPoolIdIndexTag>::type Lease4StorageSubnetIdPoolIdIndex;
441
443typedef Lease4Storage::index<HostnameIndexTag>::type Lease4StorageHostnameIndex;
444
446typedef Lease4Storage::index<RemoteIdIndexTag>::type Lease4StorageRemoteIdIndex;
447
449typedef std::pair<Lease4StorageRemoteIdIndex::const_iterator,
450 Lease4StorageRemoteIdIndex::const_iterator> Lease4StorageRemoteIdRange;
451
453typedef Lease4Storage::index<RelayIdIndexTag>::type Lease4StorageRelayIdIndex;
454
456
458typedef Lease4Storage::index<StateIndexTag>::type Lease4StorageStateIndex;
459
462
463
466public:
472 const std::vector<uint8_t>& id)
473 : lease_addr_(lease_addr), id_(id) {
474 }
475
478
480 std::vector<uint8_t> id_;
481};
482
484typedef boost::shared_ptr<Lease6ExtendedInfo> Lease6ExtendedInfoPtr;
485
488
501typedef boost::multi_index_container<
502 // It holds pointers to lease6 extended info.
504 boost::multi_index::indexed_by<
505 // First index is by relay id and lease address.
506 boost::multi_index::ordered_non_unique<
507 boost::multi_index::tag<RelayIdIndexTag>,
508 boost::multi_index::composite_key<
510 boost::multi_index::member<Lease6ExtendedInfo,
511 std::vector<uint8_t>,
513 boost::multi_index::member<Lease6ExtendedInfo,
516 >
517 >,
518
519 // Last index is by lease address.
520 boost::multi_index::hashed_non_unique<
521 boost::multi_index::tag<LeaseAddressIndexTag>,
522 boost::multi_index::member<Lease6ExtendedInfo,
525 >
526 >
528
542typedef boost::multi_index_container<
543 // It holds pointers to lease6 extended info.
545 boost::multi_index::indexed_by<
546 // First index is by remote id.
547 boost::multi_index::hashed_non_unique<
548 boost::multi_index::tag<RemoteIdIndexTag>,
549 boost::multi_index::member<Lease6ExtendedInfo,
550 std::vector<uint8_t>,
552 >,
553
554 // Last index is by lease address.
555 boost::multi_index::hashed_non_unique<
556 boost::multi_index::tag<LeaseAddressIndexTag>,
557 boost::multi_index::member<Lease6ExtendedInfo,
560 >
561 >
563
565typedef Lease6ExtendedInfoRelayIdTable::index<RelayIdIndexTag>::type
567
569typedef Lease6ExtendedInfoRelayIdTable::index<LeaseAddressIndexTag>::type
571
573typedef Lease6ExtendedInfoRemoteIdTable::index<RemoteIdIndexTag>::type
575
577typedef std::pair<RemoteIdIndex::const_iterator, RemoteIdIndex::const_iterator>
579
581typedef Lease6ExtendedInfoRemoteIdTable::index<LeaseAddressIndexTag>::type
583
585
586} // end of isc::dhcp namespace
587} // end of isc namespace
588
589#endif // MEMFILE_LEASE_STORAGE_H
Lease6 extended informations for Bulk Lease Query.
Lease6ExtendedInfo(const isc::asiolink::IOAddress &lease_addr, const std::vector< uint8_t > &id)
Constructor.
std::vector< uint8_t > id_
Remote or relay opaque identifier.
isc::asiolink::IOAddress lease_addr_
Lease address.
boost::multi_index_container< Lease6ExtendedInfoPtr, boost::multi_index::indexed_by< boost::multi_index::hashed_non_unique< boost::multi_index::tag< RemoteIdIndexTag >, boost::multi_index::member< Lease6ExtendedInfo, std::vector< uint8_t >, &Lease6ExtendedInfo::id_ > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< LeaseAddressIndexTag >, boost::multi_index::member< Lease6ExtendedInfo, isc::asiolink::IOAddress, &Lease6ExtendedInfo::lease_addr_ > > > > Lease6ExtendedInfoRemoteIdTable
A multi index container holding lease6 extended info for by remote id.
boost::multi_index_container< Lease6Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< AddressIndexTag >, boost::multi_index::member< Lease, isc::asiolink::IOAddress, &Lease::addr_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< DuidIaidTypeIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::const_mem_fun< Lease6, const std::vector< uint8_t > &, &Lease6::getDuidVector >, boost::multi_index::member< Lease6, uint32_t, &Lease6::iaid_ >, boost::multi_index::member< Lease6, Lease::Type, &Lease6::type_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ExpirationIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::const_mem_fun< Lease, bool, &Lease::stateExpiredReclaimed >, boost::multi_index::const_mem_fun< Lease, int64_t, &Lease::getExpirationTime > > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetIdIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::member< Lease, isc::dhcp::SubnetID, &Lease::subnet_id_ >, boost::multi_index::member< Lease, isc::asiolink::IOAddress, &Lease::addr_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< DuidIndexTag >, boost::multi_index::const_mem_fun< Lease6, const std::vector< uint8_t > &, &Lease6::getDuidVector > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< HostnameIndexTag >, boost::multi_index::member< Lease, std::string, &Lease::hostname_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetIdPoolIdIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ >, boost::multi_index::member< Lease, uint32_t, &Lease::pool_id_ > > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< HWAddressIndexTag >, boost::multi_index::const_mem_fun< Lease, const std::vector< uint8_t > &, &Lease::getHWAddrVector > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< StateIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::member< Lease, uint32_t, &Lease::state_ >, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ > > > > > Lease6Storage
A multi index container holding DHCPv6 leases.
Lease6Storage::index< ExpirationIndexTag >::type Lease6StorageExpirationIndex
DHCPv6 lease storage index by expiration time.
Lease4Storage::index< StateIndexTag >::type Lease4StorageStateIndex
DHCPv4 lease storage index by state (and subnet if).
Lease6Storage::index< DuidIndexTag >::type Lease6StorageDuidIndex
DHCPv6 lease storage index by DUID.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
Definition lease.h:528
Lease6Storage::index< SubnetIdPoolIdIndexTag >::type Lease6StorageSubnetIdPoolIdIndex
DHCPv6 lease storage index subnet-id and pool-id.
boost::multi_index_container< Lease4Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< AddressIndexTag >, boost::multi_index::member< Lease, isc::asiolink::IOAddress, &Lease::addr_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< HWAddressSubnetIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease, const std::vector< uint8_t > &, &Lease::getHWAddrVector >, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ClientIdSubnetIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease4, const std::vector< uint8_t > &, &Lease4::getClientIdVector >, boost::multi_index::member< Lease, uint32_t, &Lease::subnet_id_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ExpirationIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease, bool, &Lease::stateExpiredReclaimed >, boost::multi_index::const_mem_fun< Lease, int64_t, &Lease::getExpirationTime > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetIdIndexTag >, boost::multi_index::member< Lease, isc::dhcp::SubnetID, &Lease::subnet_id_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< HostnameIndexTag >, boost::multi_index::member< Lease, std::string, &Lease::hostname_ > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< RemoteIdIndexTag >, boost::multi_index::member< Lease4, std::vector< uint8_t >, &Lease4::remote_id_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< RelayIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::member< Lease4, std::vector< uint8_t >, &Lease4::relay_id_ >, boost::multi_index::member< Lease, isc::asiolink::IOAddress, &Lease::addr_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetIdPoolIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ >, boost::multi_index::member< Lease, uint32_t, &Lease::pool_id_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< StateIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::member< Lease, uint32_t, &Lease::state_ >, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ > > > > > Lease4Storage
A multi index container holding DHCPv4 leases.
Lease6Storage::index< DuidIaidTypeIndexTag >::type Lease6StorageDuidIaidTypeIndex
DHCPv6 lease storage index by DUID, IAID, lease type.
Lease4Storage::index< ExpirationIndexTag >::type Lease4StorageExpirationIndex
DHCPv4 lease storage index by expiration time.
Lease6Storage::index< AddressIndexTag >::type Lease6StorageAddressIndex
DHCPv6 lease storage index by address.
Lease6Storage::index< HWAddressIndexTag >::type Lease6StorageHWAddressIndex
DHCPv6 lease storage index by HW address.
Lease4Storage::index< HostnameIndexTag >::type Lease4StorageHostnameIndex
DHCPv4 lease storage index by hostname.
std::pair< Lease4StorageRemoteIdIndex::const_iterator, Lease4StorageRemoteIdIndex::const_iterator > Lease4StorageRemoteIdRange
DHCPv4 lease storage range by remote-id.
Lease6Storage::index< HostnameIndexTag >::type Lease6StorageHostnameIndex
DHCPv6 lease storage index by hostname.
Lease4Storage::index< ClientIdSubnetIdIndexTag >::type Lease4StorageClientIdSubnetIdIndex
DHCPv4 lease storage index by client-id and subnet-id.
Lease4Storage::index< HWAddressSubnetIdIndexTag >::type Lease4StorageHWAddressSubnetIdIndex
DHCPv4 lease storage index by HW address and subnet-id.
Lease6ExtendedInfoRelayIdTable::index< LeaseAddressIndexTag >::type LeaseAddressRelayIdIndex
Lease6 extended information by lease address index of by relay id table.
Lease6ExtendedInfoRelayIdTable::index< RelayIdIndexTag >::type RelayIdIndex
Lease6 extended information by relay id index.
Lease4Storage::index< RemoteIdIndexTag >::type Lease4StorageRemoteIdIndex
DHCPv4 lease storage index by remote-id.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
Lease6Storage::index< StateIndexTag >::type Lease6StorageStateIndex
DHCPv6 lease storage index by state (and subnet if).
std::pair< RemoteIdIndex::const_iterator, RemoteIdIndex::const_iterator > RemoteIdIndexRange
Lease6 extended information by remote id range.
Lease4Storage::index< SubnetIdIndexTag >::type Lease4StorageSubnetIdIndex
DHCPv4 lease storage index subnet-id.
Lease4Storage::index< AddressIndexTag >::type Lease4StorageAddressIndex
DHCPv4 lease storage index by address.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition lease.h:315
Lease6ExtendedInfoRemoteIdTable::index< LeaseAddressIndexTag >::type LeaseAddressRemoteIdIndex
Lease6 extended information by lease address index of by remote id table.
Lease6Storage::index< SubnetIdIndexTag >::type Lease6StorageSubnetIdIndex
DHCPv6 lease storage index by subnet-id.
boost::multi_index_container< Lease6ExtendedInfoPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< RelayIdIndexTag >, boost::multi_index::composite_key< Lease6ExtendedInfo, boost::multi_index::member< Lease6ExtendedInfo, std::vector< uint8_t >, &Lease6ExtendedInfo::id_ >, boost::multi_index::member< Lease6ExtendedInfo, isc::asiolink::IOAddress, &Lease6ExtendedInfo::lease_addr_ > > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< LeaseAddressIndexTag >, boost::multi_index::member< Lease6ExtendedInfo, isc::asiolink::IOAddress, &Lease6ExtendedInfo::lease_addr_ > > > > Lease6ExtendedInfoRelayIdTable
A multi index container holding lease6 extended info for by relay id.
boost::shared_ptr< Lease6ExtendedInfo > Lease6ExtendedInfoPtr
Pointer to a Lease6ExtendedInfo object.
Lease6ExtendedInfoRemoteIdTable::index< RemoteIdIndexTag >::type RemoteIdIndex
Lease6 extended information by remote id index.
Lease4Storage::index< SubnetIdPoolIdIndexTag >::type Lease4StorageSubnetIdPoolIdIndex
DHCPv4 lease storage index subnet-id and pool-id.
Lease4Storage::index< RelayIdIndexTag >::type Lease4StorageRelayIdIndex
DHCPv4 lease storage index by relay-id.
Defines the logger used by the top-level component of kea-lfc.
Tag for indexes by address.
Tag for indexes by client-id, subnet-id tuple.
Tag for indexes by DUID, IAID, lease type tuple.
Tag for index using DUID.
Tag for indexes by expiration time.
Tag for indexes by HW address.
Tag for indexes by HW address, subnet-id tuple.
Tag for index using hostname.
Structure that holds a lease for IPv4 address.
Definition lease.h:323
std::vector< uint8_t > remote_id_
Remote identifier for Bulk Lease Query.
Definition lease.h:513
std::vector< uint8_t > relay_id_
Relay identifier for Bulk Lease Query.
Definition lease.h:516
const std::vector< uint8_t > & getClientIdVector() const
Returns a client identifier.
Definition lease.cc:349
Structure that holds a lease for IPv6 address and/or prefix.
Definition lease.h:536
const std::vector< uint8_t > & getDuidVector() const
Returns a reference to a vector representing a DUID.
Definition lease.cc:521
Tag for indexes by lease address.
a common structure for IPv4 and IPv6 leases
Definition lease.h:31
bool stateExpiredReclaimed() const
Indicates if the lease is in the "expired-reclaimed" state.
Definition lease.cc:121
SubnetID subnet_id_
Subnet identifier.
Definition lease.h:160
const std::vector< uint8_t > & getHWAddrVector() const
Returns raw (as vector) hardware address.
Definition lease.cc:359
int64_t getExpirationTime() const
Returns lease expiration time.
Definition lease.cc:136
isc::asiolink::IOAddress addr_
IPv4 ot IPv6 address.
Definition lease.h:126
Tag for index using relay-id.
Tag for index using remote-id.
Tag for index using state (and subnet-id).
Tag for indexes by subnet-id (and address for v6).
Tag for indexes by subnet-id and pool-id.