}
-Lease4Collection
-LeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
- const IOAddress& /* lower_bound_address */,
- const LeasePageSize& /* page_size */,
- const time_t& /* qry_start_time = 0 */,
- const time_t& /* qry_end_time = 0 */) {
- isc_throw(NotImplemented, "LeaseMgr::getLeases4ByRelayId not implemented");
-}
-
-Lease4Collection
-LeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
- const IOAddress& /* lower_bound_address */,
- const LeasePageSize& /* page_size */,
- const time_t& /* qry_start_time = 0 */,
- const time_t& /* qry_end_time = 0 */) {
- isc_throw(NotImplemented, "LeaseMgr::getLeases4ByRemoteId not implemented");
-}
-
-Lease6Collection
-LeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
- const IOAddress& /* link_addr */,
- const IOAddress& /* lower_bound_address */,
- const LeasePageSize& /* page_size */) {
- isc_throw(NotImplemented, "LeaseMgr::getLeases6ByRelayId not implemented");
-}
-
-Lease6Collection
-LeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
- const IOAddress& /* link_addr */,
- const IOAddress& /* lower_bound_address */,
- const LeasePageSize& /* page_size*/) {
- isc_throw(NotImplemented, "LeaseMgr::getLeases6ByRemoteId not implemented");
-}
-
-Lease6Collection
-LeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
- const IOAddress& /* lower_bound_address */,
- const LeasePageSize& /* page_size */) {
- isc_throw(NotImplemented, "LeaseMgr::getLeases6ByLink not implemented");
-}
-
} // namespace isc::dhcp
} // namespace isc
const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size,
const time_t& qry_start_time = 0,
- const time_t& qry_end_time = 0);
+ const time_t& qry_end_time = 0) = 0;
/// @brief Returns existing IPv4 leases with a given 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);
+ const time_t& qry_end_time = 0) = 0;
/// @brief Returns existing IPv6 leases with a given relay-id.
///
virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
const asiolink::IOAddress& link_addr,
const asiolink::IOAddress& lower_bound_address,
- const LeasePageSize& page_size);
+ const LeasePageSize& page_size) = 0;
/// @brief Returns existing IPv6 leases with a given remote-id.
///
virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
const asiolink::IOAddress& link_addr,
const asiolink::IOAddress& lower_bound_address,
- const LeasePageSize& page_size);
+ const LeasePageSize& page_size) = 0;
/// @brief Returns existing IPv6 leases with on a given link.
///
/// @return collection of IPv6 leases
virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
const asiolink::IOAddress& lower_bound_address,
- const LeasePageSize& page_size);
+ const LeasePageSize& page_size) = 0;
private:
/// The IOService object, used for all ASIO operations.
return (false);
}
+Lease4Collection
+Memfile_LeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */,
+ const time_t& /* qry_start_time = 0 */,
+ const time_t& /* qry_end_time = 0 */) {
+ isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases4ByRelayId not implemented");
+}
+Lease4Collection
+Memfile_LeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */,
+ const time_t& /* qry_start_time = 0 */,
+ const time_t& /* qry_end_time = 0 */) {
+ isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases4ByRemoteId not implemented");
+}
+
+Lease6Collection
+Memfile_LeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
+ const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */) {
+ isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases6ByRelayId not implemented");
+}
+
+Lease6Collection
+Memfile_LeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
+ const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size*/) {
+ isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases6ByRemoteId not implemented");
+}
+
+Lease6Collection
+Memfile_LeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */) {
+ isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases6ByLink not implemented");
+}
} // namespace dhcp
} // namespace isc
///
/// Must be called from a thread-safe context.
virtual void clearClassLeaseCounts() override;
+
+ /// The following queries are used to fulfill Bulk LeaseQuery queries. They rely
+ /// on relay data contained in lease's user-context when the extended-store-info flag
+ /// is enabled.
+
+ /// @brief Returns existing IPv4 leases with a given relay-id.
+ ///
+ /// @param relay_id RAI Relay-ID sub-option value for relay_id of interest
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+ /// or equal to this value will be included
+ /// @param qry_end_time when not zero, only leases whose CLTT is less than
+ /// or equal to this value will be included
+ ///
+ /// @return collection of IPv4 leases
+ 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);
+
+ /// @brief Returns existing IPv4 leases with a given remote-id.
+ ///
+ /// @param remote_id RAI Remote-ID sub-option value for remote-id of interest
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+ /// or equal to this value will be included. Defaults to zero.
+ /// @param qry_end_time when not zero, only leases whose CLTT is less than
+ /// or equal to this value will be included. Defaults to zero.
+ ///
+ /// @return collection of IPv4 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);
+
+ /// @brief Returns existing IPv6 leases with a given relay-id.
+ ///
+ /// @param relay_id DUID for relay_id of interest
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
+ const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
+ /// @brief Returns existing IPv6 leases with a given remote-id.
+ ///
+ /// @param remote_id remote-id option data of interest
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
+ const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
+ /// @brief Returns existing IPv6 leases with on a given link.
+ ///
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
};
} // namespace dhcp
ctx->conn_.checkError(status, index, what);
}
+Lease4Collection
+MySqlLeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */,
+ const time_t& /* qry_start_time = 0 */,
+ const time_t& /* qry_end_time = 0 */) {
+ isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases4ByRelayId not implemented");
+}
+
+Lease4Collection
+MySqlLeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */,
+ const time_t& /* qry_start_time = 0 */,
+ const time_t& /* qry_end_time = 0 */) {
+ isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases4ByRemoteId not implemented");
+}
+
+Lease6Collection
+MySqlLeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
+ const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */) {
+ isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByRelayId not implemented");
+}
+
+Lease6Collection
+MySqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
+ const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size*/) {
+ isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByRemoteId not implemented");
+}
+
+Lease6Collection
+MySqlLeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */) {
+ isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByLink not implemented");
+}
+
} // namespace dhcp
} // namespace isc
int status, StatementIndex index,
const char* what) const;
+ /// The following queries are used to fulfill Bulk LeaseQuery queries. They rely
+ /// on relay data contained in lease's user-context when the extended-store-info flag
+ /// is enabled.
+
+ /// @brief Returns existing IPv4 leases with a given relay-id.
+ ///
+ /// @param relay_id RAI Relay-ID sub-option value for relay_id of interest
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+ /// or equal to this value will be included
+ /// @param qry_end_time when not zero, only leases whose CLTT is less than
+ /// or equal to this value will be included
+ ///
+ /// @return collection of IPv4 leases
+ 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);
+
+ /// @brief Returns existing IPv4 leases with a given remote-id.
+ ///
+ /// @param remote_id RAI Remote-ID sub-option value for remote-id of interest
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+ /// or equal to this value will be included. Defaults to zero.
+ /// @param qry_end_time when not zero, only leases whose CLTT is less than
+ /// or equal to this value will be included. Defaults to zero.
+ ///
+ /// @return collection of IPv4 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);
+
+ /// @brief Returns existing IPv6 leases with a given relay-id.
+ ///
+ /// @param relay_id DUID for relay_id of interest
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
+ const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
+ /// @brief Returns existing IPv6 leases with a given remote-id.
+ ///
+ /// @param remote_id remote-id option data of interest
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
+ const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
+ /// @brief Returns existing IPv6 leases with on a given link.
+ ///
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
/// @brief Context RAII Allocator.
class MySqlLeaseContextAlloc {
public:
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_PGSQL_ROLLBACK);
}
+Lease4Collection
+PgSqlLeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */,
+ const time_t& /* qry_start_time = 0 */,
+ const time_t& /* qry_end_time = 0 */) {
+ isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases4ByRelayId not implemented");
+}
+
+Lease4Collection
+PgSqlLeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */,
+ const time_t& /* qry_start_time = 0 */,
+ const time_t& /* qry_end_time = 0 */) {
+ isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases4ByRemoteId not implemented");
+}
+
+Lease6Collection
+PgSqlLeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
+ const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */) {
+ isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByRelayId not implemented");
+}
+
+Lease6Collection
+PgSqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
+ const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size*/) {
+ isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByRemoteId not implemented");
+}
+
+Lease6Collection
+PgSqlLeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
+ const IOAddress& /* lower_bound_address */,
+ const LeasePageSize& /* page_size */) {
+ isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByLink not implemented");
+}
+
} // namespace dhcp
} // namespace isc
/// @brief Clears the class-lease count map.
virtual void clearClassLeaseCounts() override;
+ /// The following queries are used to fulfill Bulk LeaseQuery queries. They rely
+ /// on relay data contained in lease's user-context when the extended-store-info flag
+ /// is enabled.
+
+ /// @brief Returns existing IPv4 leases with a given relay-id.
+ ///
+ /// @param relay_id RAI Relay-ID sub-option value for relay_id of interest
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+ /// or equal to this value will be included
+ /// @param qry_end_time when not zero, only leases whose CLTT is less than
+ /// or equal to this value will be included
+ ///
+ /// @return collection of IPv4 leases
+ 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);
+
+ /// @brief Returns existing IPv4 leases with a given remote-id.
+ ///
+ /// @param remote_id RAI Remote-ID sub-option value for remote-id of interest
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+ /// or equal to this value will be included. Defaults to zero.
+ /// @param qry_end_time when not zero, only leases whose CLTT is less than
+ /// or equal to this value will be included. Defaults to zero.
+ ///
+ /// @return collection of IPv4 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);
+
+ /// @brief Returns existing IPv6 leases with a given relay-id.
+ ///
+ /// @param relay_id DUID for relay_id of interest
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
+ const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
+ /// @brief Returns existing IPv6 leases with a given remote-id.
+ ///
+ /// @param remote_id remote-id option data of interest
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
+ const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
+ /// @brief Returns existing IPv6 leases with on a given link.
+ ///
+ /// @param link_addr limit results to leases on this link when not ::
+ /// @param lower_bound_address IPv4 address used as lower bound for the
+ /// returned range.
+ /// @param page_size maximum size of the page returned.
+ ///
+ /// @return collection of IPv6 leases
+ virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
+ const asiolink::IOAddress& lower_bound_address,
+ const LeasePageSize& page_size);
+
/// @brief Context RAII Allocator.
class PgSqlLeaseContextAlloc {
public: