The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
rlm_radius.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17#include <freeradius-devel/io/atomic_queue.h>
18#include <freeradius-devel/server/base.h>
19#include <freeradius-devel/server/map.h>
20#include <freeradius-devel/server/module_rlm.h>
21#include <freeradius-devel/server/trunk.h>
22#include <freeradius-devel/util/dlist.h>
23#include <freeradius-devel/util/retry.h>
24#include <freeradius-devel/unlang/module.h>
25#include <freeradius-devel/radius/radius.h>
26#include <freeradius-devel/radius/bio.h>
27
28#include <freeradius-devel/bio/fd.h>
29
30/*
31 * $Id: 8d6a2f9195f19ac2d64b48cd522e7b0e47c57e1e $
32 *
33 * @file rlm_radius.h
34 * @brief Structures for the RADIUS client packets
35 *
36 * @copyright 2017 Alan DeKok (aland@freeradius.org)
37 */
38
40
49
50/*
51 * Define a structure for our module configuration.
52 */
54 fr_bio_fd_config_t fd_config; //!< for now MUST be at the start!
55
56 char const *name;
57
61
62 char const *secret; //!< Shared secret.
63
64 uint32_t max_packet_size; //!< Maximum packet size.
65 uint16_t max_send_coalesce; //!< Maximum number of packets to coalesce into one mmsg call.
66
68
69 bool replicate; //!< Ignore responses.
70 bool synchronous; //!< Retransmit when receiving a duplicate request.
71 bool originate; //!< Originating packets, instead of proxying existing ones.
72 ///< Controls whether Proxy-State is added to the outbound
73 ///< request
74 rlm_radius_mode_t mode; //!< proxy, client, etc.
75
76 uint32_t max_attributes; //!< Maximum number of attributes to decode in response.
77
78 fr_radius_require_ma_t require_message_authenticator; //!< Require Message-Authenticator in responses.
79 bool *received_message_authenticator; //!< Received Message-Authenticator in responses.
80
81 uint32_t *types; //!< array of allowed packet types
82 uint32_t status_check; //!< code of status-check type
83 map_list_t status_check_map; //!< attributes for the status-server checks
84 uint32_t num_answers_to_alive; //!< How many status check responses we need to
85 ///< mark the connection as alive.
86
88
91
92 trunk_conf_t trunk_conf; //!< trunk configuration
93};
@ FR_RADIUS_CODE_MAX
Maximum possible protocol code.
Definition defs.h:53
Configuration for sockets.
Definition fd.h:81
unsigned short uint16_t
unsigned int uint32_t
fr_radius_require_ma_t
Control whether Message-Authenticator is required in Access-Requests.
Definition radius.h:62
fr_radius_require_ma_t require_message_authenticator
Require Message-Authenticator in responses.
Definition rlm_radius.h:78
bool replicate
Ignore responses.
Definition rlm_radius.h:69
uint32_t num_answers_to_alive
How many status check responses we need to mark the connection as alive.
Definition rlm_radius.h:84
map_list_t status_check_map
attributes for the status-server checks
Definition rlm_radius.h:83
uint16_t max_send_coalesce
Maximum number of packets to coalesce into one mmsg call.
Definition rlm_radius.h:65
fr_time_delta_t revive_interval
Definition rlm_radius.h:60
fr_retry_config_t retry[FR_RADIUS_CODE_MAX]
Definition rlm_radius.h:90
char const * name
Definition rlm_radius.h:56
bool originate
Originating packets, instead of proxying existing ones.
Definition rlm_radius.h:71
uint32_t status_check
code of status-check type
Definition rlm_radius.h:82
rlm_radius_mode_t mode
proxy, client, etc.
Definition rlm_radius.h:74
bool * received_message_authenticator
Received Message-Authenticator in responses.
Definition rlm_radius.h:79
rlm_radius_mode_t
Definition rlm_radius.h:41
@ RLM_RADIUS_MODE_XLAT_PROXY
Definition rlm_radius.h:47
@ RLM_RADIUS_MODE_INVALID
Definition rlm_radius.h:42
@ RLM_RADIUS_MODE_PROXY
Definition rlm_radius.h:43
@ RLM_RADIUS_MODE_REPLICATE
Definition rlm_radius.h:45
@ RLM_RADIUS_MODE_UNCONNECTED_REPLICATE
Definition rlm_radius.h:46
@ RLM_RADIUS_MODE_CLIENT
Definition rlm_radius.h:44
uint32_t max_packet_size
Maximum packet size.
Definition rlm_radius.h:64
fr_retry_config_t timeout_retry
Definition rlm_radius.h:89
uint32_t * types
array of allowed packet types
Definition rlm_radius.h:81
char const * secret
Shared secret.
Definition rlm_radius.h:62
fr_time_delta_t response_window
Definition rlm_radius.h:58
uint32_t max_attributes
Maximum number of attributes to decode in response.
Definition rlm_radius.h:76
bool allowed[FR_RADIUS_CODE_MAX]
Definition rlm_radius.h:87
trunk_conf_t trunk_conf
trunk configuration
Definition rlm_radius.h:92
fr_time_delta_t zombie_period
Definition rlm_radius.h:59
fr_bio_fd_config_t fd_config
for now MUST be at the start!
Definition rlm_radius.h:54
bool synchronous
Retransmit when receiving a duplicate request.
Definition rlm_radius.h:70
fr_radius_ctx_t common_ctx
Definition rlm_radius.h:67
A time delta, a difference in time measured in nanoseconds.
Definition time.h:80
Common configuration parameters for a trunk.
Definition trunk.h:224