Kea 3.1.1
memfile_lease_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2012-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_MGR_H
8#define MEMFILE_LEASE_MGR_H
9
13#include <dhcp/hwaddr.h>
20
21#include <boost/scoped_ptr.hpp>
22#include <boost/shared_ptr.hpp>
23
24#include <mutex>
25
26namespace isc {
27namespace dhcp {
28
29class LFCSetup;
30
82public:
83
94 static const int MAJOR_VERSION_V4 = 3;
95
97 static const int MINOR_VERSION_V4 = 0;
99
112 static const int MAJOR_VERSION_V6 = 5;
113
115 static const int MINOR_VERSION_V6 = 0;
117
124 enum Universe {
127 };
128
132
133
155
157 virtual ~Memfile_LeaseMgr();
158
160 static std::string getDBVersion();
161
163 static std::string getDBVersionInternal(Universe const& u);
164
170 virtual bool addLease(const Lease4Ptr& lease) override;
171
177 virtual bool addLease(const Lease6Ptr& lease) override;
178
187 virtual Lease4Ptr getLease4(const isc::asiolink::IOAddress& addr) const override;
188
199 virtual Lease4Collection getLease4(const isc::dhcp::HWAddr& hwaddr) const override;
200
214 virtual Lease4Ptr getLease4(const HWAddr& hwaddr,
215 SubnetID subnet_id) const override;
216
222 virtual Lease4Collection getLease4(const ClientId& client_id) const override;
223
236 virtual Lease4Ptr getLease4(const ClientId& clientid,
237 SubnetID subnet_id) const override;
238
244 virtual Lease4Collection getLeases4(SubnetID subnet_id) const override;
245
251 virtual Lease4Collection getLeases4(const std::string& hostname) const override;
252
256 virtual Lease4Collection getLeases4() const override;
257
282 virtual Lease4Collection
283 getLeases4(const asiolink::IOAddress& lower_bound_address,
284 const LeasePageSize& page_size) const override;
285
295 virtual Lease6Ptr getLease6(Lease::Type type,
296 const isc::asiolink::IOAddress& addr) const override;
297
308 virtual Lease6Collection getLease6(const isc::dhcp::HWAddr& hwaddr) const override;
309
319 const DUID& duid,
320 uint32_t iaid) const override;
321
335 const DUID& duid,
336 uint32_t iaid,
337 SubnetID subnet_id) const override;
338
344 virtual Lease6Collection getLeases6(SubnetID subnet_id) const override;
345
351 virtual Lease6Collection getLeases6(const std::string& hostname) const override;
352
356 virtual Lease6Collection getLeases6() const override;
357
361 virtual Lease6Collection getLeases6(const DUID& duid) const override;
362
387 virtual Lease6Collection
388 getLeases6(const asiolink::IOAddress& lower_bound_address,
389 const LeasePageSize& page_size) const override;
390
399 virtual Lease6Collection
400 getLeases6(SubnetID subnet_id,
401 const asiolink::IOAddress& lower_bound_address,
402 const LeasePageSize& page_size) const override;
403
414 virtual void getExpiredLeases4(Lease4Collection& expired_leases,
415 const size_t max_leases) const override;
416
427 virtual void getExpiredLeases6(Lease6Collection& expired_leases,
428 const size_t max_leases) const override;
429
447 virtual void updateLease4(const Lease4Ptr& lease4) override;
448
466 virtual void updateLease6(const Lease6Ptr& lease6) override;
467
482 virtual bool deleteLease(const Lease4Ptr& lease) override;
483
498 virtual bool deleteLease(const Lease6Ptr& lease) override;
499
507 virtual uint64_t deleteExpiredReclaimedLeases4(const uint32_t secs) override;
508
516 virtual uint64_t deleteExpiredReclaimedLeases6(const uint32_t secs) override;
517
526 virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
527
536 virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
537
549 virtual std::string
550 checkLimits4(isc::data::ConstElementPtr const& user_context) const override;
551
563 virtual std::string
564 checkLimits6(isc::data::ConstElementPtr const& user_context) const override;
565
570 virtual bool isJsonSupported() const override;
571
572private:
573
577
583 bool addLeaseInternal(const Lease4Ptr& lease);
584
590 bool addLeaseInternal(const Lease6Ptr& lease);
591
597 Lease4Ptr getLease4Internal(const isc::asiolink::IOAddress& addr) const;
598
603 void getLease4Internal(const isc::dhcp::HWAddr& hwaddr,
604 Lease4Collection& collection) const;
605
613 Lease4Ptr getLease4Internal(const HWAddr& hwaddr,
614 SubnetID subnet_id) const;
615
620 void getLease4Internal(const ClientId& client_id,
621 Lease4Collection& collection) const;
622
630 Lease4Ptr getLease4Internal(const ClientId& clientid,
631 const HWAddr& hwaddr,
632 SubnetID subnet_id) const;
633
640 Lease4Ptr getLease4Internal(const ClientId& clientid,
641 SubnetID subnet_id) const;
642
647 void getLeases4Internal(SubnetID subnet_id,
648 Lease4Collection& collection) const;
649
654 void getLeases4Internal(const std::string& hostname,
655 Lease4Collection& collection) const;
656
660 void getLeases4Internal(Lease4Collection& collection) const;
661
668 void getLeases4Internal(const asiolink::IOAddress& lower_bound_address,
669 const LeasePageSize& page_size,
670 Lease4Collection& collection) const;
671
678 Lease6Ptr getLease6Internal(Lease::Type type,
679 const isc::asiolink::IOAddress& addr) const;
680
685 void getLease6Internal(const isc::dhcp::HWAddr& hwaddr,
686 Lease6Collection& collection) const;
687
693 Lease6Ptr getAnyLease6Internal(const isc::asiolink::IOAddress& addr) const;
694
702 void getLeases6Internal(Lease::Type type,
703 const DUID& duid,
704 uint32_t iaid,
705 Lease6Collection& collection) const;
706
715 void getLeases6Internal(Lease::Type type,
716 const DUID& duid,
717 uint32_t iaid,
718 SubnetID subnet_id,
719 Lease6Collection& collection) const;
720
725 void getLeases6Internal(SubnetID subnet_id,
726 Lease6Collection& collection) const;
727
732 void getLeases6Internal(const std::string& hostname,
733 Lease6Collection& collection) const;
734
738 void getLeases6Internal(Lease6Collection& collection) const;
739
744 void getLeases6Internal(const DUID& duid,
745 Lease6Collection& collection) const;
746
753 void getLeases6Internal(const asiolink::IOAddress& lower_bound_address,
754 const LeasePageSize& page_size,
755 Lease6Collection& collection) const;
756
765 virtual Lease6Collection
766 getLeases6Internal(SubnetID subnet_id,
767 const asiolink::IOAddress& lower_bound_address,
768 const LeasePageSize& page_size) const;
769
776 void getExpiredLeases4Internal(Lease4Collection& expired_leases,
777 const size_t max_leases) const;
778
785 void getExpiredLeases6Internal(Lease6Collection& expired_leases,
786 const size_t max_leases) const;
787
802 void updateLease4Internal(const Lease4Ptr& lease4);
803
818 void updateLease6Internal(const Lease6Ptr& lease6);
819
834 bool deleteLeaseInternal(const Lease4Ptr& addr);
835
850 bool deleteLeaseInternal(const Lease6Ptr& addr);
851
857 size_t wipeLeases4Internal(const SubnetID& subnet_id);
858
864 size_t wipeLeases6Internal(const SubnetID& subnet_id);
866
893 template<typename IndexType, typename LeaseType, typename StorageType,
894 typename LeaseFileType>
895 uint64_t deleteExpiredReclaimedLeases(const uint32_t secs,
896 const Universe& universe,
897 StorageType& storage,
898 LeaseFileType& lease_file);
899
906 int64_t getSubnetStat(const SubnetID& subnet_id, const std::string& stat_label) const;
907
918 bool getLeaseLimit(data::ConstElementPtr parent, Lease::Type ltype, size_t& limit) const;
919
920public:
921
927 virtual std::string getType() const override {
928 return (std::string("memfile"));
929 }
930
936 virtual std::string getName() const override {
937 return ("memory");
938 }
939
945 virtual std::string getDescription() const override;
946
952 virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const override;
953
958 virtual void commit() override;
959
964 virtual void rollback() override;
965
969 static bool isLFCProcessRunning(const std::string file_name, Universe u);
970
972
974
975
988
1007 static std::string appendSuffix(const std::string& file_name,
1008 const LFCFileType& file_type);
1010
1014
1015
1020 static std::string getDefaultLeaseFilePath(Universe u,
1021 const std::string filename = "");
1022
1029 std::string getLeaseFilePath(Universe u) const;
1030
1042 bool persistLeases(Universe u) const;
1043
1045
1046private:
1047
1063 std::string initLeaseFilePath(Universe u);
1064
1121 template<typename LeaseObjectType, typename LeaseFileType,
1122 typename StorageType>
1123 bool loadLeasesFromFiles(Universe u, const std::string& filename,
1124 boost::shared_ptr<LeaseFileType>& lease_file,
1125 StorageType& storage);
1126
1128 Lease4Storage storage4_;
1129
1131 Lease6Storage storage6_;
1132
1133protected:
1134
1137
1140
1142 boost::shared_ptr<CSVLeaseFile4> lease_file4_;
1143
1145 boost::shared_ptr<CSVLeaseFile6> lease_file6_;
1146
1147public:
1148
1153
1154
1158 bool isLFCRunning() const;
1159
1162 int getLFCExitStatus() const;
1164
1172 virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override;
1173
1186
1195 virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery4(const SubnetID& subnet_id) override;
1196
1206 virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
1207 const SubnetID& last_subnet_id) override;
1208
1216 virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override;
1217
1230
1239 virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID& subnet_id) override;
1240
1250 virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery6(const SubnetID& first_subnet_id,
1251 const SubnetID& last_subnet_id) override;
1252
1256
1257
1258protected:
1259
1271 virtual void lfcCallback();
1273
1275
1276
1277private:
1278
1295 void lfcSetup(bool conversion_needed = false);
1296
1319 template<typename LeaseFileType>
1320 void lfcExecute(boost::shared_ptr<LeaseFileType>& lease_file);
1321
1323 boost::scoped_ptr<LFCSetup> lfc_setup_;
1324
1330
1332
1334 boost::scoped_ptr<std::mutex> mutex_;
1335
1337 ClassLeaseCounter class_lease_counter_;
1338
1339public:
1347 virtual size_t getClassLeaseCount(const ClientClass& client_class,
1348 const Lease::Type& ltype = Lease::TYPE_V4) const override;
1349
1357 virtual void recountClassLeases4() override;
1358
1366 virtual void recountClassLeases6() override;
1367
1371 virtual void clearClassLeaseCounts() override;
1372
1376
1389 virtual Lease4Collection
1390 getLeases4ByRelayId(const OptionBuffer& relay_id,
1391 const asiolink::IOAddress& lower_bound_address,
1392 const LeasePageSize& page_size,
1393 const time_t& qry_start_time = 0,
1394 const time_t& qry_end_time = 0) override;
1395
1408 virtual Lease4Collection
1409 getLeases4ByRemoteId(const OptionBuffer& remote_id,
1410 const asiolink::IOAddress& lower_bound_address,
1411 const LeasePageSize& page_size,
1412 const time_t& qry_start_time = 0,
1413 const time_t& qry_end_time = 0) override;
1414
1423 virtual Lease6Collection
1424 getLeases6ByRelayId(const DUID& relay_id,
1425 const asiolink::IOAddress& lower_bound_address,
1426 const LeasePageSize& page_size) override;
1427
1436 virtual Lease6Collection
1437 getLeases6ByRemoteId(const OptionBuffer& remote_id,
1438 const asiolink::IOAddress& lower_bound_address,
1439 const LeasePageSize& page_size) override;
1440
1450 size_t extractExtendedInfo4(bool update, bool current);
1451
1456 virtual size_t upgradeExtendedInfo6(const LeasePageSize& page_size) override;
1457
1459 virtual void wipeExtendedInfoTables6() override;
1460
1464 virtual size_t byRelayId6size() const override;
1465
1469 virtual size_t byRemoteId6size() const override;
1470
1471private:
1472
1486 getLeases4ByRelayIdInternal(const OptionBuffer& relay_id,
1487 const asiolink::IOAddress& lower_bound_address,
1488 const LeasePageSize& page_size,
1489 const time_t& qry_start_time,
1490 const time_t& qry_end_time);
1491
1505 getLeases4ByRemoteIdInternal(const OptionBuffer& remote_id,
1506 const asiolink::IOAddress& lower_bound_address,
1507 const LeasePageSize& page_size,
1508 const time_t& qry_start_time,
1509 const time_t& qry_end_time);
1510
1520 getLeases6ByRelayIdInternal(const DUID& relay_id,
1521 const asiolink::IOAddress& lower_bound_address,
1522 const LeasePageSize& page_size);
1523
1533 getLeases6ByRemoteIdInternal(const OptionBuffer& remote_id,
1534 const asiolink::IOAddress& lower_bound_address,
1535 const LeasePageSize& page_size);
1536
1537public:
1538
1542 virtual void writeLeases4(const std::string& filename) override;
1543
1547 virtual void writeLeases6(const std::string& filename) override;
1548
1553 virtual size_t upgradeExtendedInfo4(const LeasePageSize& page_size) override;
1554
1555protected:
1556
1558
1561
1565 virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress& addr) override;
1566
1571 virtual void addRelayId6(const isc::asiolink::IOAddress& lease_addr,
1572 const std::vector<uint8_t>& relay_id) override;
1573
1578 virtual void addRemoteId6(const isc::asiolink::IOAddress& lease_addr,
1579 const std::vector<uint8_t>& remote_id) override;
1580
1581private:
1586 virtual void writeLeases4Internal(const std::string& filename);
1587
1592 virtual void writeLeases6Internal(const std::string& filename);
1593
1594public:
1601 static TrackingLeaseMgrPtr
1603};
1604
1607 // Constructor registers
1614
1615 // Destructor deregisters
1619};
1620
1621} // namespace dhcp
1622} // namespace isc
1623
1624#endif // MEMFILE_LEASE_MGR_H
Common database connection class.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
Container that maintains counts of leases per class and lease type.
Holds Client identifier or client IPv4 address.
Definition duid.h:222
Holds DUID (DHCPv6 Unique Identifier)
Definition duid.h:142
Represents a configuration for Lease File Cleanup.
static bool registerFactory(const std::string &db_type, const Factory &factory, bool no_log=false, DBVersion db_version=DBVersion())
Register a lease mgr factory.
static bool deregisterFactory(const std::string &db_type, bool no_log=false)
Deregister a lease mgr factory.
Wraps value holding size of the page with leases.
Definition lease_mgr.h:46
Lease6ExtendedInfoRemoteIdTable remote_id6_
stores IPv6 by-remote-id cross-reference table
virtual void rollback() override
Rollback Transactions.
size_t extractExtendedInfo4(bool update, bool current)
Extract extended info for v4 leases.
virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery6(const SubnetID &first_subnet_id, const SubnetID &last_subnet_id) override
Creates and runs the IPv6 lease stats query for a single subnet.
virtual void clearClassLeaseCounts() override
Clears the class-lease count map.
virtual size_t byRelayId6size() const override
Return the by-relay-id table size.
virtual Lease4Collection getLeases4ByRelayId(const OptionBuffer &relay_id, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size, const time_t &qry_start_time=0, const time_t &qry_end_time=0) override
The following queries are used to fulfill Bulk Lease Query queries.
Memfile_LeaseMgr(const db::DatabaseConnection::ParameterMap &parameters)
The sole lease manager constructor.
bool isLFCRunning() const
Checks if the process performing lease file cleanup is running.
virtual void writeLeases4(const std::string &filename) override
Write V4 leases to a file.
virtual void updateLease4(const Lease4Ptr &lease4) override
Updates IPv4 lease.
virtual size_t wipeLeases4(const SubnetID &subnet_id) override
Removes specified IPv4 leases.
virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress &addr) override
Delete lease6 extended info from tables.
static bool isLFCProcessRunning(const std::string file_name, Universe u)
Check if LFC is running.
virtual bool isJsonSupported() const override
Checks if JSON support is enabled in the database.
Universe
Specifies universe (V4, V6)
static std::string getDefaultLeaseFilePath(Universe u, const std::string filename="")
Returns default path to the lease file.
virtual std::string getType() const override
Return backend type.
static TrackingLeaseMgrPtr factory(const isc::db::DatabaseConnection::ParameterMap &parameters)
Factory class method.
LFCFileType
Types of the lease files used by the Lease File Cleanup.
@ FILE_PREVIOUS
Previous Lease File.
virtual bool deleteLease(const Lease4Ptr &lease) override
Deletes an IPv4 lease.
virtual void commit() override
Commit Transactions.
virtual size_t wipeLeases6(const SubnetID &subnet_id) override
Removed specified IPv6 leases.
virtual std::pair< uint32_t, uint32_t > getVersion(const std::string &timer_name=std::string()) const override
Returns backend version.
int getLFCExitStatus() const
Returns the status code returned by the last executed LFC process.
virtual LeaseStatsQueryPtr startPoolLeaseStatsQuery6() override
Creates and runs the IPv6 lease stats query for all subnets and pools.
bool persistLeases(Universe u) const
Specifies whether or not leases are written to disk.
virtual std::string getName() const override
Returns backend name.
virtual void addRemoteId6(const isc::asiolink::IOAddress &lease_addr, const std::vector< uint8_t > &remote_id) override
Add lease6 extended info into by-remote-id table.
static std::string getDBVersion()
Return extended version info.
virtual Lease4Collection getLeases4() const override
Returns all IPv4 leases.
virtual size_t getClassLeaseCount(const ClientClass &client_class, const Lease::Type &ltype=Lease::TYPE_V4) const override
Returns the class lease count for a given class and lease type.
virtual void getExpiredLeases6(Lease6Collection &expired_leases, const size_t max_leases) const override
Returns a collection of expired DHCPv6 leases.
void buildExtendedInfoTables6()
Extended information / Bulk Lease Query shared interface.
virtual bool addLease(const Lease4Ptr &lease) override
Adds an IPv4 lease.
virtual size_t byRemoteId6size() const override
Return the by-remote-id table size.
virtual void writeLeases6(const std::string &filename) override
Write V6 leases to a file.
Lease6ExtendedInfoRelayIdTable relay_id6_
stores IPv6 by-relay-id cross-reference table
virtual void recountClassLeases6() override
Recount the leases per class for V6 leases.
virtual Lease4Collection getLeases4ByRemoteId(const OptionBuffer &remote_id, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size, const time_t &qry_start_time=0, const time_t &qry_end_time=0) override
Returns existing IPv4 leases with a given remote-id.
virtual void wipeExtendedInfoTables6() override
Wipe extended info table (v6).
boost::shared_ptr< CSVLeaseFile4 > lease_file4_
Holds the pointer to the DHCPv4 lease file IO.
std::string getLeaseFilePath(Universe u) const
Returns an absolute path to the lease file.
virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer &remote_id, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size) override
Returns existing IPv6 leases with a given remote-id.
virtual Lease6Collection getLeases6() const override
Returns all IPv6 leases.
virtual void lfcCallback()
A callback function triggering Lease File Cleanup (LFC).
virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery4(const SubnetID &subnet_id) override
Creates and runs the IPv4 lease stats query for a single subnet.
virtual Lease6Collection getLeases6ByRelayId(const DUID &relay_id, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size) override
Returns existing IPv6 leases with a given relay-id.
virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID &subnet_id) override
Creates and runs the IPv6 lease stats query for a single subnet.
virtual std::string getDescription() const override
Returns description of the backend.
static std::string appendSuffix(const std::string &file_name, const LFCFileType &file_type)
Appends appropriate suffix to the file name.
virtual void addRelayId6(const isc::asiolink::IOAddress &lease_addr, const std::vector< uint8_t > &relay_id) override
Add lease6 extended info into by-relay-id table.
virtual size_t upgradeExtendedInfo6(const LeasePageSize &page_size) override
Upgrade extended info (v6).
virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override
Creates and runs the IPv4 lease stats query.
virtual Lease6Ptr getLease6(Lease::Type type, const isc::asiolink::IOAddress &addr) const override
Returns existing IPv6 lease for a given IPv6 address.
virtual void recountClassLeases4() override
Recount the leases per class for V4 leases.
virtual void updateLease6(const Lease6Ptr &lease6) override
Updates IPv6 lease.
virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery4(const SubnetID &first_subnet_id, const SubnetID &last_subnet_id) override
Creates and runs the IPv4 lease stats query for a single subnet.
virtual uint64_t deleteExpiredReclaimedLeases4(const uint32_t secs) override
Deletes all expired-reclaimed DHCPv4 leases.
static std::string getDBVersionInternal(Universe const &u)
Local version of getDBVersion() class method.
virtual LeaseStatsQueryPtr startPoolLeaseStatsQuery4() override
Creates and runs the IPv4 lease stats query for all subnets and pools.
virtual std::string checkLimits6(isc::data::ConstElementPtr const &user_context) const override
Checks if the IPv6 lease limits set in the given user context are exceeded.
virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override
Creates and runs the IPv6 lease stats query.
virtual Lease4Ptr getLease4(const isc::asiolink::IOAddress &addr) const override
Returns existing IPv4 lease for specified IPv4 address.
virtual ~Memfile_LeaseMgr()
Destructor (closes file)
virtual std::string checkLimits4(isc::data::ConstElementPtr const &user_context) const override
Checks if the IPv4 lease limits set in the given user context are exceeded.
boost::shared_ptr< CSVLeaseFile6 > lease_file6_
Holds the pointer to the DHCPv6 lease file IO.
virtual size_t upgradeExtendedInfo4(const LeasePageSize &page_size) override
Upgrade extended info (v4).
virtual uint64_t deleteExpiredReclaimedLeases6(const uint32_t secs) override
Deletes all expired-reclaimed DHCPv6 leases.
virtual void getExpiredLeases4(Lease4Collection &expired_leases, const size_t max_leases) const override
Returns a collection of expired DHCPv4 leases.
static const int MINOR_VERSION_V4
the minor version of the v4 memfile backend
static const int MINOR_VERSION_V6
the minor version of the v6 memfile backend
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
std::string ClientClass
Defines a single class name.
Definition classify.h:44
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.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
Definition lease.h:528
std::vector< Lease6Ptr > Lease6Collection
A collection of IPv6 leases.
Definition lease.h:693
boost::shared_ptr< LeaseStatsQuery > LeaseStatsQueryPtr
Defines a pointer to a LeaseStatsQuery.
Definition lease_mgr.h:233
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
std::unique_ptr< TrackingLeaseMgr > TrackingLeaseMgrPtr
TrackingLeaseMgr pointer.
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Definition option.h:24
std::vector< Lease4Ptr > Lease4Collection
A collection of IPv4 leases.
Definition lease.h:520
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition lease.h:315
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.
Defines the logger used by the top-level component of kea-lfc.
Hardware type that represents information from DHCPv4 packet.
Definition hwaddr.h:20
Type
Type of lease or pool.
Definition lease.h:46
@ TYPE_V4
IPv4 lease.
Definition lease.h:50