Kea 3.1.1
radius_utils.h
Go to the documentation of this file.
1// Copyright (C) 2018-2025 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef RADIUS_UTILS_H
8#define RADIUS_UTILS_H
9
10#include <dhcp/duid.h>
11
12namespace isc {
13namespace radius {
14
22std::string canonize(const std::string& hexdump);
23
31std::vector<uint8_t> pop0(const dhcp::ClientIdPtr& client_id);
32
38std::vector<uint8_t> pop0(const dhcp::DuidPtr& duid);
39
44std::string toPrintable(const std::vector<uint8_t>& content);
45
50std::string toHex(const std::vector<uint8_t>& content);
51
58std::vector<uint8_t> extractDuid(const dhcp::ClientIdPtr& client_id,
59 bool& extracted);
60
61} // end of namespace isc::radius
62} // end of namespace isc
63
64#endif
boost::shared_ptr< DUID > DuidPtr
Definition duid.h:136
boost::shared_ptr< ClientId > ClientIdPtr
Shared pointer to a Client ID.
Definition duid.h:216
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.
Defines the logger used by the top-level component of kea-lfc.