2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[5651] Implemented fetching IPv6 leases with paging.

This commit is contained in:
Marcin Siodelski
2018-06-26 10:27:07 +02:00
parent 122bb75a7a
commit 99da64ffd5
17 changed files with 491 additions and 5 deletions

View File

@@ -325,6 +325,34 @@ public:
/// @return Lease collection (may be empty if no IPv6 lease found).
virtual Lease6Collection getLeases6() const;
/// @brief Returns range of IPv6 leases using paging.
///
/// This method implements paged browsing of the lease database. The first
/// parameter specifies a page size. The second parameter is optional and
/// specifies the starting address of the range. This address is excluded
/// from the returned range. The IPv6 zero address (default) denotes that
/// the first page should be returned. There is no guarantee about the
/// order of returned leases.
///
/// The typical usage of this method is as follows:
/// - Get the first page of leases by specifying IPv6 zero address as the
/// beginning of the range.
/// - Last address of the returned range should be used as a starting
/// address for the next page in the subsequent call.
/// - If the number of leases returned is lower than the page size, it
/// indicates that the last page has been retrieved.
/// - If there are no leases returned it indicates that the previous page
/// was the last page.
///
/// @param lower_bound_address IPv4 address used as lower bound for the
/// returned range.
/// @param page_size maximum size of the page returned.
///
/// @return Lease collection (may be empty if no IPv6 lease found).
virtual Lease6Collection
getLeases6(const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size) const;
/// @brief Returns a collection of expired DHCPv4 leases.
///
/// This method returns at most @c max_leases expired leases. The leases
@@ -559,14 +587,16 @@ public:
GET_LEASE4_CLIENTID_SUBID, // Get lease4 by client ID & subnet ID
GET_LEASE4_HWADDR, // Get lease4 by HW address
GET_LEASE4_HWADDR_SUBID, // Get lease4 by HW address & subnet ID
GET_LEASE4_SUBID, // Get IPv4 leases by subnet ID
GET_LEASE4_PAGE, // Get page of leases beginning with an address
GET_LEASE4_RANGE, // Get range of leases between addresses
GET_LEASE4_SUBID, // Get IPv4 leases by subnet ID
GET_LEASE4_EXPIRE, // Get lease4 by expiration.
GET_LEASE6, // Get all IPv6 leases
GET_LEASE6_ADDR, // Get lease6 by address
GET_LEASE6_DUID_IAID, // Get lease6 by DUID and IAID
GET_LEASE6_DUID_IAID_SUBID, // Get lease6 by DUID, IAID and subnet ID
GET_LEASE6_PAGE, // Get page of leases beginning with an address
GET_LEASE6_RANGE, // Get range of leases between addresses
GET_LEASE6_SUBID, // Get IPv6 leases by subnet ID
GET_LEASE6_EXPIRE, // Get lease6 by expiration.
INSERT_LEASE4, // Add entry to lease4 table