diff options
author | Francis Dupont <fdupont@isc.org> | 2019-12-10 19:37:22 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2019-12-10 21:05:02 +0100 |
commit | b1fb6811ffe149c375a4503d2d64604acae72f83 (patch) | |
tree | 85b6502239e352eb6c0d73ef12b03519029ceb73 /src/lib/dhcpsrv/lease.h | |
parent | [897-add-infinite-valid-lifetime-for-bootp] Added comments about T1/T2 vs inf... (diff) | |
download | kea-b1fb6811ffe149c375a4503d2d64604acae72f83.tar.xz kea-b1fb6811ffe149c375a4503d2d64604acae72f83.zip |
[#897] Addressed comments
Diffstat (limited to 'src/lib/dhcpsrv/lease.h')
-rw-r--r-- | src/lib/dhcpsrv/lease.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/lease.h b/src/lib/dhcpsrv/lease.h index 4c82d0a5b9..7354e2fa69 100644 --- a/src/lib/dhcpsrv/lease.h +++ b/src/lib/dhcpsrv/lease.h @@ -37,6 +37,15 @@ struct Lease : public isc::data::UserContext, public isc::data::CfgToElement { /// @brief Infinity (means static, i.e. never expire) static const uint32_t INFINITY_LFT = 0xffffffff; + /// @brief Print lifetime + /// + /// This converts a lifetime to a string taking into account the + /// infinity special value. + /// + /// @param lifetime lifetime to print + /// @return a string representing the finite value or "infinity" + static std::string lifetimeToText(uint32_t lifetime); + /// @brief Type of lease or pool typedef enum { TYPE_NA = 0, ///< the lease contains non-temporary IPv6 address |