11#include <boost/shared_ptr.hpp>
48 DUID(
const std::vector<uint8_t>& duid);
51 DUID(
const uint8_t* duid,
size_t len);
61 const std::vector<uint8_t>&
getDuid()
const;
88 std::string
toText()
const;
131 ClientId(
const std::vector<uint8_t>& clientid);
134 ClientId(
const uint8_t* clientid,
size_t len);
147 std::string
toText()
const;
Holds Client identifier or client IPv4 address.
static const size_t MAX_CLIENT_ID_LEN
Maximum size of a client ID.
const std::vector< uint8_t > & getClientId() const
Returns reference to the client-id data.
bool operator==(const ClientId &other) const
Compares two client-ids for equality.
static ClientIdPtr fromText(const std::string &text)
Create client identifier from the textual format.
bool operator!=(const ClientId &other) const
Compares two client-ids for inequality.
std::string toText() const
Returns textual representation of a DUID (e.g. 00:01:02:03:ff)
ClientId(const std::vector< uint8_t > &clientid)
Constructor based on vector<uint8_t>
static const size_t MIN_CLIENT_ID_LEN
Minimum size of a client ID.
Holds DUID (DHCPv6 Unique Identifier)
bool operator!=(const DUID &other) const
Compares two DUIDs for inequality.
static const size_t MIN_DUID_LEN
minimum duid size The minimal DUID size specified in RFC 8415 is 1.
bool operator==(const DUID &other) const
Compares two DUIDs for equality.
std::string toText() const
Returns textual representation of a DUID (e.g. 00:01:02:03:ff)
static DUID fromText(const std::string &text)
Create DUID from the textual format.
DUID(const std::vector< uint8_t > &duid)
Constructor from vector.
static const DUID & EMPTY()
Defines the constant "empty" DUID.
static const size_t MAX_DUID_LEN
maximum duid size As defined in RFC 8415, section 11.1
std::vector< uint8_t > duid_
The actual content of the DUID.
DUIDType
specifies DUID type
@ DUID_LL
link-layer, see RFC3315, section 11.4
@ DUID_LLT
link-layer + time, see RFC3315, section 11.2
@ DUID_MAX
not a real type, just maximum defined value + 1
@ DUID_UNKNOWN
invalid/unknown type
@ DUID_EN
enterprise-id, see RFC3315, section 11.3
@ DUID_UUID
UUID, see RFC3315, section 11.5.
const std::vector< uint8_t > & getDuid() const
Returns a const reference to the actual DUID value.
DUIDType getType() const
Returns the DUID type.
boost::shared_ptr< DUID > DuidPtr
boost::shared_ptr< ClientId > ClientIdPtr
Shared pointer to a Client ID.
Defines the logger used by the top-level component of kea-lfc.