Kea 2.5.8
memfile_lease_storage.h
Go to the documentation of this file.
1// Copyright (C) 2015-2024 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
50struct DuidIndexTag { };
51
54
57
59struct RelayIdIndexTag { };
60
63
64
78typedef boost::multi_index_container<
79 // It holds pointers to Lease6 objects.
81 boost::multi_index::indexed_by<
82 // Specification of the first index starts here.
83 // This index sorts leases by IPv6 addresses represented as
84 // IOAddress objects.
85 boost::multi_index::ordered_unique<
86 boost::multi_index::tag<AddressIndexTag>,
87 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
88 >,
89
90 // Specification of the second index starts here.
91 boost::multi_index::ordered_non_unique<
92 boost::multi_index::tag<DuidIaidTypeIndexTag>,
93 // This is a composite index that will be used to search for
94 // the lease using three attributes: DUID, IAID and lease type.
95 boost::multi_index::composite_key<
96 Lease6,
97 // The DUID can be retrieved from the Lease6 object using
98 // a getDuidVector const function.
99 boost::multi_index::const_mem_fun<Lease6, const std::vector<uint8_t>&,
101 // The two other ingredients of this index are IAID and
102 // lease type.
103 boost::multi_index::member<Lease6, uint32_t, &Lease6::iaid_>,
104 boost::multi_index::member<Lease6, Lease::Type, &Lease6::type_>
105 >
106 >,
107
108 // Specification of the third index starts here.
109 boost::multi_index::ordered_non_unique<
110 boost::multi_index::tag<ExpirationIndexTag>,
111 // This is a composite index that is used to search for
112 // the expired leases. Depending on the value of the first component
113 // of the search key, the reclaimed or not reclaimed leases can
114 // be searched.
115 boost::multi_index::composite_key<
116 Lease6,
117 // The boolean value specifying if lease is reclaimed or not.
118 boost::multi_index::const_mem_fun<Lease, bool,
120 // Lease expiration time.
121 boost::multi_index::const_mem_fun<Lease, int64_t,
123 >
124 >,
125
126 // Specification of the fourth index starts here.
127 // This index sorts leases by SubnetID and address.
128 boost::multi_index::ordered_unique<
129 boost::multi_index::tag<SubnetIdIndexTag>,
130 boost::multi_index::composite_key<
131 Lease6,
132 // Subnet id.
133 boost::multi_index::member<Lease,
136 // Address.
137 boost::multi_index::member<Lease,
140 >
141 >,
142
143 // Specification of the fifth index starts here
144 // This index is used to retrieve leases for matching duid.
145 boost::multi_index::ordered_non_unique<
146 boost::multi_index::tag<DuidIndexTag>,
147 boost::multi_index::const_mem_fun<Lease6,
148 const std::vector<uint8_t>&,
150 >,
151
152 // Specification of the sixth index starts here
153 // This index is used to retrieve leases for matching hostname.
154 boost::multi_index::ordered_non_unique<
155 boost::multi_index::tag<HostnameIndexTag>,
156 boost::multi_index::member<Lease, std::string, &Lease::hostname_>
157 >,
158
159 // Specification of the seventh index starts here.
160 boost::multi_index::ordered_non_unique<
161 boost::multi_index::tag<SubnetIdPoolIdIndexTag>,
162 // This is a composite index that combines two attributes of the
163 // Lease6 object: subnet id and pool id.
164 boost::multi_index::composite_key<
165 Lease6,
166 // The subnet id is held in the subnet_id_ member of Lease6
167 // class. Note that the subnet_id_ is defined in the base
168 // class (Lease) so we have to point to this class rather
169 // than derived class: Lease6.
170 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>,
171 // The pool id is held in the pool_id_ member of Lease6
172 // class. Note that the pool_id_ is defined in the base
173 // class (Lease) so we have to point to this class rather
174 // than derived class: Lease6.
175 boost::multi_index::member<Lease, uint32_t, &Lease::pool_id_>
176 >
177 >
178 >
179> Lease6Storage; // Specify the type name of this container.
180
197typedef boost::multi_index_container<
198 // It holds pointers to Lease4 objects.
199 Lease4Ptr,
200 // Specification of search indexes starts here.
201 boost::multi_index::indexed_by<
202 // Specification of the first index starts here.
203 // This index sorts leases by IPv4 addresses represented as
204 // IOAddress objects.
205 boost::multi_index::ordered_unique<
206 boost::multi_index::tag<AddressIndexTag>,
207 // The IPv4 address are held in addr_ members that belong to
208 // Lease class.
209 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
210 >,
211
212 // Specification of the second index starts here.
213 boost::multi_index::ordered_non_unique<
214 boost::multi_index::tag<HWAddressSubnetIdIndexTag>,
215 // This is a composite index that combines two attributes of the
216 // Lease4 object: hardware address and subnet id.
217 boost::multi_index::composite_key<
218 Lease4,
219 // The hardware address is held in the hwaddr_ member of the
220 // Lease4 object, which is a HWAddr object. Boost does not
221 // provide a key extractor for getting a member of a member,
222 // so we need a simple method for that.
223 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
225 // The subnet id is held in the subnet_id_ member of Lease4
226 // class. Note that the subnet_id_ is defined in the base
227 // class (Lease) so we have to point to this class rather
228 // than derived class: Lease4.
229 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
230 >
231 >,
232
233 // Specification of the third index starts here.
234 boost::multi_index::ordered_non_unique<
235 boost::multi_index::tag<ClientIdSubnetIdIndexTag>,
236 // This is a composite index that uses two values to search for a
237 // lease: client id and subnet id.
238 boost::multi_index::composite_key<
239 Lease4,
240 // The client id can be retrieved from the Lease4 object by
241 // calling getClientIdVector const function.
242 boost::multi_index::const_mem_fun<Lease4, const std::vector<uint8_t>&,
244 // The subnet id is accessed through the subnet_id_ member.
245 boost::multi_index::member<Lease, uint32_t, &Lease::subnet_id_>
246 >
247 >,
248
249 // Specification of the fourth index starts here.
250 boost::multi_index::ordered_non_unique<
251 boost::multi_index::tag<ExpirationIndexTag>,
252 // This is a composite index that will be used to search for
253 // the expired leases. Depending on the value of the first component
254 // of the search key, the reclaimed or not reclaimed leases will can
255 // be searched.
256 boost::multi_index::composite_key<
257 Lease4,
258 // The boolean value specifying if lease is reclaimed or not.
259 boost::multi_index::const_mem_fun<Lease, bool,
261 // Lease expiration time.
262 boost::multi_index::const_mem_fun<Lease, int64_t,
264 >
265 >,
266
267 // Specification of the fifth index starts here.
268 // This index sorts leases by SubnetID.
269 boost::multi_index::ordered_non_unique<
270 boost::multi_index::tag<SubnetIdIndexTag>,
271 boost::multi_index::member<Lease, isc::dhcp::SubnetID, &Lease::subnet_id_>
272 >,
273
274 // Specification of the sixth index starts here.
275 // This index is used to retrieve leases for matching hostname.
276 boost::multi_index::ordered_non_unique<
277 boost::multi_index::tag<HostnameIndexTag>,
278 boost::multi_index::member<Lease, std::string, &Lease::hostname_>
279 >,
280
281 // Specification of the seventh index starts here.
282 // This index is used to retrieve leases for matching remote id
283 // for Bulk Lease Query.
284 boost::multi_index::hashed_non_unique<
285 boost::multi_index::tag<RemoteIdIndexTag>,
286 boost::multi_index::member<Lease4,
287 std::vector<uint8_t>,
289 >,
290
291 // Specification of the eighth index starts here.
292 // This index is used to retrieve leases for matching relay id
293 // for Bulk Lease Query.
294 boost::multi_index::ordered_non_unique<
295 boost::multi_index::tag<RelayIdIndexTag>,
296 boost::multi_index::composite_key<
297 Lease4,
298 // Relay id.
299 boost::multi_index::member<Lease4,
300 std::vector<uint8_t>,
302 // Address.
303 boost::multi_index::member<Lease,
306 >
307 >,
308
309 // Specification of the ninth index starts here.
310 boost::multi_index::ordered_non_unique<
311 boost::multi_index::tag<SubnetIdPoolIdIndexTag>,
312 // This is a composite index that combines two attributes of the
313 // Lease4 object: subnet id and pool id.
314 boost::multi_index::composite_key<
315 Lease4,
316 // The subnet id is held in the subnet_id_ member of Lease4
317 // class. Note that the subnet_id_ is defined in the base
318 // class (Lease) so we have to point to this class rather
319 // than derived class: Lease4.
320 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>,
321 // The pool id is held in the pool_id_ member of Lease4
322 // class. Note that the pool_id_ is defined in the base
323 // class (Lease) so we have to point to this class rather
324 // than derived class: Lease4.
325 boost::multi_index::member<Lease, uint32_t, &Lease::pool_id_>
326 >
327 >
328 >
329> Lease4Storage; // Specify the type name for this container.
330
332
335
336
338typedef Lease6Storage::index<AddressIndexTag>::type Lease6StorageAddressIndex;
339
341typedef Lease6Storage::index<DuidIaidTypeIndexTag>::type Lease6StorageDuidIaidTypeIndex;
342
344typedef Lease6Storage::index<ExpirationIndexTag>::type Lease6StorageExpirationIndex;
345
347typedef Lease6Storage::index<SubnetIdIndexTag>::type Lease6StorageSubnetIdIndex;
348
350typedef Lease6Storage::index<SubnetIdPoolIdIndexTag>::type Lease6StorageSubnetIdPoolIdIndex;
351
353typedef Lease6Storage::index<DuidIndexTag>::type Lease6StorageDuidIndex;
354
356typedef Lease6Storage::index<HostnameIndexTag>::type Lease6StorageHostnameIndex;
357
359typedef Lease4Storage::index<AddressIndexTag>::type Lease4StorageAddressIndex;
360
362typedef Lease4Storage::index<ExpirationIndexTag>::type Lease4StorageExpirationIndex;
363
365typedef Lease4Storage::index<HWAddressSubnetIdIndexTag>::type
367
369typedef Lease4Storage::index<ClientIdSubnetIdIndexTag>::type
371
373typedef Lease4Storage::index<SubnetIdIndexTag>::type Lease4StorageSubnetIdIndex;
374
376typedef Lease4Storage::index<SubnetIdPoolIdIndexTag>::type Lease4StorageSubnetIdPoolIdIndex;
377
379typedef Lease4Storage::index<HostnameIndexTag>::type Lease4StorageHostnameIndex;
380
382typedef Lease4Storage::index<RemoteIdIndexTag>::type Lease4StorageRemoteIdIndex;
383
385typedef std::pair<Lease4StorageRemoteIdIndex::const_iterator,
386 Lease4StorageRemoteIdIndex::const_iterator> Lease4StorageRemoteIdRange;
387
389typedef Lease4Storage::index<RelayIdIndexTag>::type Lease4StorageRelayIdIndex;
390
392
395
396
399public:
405 const std::vector<uint8_t>& id)
406 : lease_addr_(lease_addr), id_(id) {
407 }
408
411
413 std::vector<uint8_t> id_;
414};
415
417typedef boost::shared_ptr<Lease6ExtendedInfo> Lease6ExtendedInfoPtr;
418
421
434typedef boost::multi_index_container<
435 // It holds pointers to lease6 extended info.
437 boost::multi_index::indexed_by<
438 // First index is by relay id and lease address.
439 boost::multi_index::ordered_non_unique<
440 boost::multi_index::tag<RelayIdIndexTag>,
441 boost::multi_index::composite_key<
443 boost::multi_index::member<Lease6ExtendedInfo,
444 std::vector<uint8_t>,
446 boost::multi_index::member<Lease6ExtendedInfo,
449 >
450 >,
451
452 // Last index is by lease address.
453 boost::multi_index::hashed_non_unique<
454 boost::multi_index::tag<LeaseAddressIndexTag>,
455 boost::multi_index::member<Lease6ExtendedInfo,
458 >
459 >
461
475typedef boost::multi_index_container<
476 // It holds pointers to lease6 extended info.
478 boost::multi_index::indexed_by<
479 // First index is by remote id.
480 boost::multi_index::hashed_non_unique<
481 boost::multi_index::tag<RemoteIdIndexTag>,
482 boost::multi_index::member<Lease6ExtendedInfo,
483 std::vector<uint8_t>,
485 >,
486
487 // Last index is by lease address.
488 boost::multi_index::hashed_non_unique<
489 boost::multi_index::tag<LeaseAddressIndexTag>,
490 boost::multi_index::member<Lease6ExtendedInfo,
493 >
494 >
496
498typedef Lease6ExtendedInfoRelayIdTable::index<RelayIdIndexTag>::type
500
502typedef Lease6ExtendedInfoRelayIdTable::index<LeaseAddressIndexTag>::type
504
506typedef Lease6ExtendedInfoRemoteIdTable::index<RemoteIdIndexTag>::type
508
510typedef std::pair<RemoteIdIndex::const_iterator, RemoteIdIndex::const_iterator>
512
514typedef Lease6ExtendedInfoRemoteIdTable::index<LeaseAddressIndexTag>::type
516
518
519} // end of isc::dhcp namespace
520} // end of isc namespace
521
522#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< 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:505
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.
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.
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_ > > > > > Lease6Storage
A multi index container holding DHCPv6 leases.
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:292
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, subnet-id tuple.
Tag for index using hostname.
Structure that holds a lease for IPv4 address.
Definition: lease.h:300
std::vector< uint8_t > remote_id_
Remote identifier for Bulk Lease Query.
Definition: lease.h:490
std::vector< uint8_t > relay_id_
Relay identifier for Bulk Lease Query.
Definition: lease.h:493
const std::vector< uint8_t > & getClientIdVector() const
Returns a client identifier.
Definition: lease.cc:338
Structure that holds a lease for IPv6 address and/or prefix.
Definition: lease.h:513
const std::vector< uint8_t > & getDuidVector() const
Returns a reference to a vector representing a DUID.
Definition: lease.cc:509
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:115
SubnetID subnet_id_
Subnet identifier.
Definition: lease.h:154
const std::vector< uint8_t > & getHWAddrVector() const
Returns raw (as vector) hardware address.
Definition: lease.cc:348
int64_t getExpirationTime() const
Returns lease expiration time.
Definition: lease.cc:125
isc::asiolink::IOAddress addr_
IPv4 ot IPv6 address.
Definition: lease.h:120
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.