Kea 3.1.1
radius_service.cc
Go to the documentation of this file.
1// Copyright (C) 2023-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#include <config.h>
8
9#include <radius_service.h>
10
11using namespace std;
12using namespace isc;
13using namespace isc::data;
14
15namespace isc {
16namespace radius {
17
18RadiusService::RadiusService(const std::string& name)
19 : name_(name), enabled_(false), peer_updates_(true),
21}
22
26
27 // servers.
28 if (!servers_.empty()) {
30 for (auto const& server : servers_) {
31 if (server) {
32 servers->add(server->toElement());
33 }
34 }
35 result->set("servers", servers);
36 }
37
38 // attributes.
39 result->set("attributes", attributes_.toElement());
40
41 return (result);
42}
43
44} // end of namespace isc::radius
45} // end of namespace isc
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
Definition data.cc:304
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
Definition data.cc:299
bool peer_updates_
Peer updates flag.
CfgAttributes attributes_
Attribute configurations.
RadiusService(const std::string &name)
Constructor.
data::ElementPtr toElement() const override
Unparse service configuration.
size_t max_pending_requests_
Maximum number of pending requests.
Servers servers_
Server list.
std::string name_
Name (access or accounting).
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
Defines the logger used by the top-level component of kea-lfc.