Kea 2.5.5
memfile_lease_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2012-2023 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>
19
20#include <boost/scoped_ptr.hpp>
21#include <boost/shared_ptr.hpp>
22
23#include <mutex>
24
25namespace isc {
26namespace dhcp {
27
28class LFCSetup;
29
81public:
82
93 static const int MAJOR_VERSION_V4 = 3;
94
96 static const int MINOR_VERSION_V4 = 0;
98
111 static const int MAJOR_VERSION_V6 = 5;
112
114 static const int MINOR_VERSION_V6 = 0;
116
117
124 enum Universe {
126 V6
127 };
128
132
133
155
157 virtual ~Memfile_LeaseMgr();
158
160 static std::string getDBVersion(Universe const& u);
161
167 virtual bool addLease(const Lease4Ptr& lease) override;
168
174 virtual bool addLease(const Lease6Ptr& lease) override;
175
184 virtual Lease4Ptr getLease4(const isc::asiolink::IOAddress& addr) const override;
185
196 virtual Lease4Collection getLease4(const isc::dhcp::HWAddr& hwaddr) const override;
197
211 virtual Lease4Ptr getLease4(const HWAddr& hwaddr,
212 SubnetID subnet_id) const override;
213
219 virtual Lease4Collection getLease4(const ClientId& client_id) const override;
220
233 virtual Lease4Ptr getLease4(const ClientId& clientid,
234 SubnetID subnet_id) const override;
235
241 virtual Lease4Collection getLeases4(SubnetID subnet_id) const override;
242
248 virtual Lease4Collection getLeases4(const std::string& hostname) const override;
249
253 virtual Lease4Collection getLeases4() const override;
254
279 virtual Lease4Collection
280 getLeases4(const asiolink::IOAddress& lower_bound_address,
281 const LeasePageSize& page_size) const override;
282
292 virtual Lease6Ptr getLease6(Lease::Type type,
293 const isc::asiolink::IOAddress& addr) const override;
294
304 const DUID& duid,
305 uint32_t iaid) const override;
306
320 const DUID& duid,
321 uint32_t iaid,
322 SubnetID subnet_id) const override;
323
329 virtual Lease6Collection getLeases6(SubnetID subnet_id) const override;
330
336 virtual Lease6Collection getLeases6(const std::string& hostname) const override;
337
341 virtual Lease6Collection getLeases6() const override;
342
346 virtual Lease6Collection getLeases6(const DUID& duid) const override;
347
372 virtual Lease6Collection
373 getLeases6(const asiolink::IOAddress& lower_bound_address,
374 const LeasePageSize& page_size) const override;
375
386 virtual void getExpiredLeases4(Lease4Collection& expired_leases,
387 const size_t max_leases) const override;
388
399 virtual void getExpiredLeases6(Lease6Collection& expired_leases,
400 const size_t max_leases) const override;
401
419 virtual void updateLease4(const Lease4Ptr& lease4) override;
420
438 virtual void updateLease6(const Lease6Ptr& lease6) override;
439
454 virtual bool deleteLease(const Lease4Ptr& lease) override;
455
470 virtual bool deleteLease(const Lease6Ptr& lease) override;
471
479 virtual uint64_t deleteExpiredReclaimedLeases4(const uint32_t secs) override;
480
488 virtual uint64_t deleteExpiredReclaimedLeases6(const uint32_t secs) override;
489
498 virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
499
508 virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
509
521 virtual std::string
522 checkLimits4(isc::data::ConstElementPtr const& user_context) const override;
523
535 virtual std::string
536 checkLimits6(isc::data::ConstElementPtr const& user_context) const override;
537
542 virtual bool isJsonSupported() const override;
543
544private:
545
549
555 bool addLeaseInternal(const Lease4Ptr& lease);
556
562 bool addLeaseInternal(const Lease6Ptr& lease);
563
569 Lease4Ptr getLease4Internal(const isc::asiolink::IOAddress& addr) const;
570
575 void getLease4Internal(const isc::dhcp::HWAddr& hwaddr,
576 Lease4Collection& collection) const;
577
585 Lease4Ptr getLease4Internal(const HWAddr& hwaddr,
586 SubnetID subnet_id) const;
587
592 void getLease4Internal(const ClientId& client_id,
593 Lease4Collection& collection) const;
594
602 Lease4Ptr getLease4Internal(const ClientId& clientid,
603 const HWAddr& hwaddr,
604 SubnetID subnet_id) const;
605
612 Lease4Ptr getLease4Internal(const ClientId& clientid,
613 SubnetID subnet_id) const;
614
619 void getLeases4Internal(SubnetID subnet_id,
620 Lease4Collection& collection) const;
621
626 void getLeases4Internal(const std::string& hostname,
627 Lease4Collection& collection) const;
628
632 void getLeases4Internal(Lease4Collection& collection) const;
633
640 void getLeases4Internal(const asiolink::IOAddress& lower_bound_address,
641 const LeasePageSize& page_size,
642 Lease4Collection& collection) const;
643
650 Lease6Ptr getLease6Internal(Lease::Type type,
651 const isc::asiolink::IOAddress& addr) const;
652
658 Lease6Ptr getAnyLease6Internal(const isc::asiolink::IOAddress& addr) const;
659
667 void getLeases6Internal(Lease::Type type,
668 const DUID& duid,
669 uint32_t iaid,
670 Lease6Collection& collection) const;
671
680 void getLeases6Internal(Lease::Type type,
681 const DUID& duid,
682 uint32_t iaid,
683 SubnetID subnet_id,
684 Lease6Collection& collection) const;
685
690 void getLeases6Internal(SubnetID subnet_id,
691 Lease6Collection& collection) const;
692
697 void getLeases6Internal(const std::string& hostname,
698 Lease6Collection& collection) const;
699
703 void getLeases6Internal(Lease6Collection& collection) const;
704
709 void getLeases6Internal(const DUID& duid,
710 Lease6Collection& collection) const;
711
718 void getLeases6Internal(const asiolink::IOAddress& lower_bound_address,
719 const LeasePageSize& page_size,
720 Lease6Collection& collection) const;
721
728 void getExpiredLeases4Internal(Lease4Collection& expired_leases,
729 const size_t max_leases) const;
730
737 void getExpiredLeases6Internal(Lease6Collection& expired_leases,
738 const size_t max_leases) const;
739
754 void updateLease4Internal(const Lease4Ptr& lease4);
755
770 void updateLease6Internal(const Lease6Ptr& lease6);
771
786 bool deleteLeaseInternal(const Lease4Ptr& addr);
787
802 bool deleteLeaseInternal(const Lease6Ptr& addr);
803
809 size_t wipeLeases4Internal(const SubnetID& subnet_id);
810
816 size_t wipeLeases6Internal(const SubnetID& subnet_id);
818
845 template<typename IndexType, typename LeaseType, typename StorageType,
846 typename LeaseFileType>
847 uint64_t deleteExpiredReclaimedLeases(const uint32_t secs,
848 const Universe& universe,
849 StorageType& storage,
850 LeaseFileType& lease_file);
851
858 int64_t getSubnetStat(const SubnetID& subnet_id, const std::string& stat_label) const;
859
870 bool getLeaseLimit(data::ConstElementPtr parent, Lease::Type ltype, size_t& limit) const;
871
872public:
873
879 virtual std::string getType() const override {
880 return (std::string("memfile"));
881 }
882
888 virtual std::string getName() const override {
889 return ("memory");
890 }
891
897 virtual std::string getDescription() const override;
898
903 virtual std::pair<uint32_t, uint32_t> getVersion() const override;
904
909 virtual void commit() override;
910
915 virtual void rollback() override;
916
918
920
921
932 FILE_PID
933 };
934
953 static std::string appendSuffix(const std::string& file_name,
954 const LFCFileType& file_type);
956
957
961
962
966 std::string getDefaultLeaseFilePath(Universe u) const;
967
974 std::string getLeaseFilePath(Universe u) const;
975
987 bool persistLeases(Universe u) const;
988
990
991private:
992
1008 std::string initLeaseFilePath(Universe u);
1009
1065 template<typename LeaseObjectType, typename LeaseFileType,
1066 typename StorageType>
1067 bool loadLeasesFromFiles(const std::string& filename,
1068 boost::shared_ptr<LeaseFileType>& lease_file,
1069 StorageType& storage);
1070
1072 Lease4Storage storage4_;
1073
1075 Lease6Storage storage6_;
1076
1077protected:
1078
1081
1084
1086 boost::shared_ptr<CSVLeaseFile4> lease_file4_;
1087
1089 boost::shared_ptr<CSVLeaseFile6> lease_file6_;
1090
1091public:
1092
1097
1098
1102 bool isLFCRunning() const;
1103
1106 int getLFCExitStatus() const;
1108
1116 virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override;
1117
1130
1139 virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery4(const SubnetID& subnet_id) override;
1140
1150 virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
1151 const SubnetID& last_subnet_id) override;
1152
1160 virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override;
1161
1174
1183 virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID& subnet_id) override;
1184
1194 virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery6(const SubnetID& first_subnet_id,
1195 const SubnetID& last_subnet_id) override;
1196
1200
1201
1202protected:
1203
1215 virtual void lfcCallback();
1217
1219
1220
1221private:
1222
1239 void lfcSetup(bool conversion_needed = false);
1240
1263 template<typename LeaseFileType>
1264 void lfcExecute(boost::shared_ptr<LeaseFileType>& lease_file);
1265
1267 boost::scoped_ptr<LFCSetup> lfc_setup_;
1268
1274
1276
1278 boost::scoped_ptr<std::mutex> mutex_;
1279
1281 ClassLeaseCounter class_lease_counter_;
1282
1283public:
1291 virtual size_t getClassLeaseCount(const ClientClass& client_class,
1292 const Lease::Type& ltype = Lease::TYPE_V4) const override;
1293
1301 virtual void recountClassLeases4() override;
1302
1310 virtual void recountClassLeases6() override;
1311
1315 virtual void clearClassLeaseCounts() override;
1316
1320
1333 virtual Lease4Collection
1334 getLeases4ByRelayId(const OptionBuffer& relay_id,
1335 const asiolink::IOAddress& lower_bound_address,
1336 const LeasePageSize& page_size,
1337 const time_t& qry_start_time = 0,
1338 const time_t& qry_end_time = 0) override;
1339
1352 virtual Lease4Collection
1353 getLeases4ByRemoteId(const OptionBuffer& remote_id,
1354 const asiolink::IOAddress& lower_bound_address,
1355 const LeasePageSize& page_size,
1356 const time_t& qry_start_time = 0,
1357 const time_t& qry_end_time = 0) override;
1358
1369 virtual Lease6Collection
1370 getLeases6ByRelayId(const DUID& relay_id,
1371 const asiolink::IOAddress& link_addr,
1372 uint8_t link_len,
1373 const asiolink::IOAddress& lower_bound_address,
1374 const LeasePageSize& page_size) override;
1375
1386 virtual Lease6Collection
1387 getLeases6ByRemoteId(const OptionBuffer& remote_id,
1388 const asiolink::IOAddress& link_addr,
1389 uint8_t link_len,
1390 const asiolink::IOAddress& lower_bound_address,
1391 const LeasePageSize& page_size) override;
1392
1402 virtual Lease6Collection
1403 getLeases6ByLink(const asiolink::IOAddress& link_addr,
1404 uint8_t link_len,
1405 const asiolink::IOAddress& lower_bound_address,
1406 const LeasePageSize& page_size) override;
1407
1417 size_t extractExtendedInfo4(bool update, bool current);
1418
1423 virtual size_t upgradeExtendedInfo6(const LeasePageSize& page_size) override;
1424
1426 virtual void wipeExtendedInfoTables6() override;
1427
1431 virtual size_t byRelayId6size() const override;
1432
1436 virtual size_t byRemoteId6size() const override;
1437
1438private:
1439
1453 getLeases4ByRelayIdInternal(const OptionBuffer& relay_id,
1454 const asiolink::IOAddress& lower_bound_address,
1455 const LeasePageSize& page_size,
1456 const time_t& qry_start_time,
1457 const time_t& qry_end_time);
1458
1472 getLeases4ByRemoteIdInternal(const OptionBuffer& remote_id,
1473 const asiolink::IOAddress& lower_bound_address,
1474 const LeasePageSize& page_size,
1475 const time_t& qry_start_time,
1476 const time_t& qry_end_time);
1477
1489 getLeases6ByRelayIdInternal(const DUID& relay_id,
1490 const asiolink::IOAddress& link_addr,
1491 uint8_t link_len,
1492 const asiolink::IOAddress& lower_bound_address,
1493 const LeasePageSize& page_size);
1494
1506 getLeases6ByRemoteIdInternal(const OptionBuffer& remote_id,
1507 const asiolink::IOAddress& link_addr,
1508 uint8_t link_len,
1509 const asiolink::IOAddress& lower_bound_address,
1510 const LeasePageSize& page_size);
1511
1522 getLeases6ByLinkInternal(const asiolink::IOAddress& link_addr,
1523 uint8_t link_len,
1524 const asiolink::IOAddress& lower_bound_address,
1525 const LeasePageSize& page_size);
1526public:
1527
1531 virtual void writeLeases4(const std::string& filename) override;
1532
1536 virtual void writeLeases6(const std::string& filename) override;
1537
1542 virtual size_t upgradeExtendedInfo4(const LeasePageSize& page_size) override;
1543
1544protected:
1545
1547
1548
1551
1555 virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress& addr) override;
1556
1561 virtual void addRelayId6(const isc::asiolink::IOAddress& lease_addr,
1562 const std::vector<uint8_t>& relay_id) override;
1563
1568 virtual void addRemoteId6(const isc::asiolink::IOAddress& lease_addr,
1569 const std::vector<uint8_t>& remote_id) override;
1570
1571private:
1576 virtual void writeLeases4Internal(const std::string& filename);
1577
1582 virtual void writeLeases6Internal(const std::string& filename);
1583};
1584
1585} // namespace dhcp
1586} // namespace isc
1587
1588#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:218
Holds DUID (DHCPv6 Unique Identifier)
Definition: duid.h:138
static std::string getDBVersion()
Class method to return extended version info This class method must be redeclared and redefined in de...
Definition: lease_mgr.cc:520
Wraps value holding size of the page with leases.
Definition: lease_mgr.h:46
Concrete implementation of a lease database backend using flat file.
Lease6ExtendedInfoRemoteIdTable remote_id6_
stores IPv6 by-remote-id cross-reference table
virtual void rollback() override
Rollback Transactions.
virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer &remote_id, const asiolink::IOAddress &link_addr, uint8_t link_len, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size) override
Returns existing IPv6 leases with a given remote-id.
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 Lease6Collection getLeases6ByLink(const asiolink::IOAddress &link_addr, uint8_t link_len, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size) override
Returns existing IPv6 leases with on a given link.
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.
virtual bool isJsonSupported() const override
Checks if JSON support is enabled in the database.
Universe
Specifies universe (V4, V6)
virtual std::string getType() const override
Return backend type.
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.
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.
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).
virtual std::pair< uint32_t, uint32_t > getVersion() const override
Returns backend version.
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 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 LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID &subnet_id) override
Creates and runs the IPv6 lease stats query for a single subnet.
virtual Lease6Collection getLeases6ByRelayId(const DUID &relay_id, const asiolink::IOAddress &link_addr, uint8_t link_len, const asiolink::IOAddress &lower_bound_address, const LeasePageSize &page_size) override
Returns existing IPv6 leases with a given relay-id.
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.
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.
std::string getDefaultLeaseFilePath(Universe u) const
Returns default path to the lease file.
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.
Introduces callbacks into the LeaseMgr.
static const int MAJOR_VERSION_V4
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:42
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_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< 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.
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:505
std::vector< Lease6Ptr > Lease6Collection
A collection of IPv6 leases.
Definition: lease.h:670
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::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:497
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition: lease.h:292
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