Kea: radius_utils.h Source File

| Kea 3.2.0-git

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
duid.h
isc::dhcp::DuidPtr
boost::shared_ptr< DUID > DuidPtr
Definition duid.h:136
isc::dhcp::ClientIdPtr
boost::shared_ptr< ClientId > ClientIdPtr
Shared pointer to a Client ID.
Definition duid.h:216
isc::radius
Definition cfg_attribute.cc:21
isc::radius::extractDuid
vector< uint8_t > extractDuid(const ClientIdPtr &client_id, bool &extracted)
Extract the duid from a RFC 4361 compliant DHCPv4 client ID.
Definition radius_utils.cc:98
isc::radius::canonize
string canonize(const string &hexdump)
Canonize hardware address textual representation.
Definition radius_utils.cc:25
isc::radius::toPrintable
string toPrintable(const vector< uint8_t > &content)
Return printable textual representation of a vector.
Definition radius_utils.cc:68
isc::radius::toHex
string toHex(const vector< uint8_t > &content)
Return hexadecimal textual representation of a vector.
Definition radius_utils.cc:83
isc::radius::pop0
vector< uint8_t > pop0(const ClientIdPtr &client_id)
Pop leading zero in a DHCPv4 client-id.
Definition radius_utils.cc:50
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18