27 RCSIDH(clients_h,
"$Id: 19753d8f945f4694b29f94a74be9f919e5bd0333 $")
33 #include <freeradius-devel/server/cf_util.h>
70 #include <freeradius-devel/util/time.h>
71 #include <freeradius-devel/server/request.h>
72 #include <freeradius-devel/server/socket.h>
73 #include <freeradius-devel/server/stats.h>
74 #include <freeradius-devel/util/inet.h>
75 #include <freeradius-devel/radius/radius.h>
Configuration AVP similar to a fr_pair_t.
A section grouping multiple CONF_PAIR.
fr_time_delta_t response_window
How long the client has to respond.
char const * server
Name of the virtual server client is associated with.
fr_client_t * client_find(fr_client_list_t const *clients, fr_ipaddr_t const *ipaddr, int proto)
fr_ipaddr_t ipaddr
IPv4/IPv6 address of the host.
fr_client_t * client_findbynumber(fr_client_list_t const *clients, int number)
bool received_message_authenticator
Whether we've seen a message authenticator from this client in any previous packets.
fr_client_list_t * client_list_init(CONF_SECTION *cs)
Return a new client list.
fr_stats_t acct
Accounting stats.
int client_map_section(CONF_SECTION *out, CONF_SECTION const *map, client_value_cb_t func, void *data)
Create a client CONF_SECTION using a mapping section to map values from a result set to client attrib...
fr_radius_require_ma_t require_message_authenticator
Require RADIUS message authenticator for incoming packets.
void client_free(fr_client_t *client)
Free a client.
char const * secret
Secret PSK.
fr_client_t * client_read(char const *filename, CONF_SECTION *server_cs, bool check_dns)
Read a single client from a file.
bool active
for dynamic clients
fr_ipaddr_t src_ipaddr
IPv4/IPv6 address to send responses from (family must match ipaddr).
int(* client_value_cb_t)(char **out, CONF_PAIR const *cp, void *data)
Callback for retrieving values when building client sections.
bool require_message_authenticator_is_set
Whether require_message_authenticator is set in the configuration.
fr_stats_t auth
Authentication stats.
char const * nas_type
Type of client (arbitrary).
int proto
Protocol number.
bool seen_first_packet
Whether we've seen a packet from this client.
bool limit_proxy_state_is_set
Whether limit_proxy_state is set in the configuration.
fr_client_t * client_from_request(request_t *request)
Search up a list of requests trying to locate one which has a client.
CONF_SECTION * cs
CONF_SECTION that was parsed to generate the client.
bool dynamic
Whether the client was dynamically defined.
char const * longname
Client identifier.
fr_rb_node_t node
Entry in the client tree.
void client_list_free(void)
bool first_packet_no_proxy_state
Whether that first packet contained a Proxy-State attribute.
fr_socket_limit_t limit
Connections per client (TCP clients only).
char const * shortname
Client nickname.
fr_client_t * client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, CONF_SECTION *server_cs, size_t extra)
Allocate a new client from a config section.
bool use_connected
do we use connected sockets for this client
void client_delete(fr_client_list_t *clients, fr_client_t *client)
bool client_add(fr_client_list_t *clients, fr_client_t *client)
Add a client to a fr_client_list_t.
bool dedup_authenticator
more RADIUS stuff
fr_client_list_t * client_list_parse_section(CONF_SECTION *section, int proto, bool tls_required)
int number
Unique client number.
CONF_SECTION * server_cs
Virtual server that the client is associated with.
fr_radius_limit_proxy_state_t limit_proxy_state
Whether to allow Proxy-State in incoming packets that don't contain a message authenticator.
fr_client_t * client_afrom_request(TALLOC_CTX *ctx, request_t *request)
Create a new client, consuming all attributes in the control list of the request.
Describes a host allowed to send packets to the server.
fr_radius_require_ma_t
Control whether Message-Authenticator is required in Access-Requests.
fr_radius_limit_proxy_state_t
Control whether Proxy-State is allowed in Access-Requests.
static char const * proto(int id, int porttype)
A time delta, a difference in time measured in nanoseconds.
static size_t char ** out