The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
client_priv.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
18/**
19 * $Id: f216f36d57335667083f68ec36cdf67c8ebc4878 $
20 *
21 * @file protocols/radius/client_priv.h
22 * @brief RADIUS bio handlers for outgoing RADIUS private client sockets
23 *
24 * @copyright 2024 Network RADIUS SAS (legal@networkradius.com)
25 */
26RCSIDH(radius_client_priv_h, "$Id: f216f36d57335667083f68ec36cdf67c8ebc4878 $")
27
28#include <freeradius-devel/radius/client.h>
29#include <freeradius-devel/radius/id.h>
30
31/*
32 * Client connected data structure
33 */
34typedef struct {
36
38
40
42
44
48
49 /*
50 * @todo - this blocks on _any_ ID space being full. So if we send auth+acct and auth blocks,
51 * then acct is also blocked. Perhaps we want to track these individually, which means having
52 * the RADIUS client code deal with _multiple_ outgoing BIOs, each of which are equivalent.
53 *
54 * However, that doesn't play well with the design that each BIO has its own FD associated with it,
55 */
56 bool all_ids_used; //!< All IDs are used.
57
59
60 /*
61 * @todo - perhaps we want to have the read() routine allocate memory for the packet? Or the
62 * verify routine can do that?
63 */
64 uint8_t buffer[4096]; //!< temporary read buffer
66
67fr_radius_client_fd_bio_t *fr_radius_client_fd_bio_alloc(TALLOC_CTX *ctx, size_t read_size, fr_radius_client_config_t *cfg, fr_bio_fd_config_t const *fd_cfg) CC_HINT(nonnull);
68
70
71int fr_radius_client_fd_bio_read(fr_bio_packet_t *bio, void **request_ctx_p, fr_packet_t **packet_p, TALLOC_CTX *out_ctx, fr_pair_list_t *out);
static int const char char buffer[256]
Definition acutest.h:576
#define RCSIDH(h, id)
Definition build.h:484
fr_radius_ctx_t proto_ctx
Definition client_priv.h:43
fr_radius_code_id_t codes
Definition client_priv.h:39
bool all_ids_used
All IDs are used.
Definition client_priv.h:56
fr_bio_packet_t common
Definition client_priv.h:35
int fr_radius_client_fd_bio_read(fr_bio_packet_t *bio, void **request_ctx_p, fr_packet_t **packet_p, TALLOC_CTX *out_ctx, fr_pair_list_t *out)
fr_radius_client_config_t cfg
Definition client_priv.h:37
int fr_radius_client_fd_bio_write(fr_radius_client_fd_bio_t *my, void *request_ctx, fr_packet_t *packet, fr_pair_list_t *list)
Definition client.c:187
fr_radius_client_bio_info_t info
Definition client_priv.h:58
fr_radius_client_fd_bio_t * fr_radius_client_fd_bio_alloc(TALLOC_CTX *ctx, size_t read_size, fr_radius_client_config_t *cfg, fr_bio_fd_config_t const *fd_cfg)
Definition client.c:74
Configuration for sockets.
Definition fd.h:81
fr_bio_shutdown & my
Definition fd_errno.h:59
unsigned char uint8_t
fr_radius_id_t * fr_radius_code_id_t[FR_RADIUS_CODE_MAX]
Definition id.h:32
#define request_ctx
Talloc ctx for allocating request pairs under.
Definition request.h:94
Holds information necessary for binding or connecting to a socket.
Definition socket.h:63
int nonnull(2, 5))
static size_t char ** out
Definition value.h:997