26    string result(hexdump);
 
   27    for (
char& c : result) {
 
 
   51    vector<uint8_t> content = client_id->getClientId();
 
   52    if ((content.size() > 1) && (content[0] == 0)) {
 
   53        content.erase(content.begin());
 
 
   60    vector<uint8_t> content = duid->getDuid();
 
   61    if ((content[0] == 0) && (content[1] == 0)) {
 
   62        content.erase(content.begin(), content.begin() + 2);
 
 
   69    if (content.empty()) {
 
   74        repr.resize(content.size());
 
   75        memmove(&repr[0], &content[0], repr.size());
 
   78        return (
toHex(content));
 
 
   83toHex(
const vector<uint8_t>& content) {
 
   87    for (
const unsigned char& ch : content) {
 
   91        repr << setw(2) << setfill('0') << static_cast<unsigned>(ch);
 
 
   99    vector<uint8_t> content = client_id->getClientId();
 
  101    if ((content.size() > 5) && (content[0] == CLIENT_ID_OPTION_TYPE_DUID)) {
 
  103        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.
string toHex(const vector< uint8_t > &content)
Return hexadecimal textual representation of a vector.
vector< uint8_t > pop0(const ClientIdPtr &client_id)
Pop leading zero in a DHCPv4 client-id.
bool isPrintable(const string &content)
Check if a string is printable.
Defines the logger used by the top-level component of kea-lfc.