Kea 2.6.0
pgsql_lease_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2013-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 PGSQL_LEASE_MGR_H
8#define PGSQL_LEASE_MGR_H
9
10#include <asiolink/io_service.h>
11#include <dhcp/hwaddr.h>
13#include <dhcpsrv/lease_mgr.h>
17
18#include <boost/scoped_ptr.hpp>
19#include <boost/utility.hpp>
20
21#include <vector>
22#include <mutex>
23
24namespace isc {
25namespace dhcp {
26
27// Forward declaration of the Lease exchange objects. These classes are defined
28// in the .cc file.
29class PgSqlLease4Exchange;
30class PgSqlLease6Exchange;
31
42public:
43
50 db::IOServiceAccessorPtr io_service_accessor,
51 db::DbCallback db_reconnect_callback);
52
57 boost::scoped_ptr<PgSqlLease4Exchange> exchange4_;
58 boost::scoped_ptr<PgSqlLease6Exchange> exchange6_;
59
62};
63
65typedef boost::shared_ptr<PgSqlLeaseContext> PgSqlLeaseContextPtr;
66
74public:
75
77 std::vector<PgSqlLeaseContextPtr> pool_;
78
80 std::mutex mutex_;
81};
82
84typedef boost::shared_ptr<PgSqlLeaseContextPool> PgSqlLeaseContextPoolPtr;
85
91
93public:
94
115
117 virtual ~PgSqlLeaseMgr();
118
128
151 static bool dbReconnect(util::ReconnectCtlPtr db_reconnect_ctl);
152
154 static std::string getDBVersion();
155
165 virtual bool addLease(const Lease4Ptr& lease) override;
166
176 virtual bool addLease(const Lease6Ptr& lease) override;
177
193 virtual Lease4Ptr getLease4(const isc::asiolink::IOAddress& addr) const override;
194
208 virtual Lease4Collection getLease4(const isc::dhcp::HWAddr& hwaddr) const override;
209
223 virtual Lease4Ptr getLease4(const isc::dhcp::HWAddr& hwaddr,
224 SubnetID subnet_id) const override;
225
239 virtual Lease4Collection getLease4(const ClientId& clientid) const override;
240
253 virtual Lease4Ptr getLease4(const ClientId& clientid,
254 SubnetID subnet_id) const override;
255
261 virtual Lease4Collection getLeases4(SubnetID subnet_id) const override;
262
268 virtual Lease4Collection getLeases4(const std::string& hostname) const override;
269
273 virtual Lease4Collection getLeases4() const override;
274
299 virtual Lease4Collection
300 getLeases4(const asiolink::IOAddress& lower_bound_address,
301 const LeasePageSize& page_size) const override;
302
318 virtual Lease6Ptr getLease6(Lease::Type type,
319 const isc::asiolink::IOAddress& addr) const override;
320
338 virtual Lease6Collection getLeases6(Lease::Type type, const DUID& duid,
339 uint32_t iaid) const override;
340
354 virtual Lease6Collection getLeases6(Lease::Type type, const DUID& duid,
355 uint32_t iaid, SubnetID subnet_id) const override;
356
362 virtual Lease6Collection getLeases6(SubnetID subnet_id) const override;
363
369 virtual Lease6Collection getLeases6(const std::string& hostname) const override;
370
374 virtual Lease6Collection getLeases6() const override;
375
381 virtual Lease6Collection getLeases6(const DUID& duid) const override;
382
407 virtual Lease6Collection
408 getLeases6(const asiolink::IOAddress& lower_bound_address,
409 const LeasePageSize& page_size) const override;
410
419 virtual Lease6Collection
420 getLeases6(SubnetID subnet_id,
421 const asiolink::IOAddress& lower_bound_address,
422 const LeasePageSize& page_size) const override;
423
434 virtual void getExpiredLeases4(Lease4Collection& expired_leases,
435 const size_t max_leases) const override;
436
447 virtual void getExpiredLeases6(Lease6Collection& expired_leases,
448 const size_t max_leases) const override;
449
470 virtual void updateLease4(const Lease4Ptr& lease4) override;
471
492 virtual void updateLease6(const Lease6Ptr& lease6) override;
493
508 virtual bool deleteLease(const Lease4Ptr& lease) override;
509
524 virtual bool deleteLease(const Lease6Ptr& lease) override;
525
533 virtual uint64_t deleteExpiredReclaimedLeases4(const uint32_t secs) override;
534
542 virtual uint64_t deleteExpiredReclaimedLeases6(const uint32_t secs) override;
543
552 virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override;
553
566
575 virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery4(const SubnetID& subnet_id) override;
576
586 virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
587 const SubnetID& last_subnet_id) override;
588
597 virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override;
598
611
620 virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID& subnet_id) override;
621
631 virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery6(const SubnetID& first_subnet_id,
632 const SubnetID& last_subnet_id) override;
633
643 virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
644
654 virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
655
661 virtual std::string getType() const override {
662 return (std::string("postgresql"));
663 }
664
670 virtual std::string getName() const override;
671
677 virtual std::string getDescription() const override;
678
687 virtual std::pair<uint32_t, uint32_t> getVersion(const std::string& timer_name = std::string()) const override;
688
695 virtual void commit() override;
696
703 virtual void rollback() override;
704
710 DELETE_LEASE4, // Delete from lease4 by address
711 DELETE_LEASE4_STATE_EXPIRED, // Delete expired lease4 in a given state
712 DELETE_LEASE6, // Delete from lease6 by address
713 DELETE_LEASE6_STATE_EXPIRED, // Delete expired lease6 in a given state
714 GET_LEASE4, // Get all IPv4 leases
715 GET_LEASE4_ADDR, // Get lease4 by address
716 GET_LEASE4_CLIENTID, // Get lease4 by client ID
717 GET_LEASE4_CLIENTID_SUBID, // Get lease4 by client ID & subnet ID
718 GET_LEASE4_HWADDR, // Get lease4 by HW address
719 GET_LEASE4_HWADDR_SUBID, // Get lease4 by HW address & subnet ID
720 GET_LEASE4_PAGE, // Get page of leases beginning with an address
721 GET_LEASE4_UCTX_PAGE, // Get page of leases with user context
722 GET_LEASE4_SUBID, // Get IPv4 leases by subnet ID
723 GET_LEASE4_HOSTNAME, // Get IPv4 leases by hostname
724 GET_LEASE4_EXPIRE, // Get lease4 by expiration.
725 GET_LEASE4_RELAYID, // Get page of lease by relay ID.
726 GET_LEASE4_RELAYID_QST, // Get page of leases by relay ID and query start time.
727 GET_LEASE4_RELAYID_QSET, // Get page of leases by relay ID and query start and end times.
728 GET_LEASE4_RELAYID_QET, // Get page of leases by relay ID and query end time.
729 GET_LEASE4_REMOTEID, // Get page of lease by remote ID.
730 GET_LEASE4_REMOTEID_QST, // Get page of leases by remote ID and query start time.
731 GET_LEASE4_REMOTEID_QSET, // Get page of leases by remote ID and query start and end times.
732 GET_LEASE4_REMOTEID_QET, // Get page of leases by remote ID and query end time.
733 GET_LEASE6, // Get all IPv6 leases
734 GET_LEASE6_ADDR, // Get lease6 by address and type
735 GET_LEASE6_DUID_IAID, // Get lease6 by DUID and IAID
736 GET_LEASE6_DUID_IAID_SUBID, // Get lease6 by DUID, IAID and subnet ID
737 GET_LEASE6_PAGE, // Get page of leases beginning with an address
738 GET_LEASE6_UCTX_PAGE, // Get page of leases with user context
739 GET_LEASE6_SUBID, // Get IPv6 leases by subnet ID
740 GET_LEASE6_SUBID_PAGE, // Get page of IPv6 lease by subnet ID
741 GET_LEASE6_DUID, // Get IPv6 leases by DUID
742 GET_LEASE6_HOSTNAME, // Get IPv6 leases by hostname
743 GET_LEASE6_EXPIRE, // Get lease6 by expiration.
744 INSERT_LEASE4, // Add entry to lease4 table
745 INSERT_LEASE6, // Add entry to lease6 table
746 UPDATE_LEASE4, // Update a Lease4 entry
747 UPDATE_LEASE6, // Update a Lease6 entry
748 ALL_LEASE4_STATS, // Fetches IPv4 lease statistics
749 SUBNET_LEASE4_STATS, // Fetched IPv4 lease stats for a single subnet.
750 SUBNET_RANGE_LEASE4_STATS, // Fetched IPv4 lease stats for a subnet range.
751 ALL_POOL_LEASE4_STATS, // Fetches IPv4 lease pool statistics
752 ALL_LEASE6_STATS, // Fetches IPv6 lease statistics
753 SUBNET_LEASE6_STATS, // Fetched IPv6 lease stats for a single subnet.
754 SUBNET_RANGE_LEASE6_STATS, // Fetched IPv6 lease stats for a subnet range.
755 ALL_POOL_LEASE6_STATS, // Fetches IPv6 lease pool statistics
756 CHECK_LEASE4_LIMITS, // Check if allocated IPv4 leases are inside the set limits.
757 CHECK_LEASE6_LIMITS, // Check if allocated IPv6 leases are inside the set limits.
758 IS_JSON_SUPPORTED, // Checks if JSON support is enabled in the database.
759 GET_LEASE4_COUNT_BY_CLASS, // Fetches the IPv4 lease count for a given class.
760 GET_LEASE6_COUNT_BY_CLASS, // Fetches the IPv6 lease count for given class and lease type.
761 WIPE_RELAY_ID6, // Wipe the lease6_relay_id table
762 WIPE_REMOTE_ID6, // Wipe the lease6_remote_id table
763 DELETE_RELAY_ID6, // Delete a lease6_relay_id entry by address
764 DELETE_REMOTE_ID6, // Delete a lease6_remote_id entry by address
765 ADD_RELAY_ID6, // Add a lease6_relay_id entry
766 ADD_REMOTE_ID6, // Add a lease6_remote_id entry
767 GET_RELAY_ID6, // Get lease6_relay_id entries
768 GET_REMOTE_ID6, // Get lease6_remote_id entries
769 COUNT_RELAY_ID6, // Count the lease6_relay_id number of entries
770 COUNT_REMOTE_ID6, // Count the lease6_remote_id number of entries
771 NUM_STATEMENTS // Number of statements
772 };
773
774private:
775
792 bool addLeaseCommon(PgSqlLeaseContextPtr& ctx,
793 StatementIndex stindex,
794 db::PsqlBindArray& bind_array);
795
817 template <typename Exchange, typename LeaseCollection>
818 void getLeaseCollection(PgSqlLeaseContextPtr& ctx,
819 StatementIndex stindex,
820 db::PsqlBindArray& bind_array,
821 Exchange& exchange, LeaseCollection& result,
822 bool single = false) const;
823
841 void getLeaseCollection(PgSqlLeaseContextPtr& ctx,
842 StatementIndex stindex,
843 db::PsqlBindArray& bind_array,
844 Lease4Collection& result) const {
845 getLeaseCollection(ctx, stindex, bind_array, ctx->exchange4_, result);
846 }
847
864 void getLeaseCollection(PgSqlLeaseContextPtr& ctx,
865 StatementIndex stindex,
866 db::PsqlBindArray& bind_array,
867 Lease6Collection& result) const {
868 getLeaseCollection(ctx, stindex, bind_array, ctx->exchange6_, result);
869 }
870
881 void getLease(PgSqlLeaseContextPtr& ctx,
882 StatementIndex stindex,
883 db::PsqlBindArray& bind_array,
884 Lease4Ptr& result) const;
885
896 void getLease(PgSqlLeaseContextPtr& ctx,
897 StatementIndex stindex,
898 db::PsqlBindArray& bind_array,
899 Lease6Ptr& result) const;
900
915 template<typename LeaseCollection>
916 void getExpiredLeasesCommon(LeaseCollection& expired_leases,
917 const size_t max_leases,
918 StatementIndex statement_index) const;
919
936 template <typename LeasePtr>
937 void updateLeaseCommon(PgSqlLeaseContextPtr& ctx,
938 StatementIndex stindex,
939 db::PsqlBindArray& bind_array,
940 const LeasePtr& lease);
941
957 uint64_t deleteLeaseCommon(PgSqlLeaseContextPtr& ctx,
958 StatementIndex stindex,
959 db::PsqlBindArray& bind_array);
960
970 uint64_t deleteExpiredReclaimedLeasesCommon(const uint32_t secs,
971 StatementIndex statement_index);
972
984 std::string
985 checkLimits(isc::data::ConstElementPtr const& user_context, StatementIndex const stindex) const;
986
987public:
999 virtual std::string
1000 checkLimits4(isc::data::ConstElementPtr const& user_context) const override;
1001
1013 virtual std::string
1014 checkLimits6(isc::data::ConstElementPtr const& user_context) const override;
1015
1020 virtual bool isJsonSupported() const override;
1021
1029 virtual size_t getClassLeaseCount(const ClientClass& client_class,
1030 const Lease::Type& ltype = Lease::TYPE_V4) const override;
1031
1033 virtual void recountClassLeases4() override;
1034
1036 virtual void recountClassLeases6() override;
1037
1039 virtual void clearClassLeaseCounts() override;
1040
1044
1057 virtual Lease4Collection
1058 getLeases4ByRelayId(const OptionBuffer& relay_id,
1059 const asiolink::IOAddress& lower_bound_address,
1060 const LeasePageSize& page_size,
1061 const time_t& qry_start_time = 0,
1062 const time_t& qry_end_time = 0) override;
1063
1076 virtual Lease4Collection
1077 getLeases4ByRemoteId(const OptionBuffer& remote_id,
1078 const asiolink::IOAddress& lower_bound_address,
1079 const LeasePageSize& page_size,
1080 const time_t& qry_start_time = 0,
1081 const time_t& qry_end_time = 0) override;
1082
1091 virtual Lease6Collection
1092 getLeases6ByRelayId(const DUID& relay_id,
1093 const asiolink::IOAddress& lower_bound_address,
1094 const LeasePageSize& page_size) override;
1095
1104 virtual Lease6Collection
1105 getLeases6ByRemoteId(const OptionBuffer& remote_id,
1106 const asiolink::IOAddress& lower_bound_address,
1107 const LeasePageSize& page_size) override;
1108
1120 virtual size_t upgradeExtendedInfo4(const LeasePageSize& page_size) override;
1121
1133 virtual size_t upgradeExtendedInfo6(const LeasePageSize& page_size) override;
1134
1136 virtual void wipeExtendedInfoTables6() override;
1137
1141 virtual size_t byRelayId6size() const override;
1142
1146 virtual size_t byRemoteId6size() const override;
1147
1149 virtual void writeLeases4(const std::string& /*filename*/) override;
1150
1152 virtual void writeLeases6(const std::string& /*filename*/) override;
1153
1154private:
1156 class PgSqlLeaseContextAlloc {
1157 public:
1158
1165 PgSqlLeaseContextAlloc(const PgSqlLeaseMgr& mgr);
1166
1170 ~PgSqlLeaseContextAlloc();
1171
1174
1175 private:
1176
1178 const PgSqlLeaseMgr& mgr_;
1179 };
1180
1185 class PgSqlLeaseTrackingContextAlloc {
1186 public:
1187
1195 PgSqlLeaseTrackingContextAlloc(PgSqlLeaseMgr& mgr, const LeasePtr& lease);
1196
1200 ~PgSqlLeaseTrackingContextAlloc();
1201
1204
1205 private:
1206
1208 PgSqlLeaseMgr& mgr_;
1209
1211 LeasePtr lease_;
1212 };
1213
1214protected:
1215
1217
1221 virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress& addr) override;
1222
1227 virtual void addRelayId6(const isc::asiolink::IOAddress& lease_addr,
1228 const std::vector<uint8_t>& relay_id) override;
1229
1234 virtual void addRemoteId6(const isc::asiolink::IOAddress& lease_addr,
1235 const std::vector<uint8_t>& remote_id) override;
1236
1237private:
1241 void deleteRelayId6(const isc::asiolink::IOAddress& addr);
1242
1246 void deleteRemoteId6(const isc::asiolink::IOAddress& addr);
1247
1248 // Members
1249
1252
1255
1257 std::string timer_name_;
1258};
1259
1260} // namespace dhcp
1261} // namespace isc
1262
1263#endif // PGSQL_LEASE_MGR_H
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
Common PgSql Connector Pool.
Holds Client identifier or client IPv4 address.
Definition: duid.h:222
Holds DUID (DHCPv6 Unique Identifier)
Definition: duid.h:142
Wraps value holding size of the page with leases.
Definition: lease_mgr.h:46
PostgreSQL Lease Context Pool.
std::vector< PgSqlLeaseContextPtr > pool_
The vector of available contexts.
std::mutex mutex_
The mutex to protect pool access.
PostgreSQL Lease Context.
boost::scoped_ptr< PgSqlLease4Exchange > exchange4_
The exchange objects are used for transfer of data to/from the database.
db::PgSqlConnection conn_
PostgreSQL connection.
boost::scoped_ptr< PgSqlLease6Exchange > exchange6_
Exchange object.
PostgreSQL Lease Manager.
virtual void recountClassLeases6() override
Recount the leases per class for V6 leases.
virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override
Creates and runs the IPv4 lease stats query.
virtual size_t wipeLeases4(const SubnetID &subnet_id) override
Removes specified IPv4 leases.
PgSqlLeaseContextPtr createContext() const
Create a new context.
virtual Lease4Collection getLeases4() const override
Returns all IPv4 leases.
virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override
Creates and runs the IPv6 lease stats query.
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 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 uint64_t deleteExpiredReclaimedLeases4(const uint32_t secs) override
Deletes all expired-reclaimed DHCPv4 leases.
static std::string getDBVersion()
Local version of getDBVersion() class method.
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.
virtual size_t byRemoteId6size() const override
Return the by-remote-id table size.
virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery4(const SubnetID &subnet_id) override
Creates and runs the IPv4 lease stats query for a single subnet.
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 uint64_t deleteExpiredReclaimedLeases6(const uint32_t secs) override
Deletes all expired-reclaimed DHCPv6 leases.
virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress &addr) override
Extended information / Bulk Lease Query shared interface.
virtual void recountClassLeases4() override
Recount the leases per class for V4 leases.
virtual size_t upgradeExtendedInfo4(const LeasePageSize &page_size) override
Upgrade extended info (v4).
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.
virtual void getExpiredLeases4(Lease4Collection &expired_leases, const size_t max_leases) const override
Returns a collection of expired DHCPv4 leases.
virtual void updateLease6(const Lease6Ptr &lease6) override
Updates IPv6 lease.
virtual std::string getDescription() const override
Returns description of the backend.
virtual void wipeExtendedInfoTables6() override
Wipe extended info table (v6).
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 size_t upgradeExtendedInfo6(const LeasePageSize &page_size) override
Upgrade extended info (v6).
virtual std::string getType() const override
Return backend type.
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.
virtual void commit() override
Commit Transactions.
virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID &subnet_id) override
Creates and runs the IPv6 lease stats query for a single subnet.
virtual Lease6Ptr getLease6(Lease::Type type, const isc::asiolink::IOAddress &addr) const override
Returns existing IPv6 lease for a given IPv6 address.
virtual Lease6Collection getLeases6() const override
Returns all IPv6 leases.
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.
StatementIndex
Statement Tags.
virtual void rollback() override
Rollback Transactions.
virtual void updateLease4(const Lease4Ptr &lease4) override
Updates IPv4 lease.
virtual LeaseStatsQueryPtr startPoolLeaseStatsQuery6() override
Creates and runs the IPv6 lease stats query for all subnets and pools.
virtual void writeLeases6(const std::string &) override
Write V6 leases to a 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 void getExpiredLeases6(Lease6Collection &expired_leases, const size_t max_leases) const override
Returns a collection of expired DHCPv6 leases.
virtual std::string getName() const override
Returns backend name.
virtual Lease4Ptr getLease4(const isc::asiolink::IOAddress &addr) const override
Returns an IPv4 lease for specified IPv4 address.
virtual void clearClassLeaseCounts() override
Clears the class-lease count map.
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 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.
static bool dbReconnect(util::ReconnectCtlPtr db_reconnect_ctl)
Attempts to reconnect the server to the lease DB backend manager.
virtual ~PgSqlLeaseMgr()
Destructor (closes database)
virtual bool isJsonSupported() const override
Checks if JSON support is enabled in the database.
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 bool addLease(const Lease4Ptr &lease) override
Adds an IPv4 lease.
virtual void writeLeases4(const std::string &) override
Write V4 leases to a file.
virtual bool deleteLease(const Lease4Ptr &lease) override
Deletes an IPv4 lease.
Introduces callbacks into the LeaseMgr.
An abstract API for lease database.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:29
boost::shared_ptr< IOServiceAccessor > IOServiceAccessorPtr
Pointer to an instance of IOServiceAccessor.
std::function< bool(util::ReconnectCtlPtr db_reconnect_ctl)> DbCallback
Defines a callback prototype for propagating events upward.
std::string ClientClass
Defines a single class name.
Definition: classify.h:42
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
boost::shared_ptr< Lease > LeasePtr
Pointer to the lease object.
Definition: lease.h:25
boost::shared_ptr< PgSqlLeaseContext > PgSqlLeaseContextPtr
Type of pointers to contexts.
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< PgSqlLeaseContextPool > PgSqlLeaseContextPoolPtr
Type of pointers to context pools.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition: lease.h:292
boost::shared_ptr< ReconnectCtl > ReconnectCtlPtr
Pointer to an instance of ReconnectCtl.
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