From: Tomek Mrugalski Date: Wed, 10 Oct 2012 17:27:28 +0000 (+0200) Subject: [2140] Renew, rebind timers added to lease4, recycle-timer removed X-Git-Tag: trac2402_base~17^2~11^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56dd56426342f9fa3d63c436f35ba86208512ee0;p=thirdparty%2Fkea.git [2140] Renew, rebind timers added to lease4, recycle-timer removed --- diff --git a/src/lib/dhcp/lease_mgr.h b/src/lib/dhcp/lease_mgr.h index a6b4c6185c..7dd69d4413 100644 --- a/src/lib/dhcp/lease_mgr.h +++ b/src/lib/dhcp/lease_mgr.h @@ -53,19 +53,29 @@ struct Lease4 { /// @brief client identifier boost::shared_ptr client_id_; + /// @brief renewal timer + /// + /// Specifies renewal time. Although technically it is a property of IA container, + /// not the address itself, since our data model does not define separate IA + /// entity, we are keeping it in the lease. In case of multiple addresses/prefixes + /// for the same IA, each must have consistent T1 and T2 values. Specified in + /// seconds since cltt. + uint32_t t1_; + + /// @brief rebinding timer + /// + /// Specifies rebinding time. Although technically it is a property of IA container, + /// not the address itself, since our data model does not define separate IA + /// entity, we are keeping it in the lease. In case of multiple addresses/prefixes + /// for the same IA, each must have consistent T1 and T2 values. Specified in + /// seconds since cltt. + uint32_t t2_; + /// @brief valid lifetime /// /// Expressed as number of seconds since cltt uint32_t valid_lft_; - /// @brief Recycle timer - /// - /// Typically, the lease return to free pool immediately after it is released - /// or expired. This timer specifies number of seconds that it should be kept - /// after release or expiration, in case the client returns. This feature is not - /// currently used and this value is set to 0. - uint32_t recycle_time_; - /// @brief client last transmission time /// /// Specifies a timestamp, when last transmission from a client was received. @@ -103,6 +113,8 @@ struct Lease4 { /// Currently not used. It may be used for keeping comments made by the /// system administrator. std::string comments_; + + /// @todo: Add DHCPv4 failover related fields here }; /// @brief Pointer to a Lease4 structure. @@ -182,14 +194,6 @@ struct Lease6 { /// seconds since cltt. uint32_t t2_; - /// @brief Recycle timer - /// - /// Typically, the lease return to free pool immediately after it is released - /// or expired. This timer specifies number of seconds that it should be kept - /// after release or expiration, in case the client returns. This feature is not - /// currently used and this value is set to 0. - uint32_t recycle_time_; - /// @brief client last transmission time /// /// Specifies a timestamp, when last transmission from a client was received. @@ -227,6 +231,8 @@ struct Lease6 { /// /// This field is currently not used. std::string comments_; + + /// @todo: Add DHCPv6 failover related fields here }; /// @brief Pointer to a Lease6 structure.