Kea 3.1.1
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
66
67
81typedef boost::multi_index_container<
82 // It holds pointers to Lease6 objects.
84 boost::multi_index::indexed_by<
85 // Specification of the first index starts here.
86 // This index sorts leases by IPv6 addresses represented as
87 // IOAddress objects.
88 boost::multi_index::ordered_unique<
89 boost::multi_index::tag<AddressIndexTag>,
90 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
91 >,
92
93 // Specification of the second index starts here.
94 boost::multi_index::ordered_non_unique<
95 boost::multi_index::tag<DuidIaidTypeIndexTag>,
96 // This is a composite index that will be used to search for
97 // the lease using three attributes: DUID, IAID and lease type.
98 boost::multi_index::composite_key<
99 Lease6,
100 // The DUID can be retrieved from the Lease6 object using
101 // a getDuidVector const function.
102 boost::multi_index::const_mem_fun<Lease6, const std::vector<uint8_t>&,
104 // The two other ingredients of this index are IAID and
105 // lease type.
106 boost::multi_index::member<Lease6, uint32_t, &Lease6::iaid_>,
107 boost::multi_index::member<Lease6, Lease::Type, &Lease6::type_>
108 >
109 >,
110
111 // Specification of the third index starts here.
112 boost::multi_index::ordered_non_unique<
113 boost::multi_index::tag<ExpirationIndexTag>,
114 // This is a composite index that is used to search for
115 // the expired leases. Depending on the value of the first component
116 // of the search key, the reclaimed or not reclaimed leases can
117 // be searched.
118 boost::multi_index::composite_key<
119 Lease6,
120 // The boolean value specifying if lease is reclaimed or not.
121 boost::multi_index::const_mem_fun<Lease, bool,
123 // Lease expiration time.
124 boost::multi_index::const_mem_fun<Lease, int64_t,
126 >
127 >,
128
129 // Specification of the fourth index starts here.
130 // This index sorts leases by SubnetID and address.
131 boost::multi_index::ordered_unique<
132 boost::multi_index::tag<SubnetIdIndexTag>,
133 boost::multi_index::composite_key<
134 Lease6,
135 // Subnet id.
136 boost::multi_index::member<Lease,
139 // Address.
140 boost::multi_index::member<Lease,
143 >
144 >,
145
146 // Specification of the fifth index starts here
147 // This index is used to retrieve leases for matching duid.
148 boost::multi_index::ordered_non_unique<
149 boost::multi_index::tag<DuidIndexTag>,
150 boost::multi_index::const_mem_fun<Lease6,
151 const std::vector<uint8_t>&,
153 >,
154
155 // Specification of the sixth index starts here
156 // This index is used to retrieve leases for matching hostname.
157 boost::multi_index::ordered_non_unique<
158 boost::multi_index::tag<HostnameIndexTag>,
159 boost::multi_index::member<Lease, std::string, &Lease::hostname_>
160 >,
161
162 // Specification of the seventh index starts here.
163 boost::multi_index::ordered_non_unique<
164 boost::multi_index::tag<SubnetIdPoolIdIndexTag>,
165 // This is a composite index that combines two attributes of the
166 // Lease6 object: subnet id and pool id.
167 boost::multi_index::composite_key<
168 Lease6,
169 // The subnet id is held in the subnet_id_ member of Lease6
170 // class. Note that the subnet_id_ is defined in the base
171 // class (Lease) so we have to point to this class rather
172 // than derived class: Lease6.
173 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>,
174 // The pool id is held in the pool_id_ member of Lease6
175 // class. Note that the pool_id_ is defined in the base
176 // class (Lease) so we have to point to this class rather
177 // than derived class: Lease6.
178 boost::multi_index::member<Lease, uint32_t, &Lease::pool_id_>
179 >
180 >,
181
182 // Specification of the eighth index starts here.
183 boost::multi_index::hashed_non_unique<
184 boost::multi_index::tag<HWAddressIndexTag>,
185 // The hardware address is held in the hwaddr_ member of the
186 // Lease6 object, which is a HWAddr object. Boost does not
187 // provide a key extractor for getting a member of a member,
188 // so we need a simple method for that.
189 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
191 >
192 >
193> Lease6Storage; // Specify the type name of this container.
194
211typedef boost::multi_index_container<
212 // It holds pointers to Lease4 objects.
213 Lease4Ptr,
214 // Specification of search indexes starts here.
215 boost::multi_index::indexed_by<
216 // Specification of the first index starts here.
217 // This index sorts leases by IPv4 addresses represented as
218 // IOAddress objects.
219 boost::multi_index::ordered_unique<
220 boost::multi_index::tag<AddressIndexTag>,
221 // The IPv4 address are held in addr_ members that belong to
222 // Lease class.
223 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
224 >,
225
226 // Specification of the second index starts here.
227 boost::multi_index::ordered_non_unique<
228 boost::multi_index::tag<HWAddressSubnetIdIndexTag>,
229 // This is a composite index that combines two attributes of the
230 // Lease4 object: hardware address and subnet id.
231 boost::multi_index::composite_key<
232 Lease4,
233 // The hardware address is held in the hwaddr_ member of the
234 // Lease4 object, which is a HWAddr object. Boost does not
235 // provide a key extractor for getting a member of a member,
236 // so we need a simple method for that.
237 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
239 // The subnet id is held in the subnet_id_ member of Lease4
240 // class. Note that the subnet_id_ is defined in the base
241 // class (Lease) so we have to point to this class rather
242 // than derived class: Lease4.
243 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
244 >
245 >,
246
247 // Specification of the third index starts here.
248 boost::multi_index::ordered_non_unique<
249 boost::multi_index::tag<ClientIdSubnetIdIndexTag>,
250 // This is a composite index that uses two values to search for a
251 // lease: client id and subnet id.
252 boost::multi_index::composite_key<
253 Lease4,
254 // The client id can be retrieved from the Lease4 object by
255 // calling getClientIdVector const function.
256 boost::multi_index::const_mem_fun<Lease4, const std::vector<uint8_t>&,
258 // The subnet id is accessed through the subnet_id_ member.
259 boost::multi_index::member<Lease, uint32_t, &Lease::subnet_id_>
260 >
261 >,
262
263 // Specification of the fourth index starts here.
264 boost::multi_index::ordered_non_unique<
265 boost::multi_index::tag<ExpirationIndexTag>,
266 // This is a composite index that will be used to search for
267 // the expired leases. Depending on the value of the first component
268 // of the search key, the reclaimed or not reclaimed leases will can
269 // be searched.
270 boost::multi_index::composite_key<
271 Lease4,
272 // The boolean value specifying if lease is reclaimed or not.
273 boost::multi_index::const_mem_fun<Lease, bool,
275 // Lease expiration time.
276 boost::multi_index::const_mem_fun<Lease, int64_t,
278 >
279 >,
280
281 // Specification of the fifth index starts here.
282 // This index sorts leases by SubnetID.
283 boost::multi_index::ordered_non_unique<
284 boost::multi_index::tag<SubnetIdIndexTag>,
285 boost::multi_index::member<Lease, isc::dhcp::SubnetID, &Lease::subnet_id_>
286 >,
287
288 // Specification of the sixth index starts here.
289 // This index is used to retrieve leases for matching hostname.
290 boost::multi_index::ordered_non_unique<
291 boost::multi_index::tag<HostnameIndexTag>,
292 boost::multi_index::member<Lease, std::string, &Lease::hostname_>
293 >,
294
295 // Specification of the seventh index starts here.
296 // This index is used to retrieve leases for matching remote id
297 // for Bulk Lease Query.
298 boost::multi_index::hashed_non_unique<
299 boost::multi_index::tag<RemoteIdIndexTag>,
300 boost::multi_index::member<Lease4,
301 std::vector<uint8_t>,
303 >,
304
305 // Specification of the eighth index starts here.
306 // This index is used to retrieve leases for matching relay id
307 // for Bulk Lease Query.
308 boost::multi_index::ordered_non_unique<
309 boost::multi_index::tag<RelayIdIndexTag>,
310 boost::multi_index::composite_key<
311 Lease4,
312 // Relay id.
313 boost::multi_index::member<Lease4,
314 std::vector<uint8_t>,
316 // Address.
317 boost::multi_index::member<Lease,
320 >
321 >,
322
323 // Specification of the ninth index starts here.
324 boost::multi_index::ordered_non_unique<
325 boost::multi_index::tag<SubnetIdPoolIdIndexTag>,
326 // This is a composite index that combines two attributes of the
327 // Lease4 object: subnet id and pool id.
328 boost::multi_index::composite_key<
329 Lease4,
330 // The subnet id is held in the subnet_id_ member of Lease4
331 // class. Note that the subnet_id_ is defined in the base
332 // class (Lease) so we have to point to this class rather
333 // than derived class: Lease4.
334 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>,
335 // The pool id is held in the pool_id_ member of Lease4
336 // class. Note that the pool_id_ is defined in the base
337 // class (Lease) so we have to point to this class rather
338 // than derived class: Lease4.
339 boost::multi_index::member<Lease, uint32_t, &Lease::pool_id_>
340 >
341 >
342 >
343> Lease4Storage; // Specify the type name for this container.
344
346
349
350
352typedef Lease6Storage::index<AddressIndexTag>::type Lease6StorageAddressIndex;
353
355typedef Lease6Storage::index<DuidIaidTypeIndexTag>::type Lease6StorageDuidIaidTypeIndex;
356
358typedef Lease6Storage::index<ExpirationIndexTag>::type Lease6StorageExpirationIndex;
359
361typedef Lease6Storage::index<HWAddressIndexTag>::type
363
365typedef Lease6Storage::index<SubnetIdIndexTag>::type Lease6StorageSubnetIdIndex;
366
368typedef Lease6Storage::index<SubnetIdPoolIdIndexTag>::type Lease6StorageSubnetIdPoolIdIndex;
369
371typedef Lease6Storage::index<DuidIndexTag>::type Lease6StorageDuidIndex;
372
374typedef Lease6Storage::index<HostnameIndexTag>::type Lease6StorageHostnameIndex;
375
377typedef Lease4Storage::index<AddressIndexTag>::type Lease4StorageAddressIndex;
378
380typedef Lease4Storage::index<ExpirationIndexTag>::type Lease4StorageExpirationIndex;
381
383typedef Lease4Storage::index<HWAddressSubnetIdIndexTag>::type
385
387typedef Lease4Storage::index<ClientIdSubnetIdIndexTag>::type
389
391typedef Lease4Storage::index<SubnetIdIndexTag>::type Lease4StorageSubnetIdIndex;
392
394typedef Lease4Storage::index<SubnetIdPoolIdIndexTag>::type Lease4StorageSubnetIdPoolIdIndex;
395
397typedef Lease4Storage::index<HostnameIndexTag>::type Lease4StorageHostnameIndex;
398
400typedef Lease4Storage::index<RemoteIdIndexTag>::type Lease4StorageRemoteIdIndex;
401
403typedef std::pair<Lease4StorageRemoteIdIndex::const_iterator,
404 Lease4StorageRemoteIdIndex::const_iterator> Lease4StorageRemoteIdRange;
405
407typedef Lease4Storage::index<RelayIdIndexTag>::type Lease4StorageRelayIdIndex;
408
410
413
414
417public:
423 const std::vector<uint8_t>& id)
424 : lease_addr_(lease_addr), id_(id) {
425 }
426
429
431 std::vector<uint8_t> id_;
432};
433
435typedef boost::shared_ptr<Lease6ExtendedInfo> Lease6ExtendedInfoPtr;
436
439
452typedef boost::multi_index_container<
453 // It holds pointers to lease6 extended info.
455 boost::multi_index::indexed_by<
456 // First index is by relay id and lease address.
457 boost::multi_index::ordered_non_unique<
458 boost::multi_index::tag<RelayIdIndexTag>,
459 boost::multi_index::composite_key<
461 boost::multi_index::member<Lease6ExtendedInfo,
462 std::vector<uint8_t>,
464 boost::multi_index::member<Lease6ExtendedInfo,
467 >
468 >,
469
470 // Last index is by lease address.
471 boost::multi_index::hashed_non_unique<
472 boost::multi_index::tag<LeaseAddressIndexTag>,
473 boost::multi_index::member<Lease6ExtendedInfo,
476 >
477 >
479
493typedef boost::multi_index_container<
494 // It holds pointers to lease6 extended info.
496 boost::multi_index::indexed_by<
497 // First index is by remote id.
498 boost::multi_index::hashed_non_unique<
499 boost::multi_index::tag<RemoteIdIndexTag>,
500 boost::multi_index::member<Lease6ExtendedInfo,
501 std::vector<uint8_t>,
503 >,
504
505 // Last index is by lease address.
506 boost::multi_index::hashed_non_unique<
507 boost::multi_index::tag<LeaseAddressIndexTag>,
508 boost::multi_index::member<Lease6ExtendedInfo,
511 >
512 >
514
516typedef Lease6ExtendedInfoRelayIdTable::index<RelayIdIndexTag>::type
518
520typedef Lease6ExtendedInfoRelayIdTable::index<LeaseAddressIndexTag>::type
522
524typedef Lease6ExtendedInfoRemoteIdTable::index<RemoteIdIndexTag>::type
526
528typedef std::pair<RemoteIdIndex::const_iterator, RemoteIdIndex::const_iterator>
530
532typedef Lease6ExtendedInfoRemoteIdTable::index<LeaseAddressIndexTag>::type
534
536
537} // end of isc::dhcp namespace
538} // end of isc namespace
539
540#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< 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_ > > > > > Lease4Storage
A multi index container holding DHCPv4 leases.
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 > > > > Lease6Storage
A multi index container holding DHCPv6 leases.
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.
Lease6Storage::index< ExpirationIndexTag >::type Lease6StorageExpirationIndex
DHCPv6 lease storage index by expiration time.
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.
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
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 indexes by subnet-id (and address for v6).
Tag for indexes by subnet-id and pool-id.