27 string result(hexdump);
28 for (
char& c : result) {
52 vector<uint8_t> content = client_id->getClientId();
53 if ((content.size() > 1) && (content[0] == 0)) {
54 content.erase(content.begin());
61 vector<uint8_t> content = duid->getDuid();
62 if ((content[0] == 0) && (content[1] == 0)) {
63 content.erase(content.begin(), content.begin() + 2);
70 if (content.empty()) {
75 repr.resize(content.size());
76 memmove(&repr[0], &content[0], repr.size());
85 vector<uint8_t> content = client_id->getClientId();
87 if ((content.size() > 5) && (content[0] == CLIENT_ID_OPTION_TYPE_DUID)) {
89 content.erase(content.begin(), content.begin() + 5);
boost::shared_ptr< DUID > DuidPtr
boost::shared_ptr< ClientId > ClientIdPtr
Shared pointer to a Client ID.
vector< uint8_t > extractDuid(const ClientIdPtr &client_id, bool &extracted)
Extract the duid from a RFC 4361 compliant DHCPv4 client ID.
string canonize(const string &hexdump)
Canonize hardware address textual representation.
string toPrintable(const vector< uint8_t > &content)
Return printable textual representation of a vector.
vector< uint8_t > pop0(const ClientIdPtr &client_id)
Pop leading zero in a DHCPv4 client-id.
string dumpAsHex(const uint8_t *data, size_t length)
Dumps a buffer of bytes as a string of hexadecimal digits.
bool isPrintable(const string &content)
Check if a string is printable.
Defines the logger used by the top-level component of kea-lfc.