summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/lease.h
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2014-10-27 19:12:53 +0100
committerTomek Mrugalski <tomasz@isc.org>2014-10-27 19:12:53 +0100
commitcb2fc012c63ebeeb58e6de427e6011dd745d4eac (patch)
treeaf65e78862d37e7dea03975d200e11726a2453c4 /src/lib/dhcpsrv/lease.h
parent[3555] PgSQL update after Lease4->hwaddr_ type changed. (diff)
downloadkea-cb2fc012c63ebeeb58e6de427e6011dd745d4eac.tar.xz
kea-cb2fc012c63ebeeb58e6de427e6011dd745d4eac.zip
[3555] Changes after review:
- Comments updated - getRawHWAddr renamed to getHWAddrVector and moved to Lease class - HWAddr object is now copied in copy ctor and = operator
Diffstat (limited to 'src/lib/dhcpsrv/lease.h')
-rw-r--r--src/lib/dhcpsrv/lease.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/dhcpsrv/lease.h b/src/lib/dhcpsrv/lease.h
index 220e73634b..bea3715277 100644
--- a/src/lib/dhcpsrv/lease.h
+++ b/src/lib/dhcpsrv/lease.h
@@ -156,6 +156,15 @@ struct Lease {
/// lease is equal to the FQDN data of our lease (true) or not (false).
bool hasIdenticalFqdn(const Lease& other) const;
+ /// @brief Returns raw (as vector) hardware address
+ ///
+ /// This method is needed in multi-index container as key extractor.
+ /// The const reference is only valid as long as the object that returned it.
+ /// In the unlikely case when Lease4 does not have a hardware address,
+ /// the function will return an empty vector.
+ ///
+ /// @return const reference to the hardware address
+ const std::vector<uint8_t>& getHWAddrVector() const;
};
/// @brief Structure that holds a lease for IPv4 address
@@ -230,14 +239,6 @@ struct Lease4 : public Lease {
/// or an empty vector if client identifier is NULL.
const std::vector<uint8_t>& getClientIdVector() const;
- /// @brief Returns raw (as vector) hardware address
- ///
- /// This method is needed in multi-index container as key extractor.
- /// The const reference is only valid as long as the object that returned it.
- ///
- /// @return const reference to the hardware address
- const std::vector<uint8_t>& getRawHWAddr() const;
-
/// @brief Check if two objects encapsulate the lease for the same
/// client.
///