The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
client.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: 6d7579705d5a00b06c4e5137ef4c18409b527934 $
20  *
21  * @file protocols/radius/client.h
22  * @brief RADIUS bio handlers for outgoing RADIUS client sockets
23  *
24  * @copyright 2024 Network RADIUS SAS (legal@networkradius.com)
25  */
26 RCSIDH(radius_client_h, "$Id: 6d7579705d5a00b06c4e5137ef4c18409b527934 $")
27 
28 #include <freeradius-devel/radius/radius.h>
29 #include <freeradius-devel/radius/bio.h>
30 #include <freeradius-devel/bio/packet.h>
31 #include <freeradius-devel/bio/fd.h>
32 #include <freeradius-devel/bio/retry.h>
33 
34 typedef struct {
36 
38 
40 
41  bool outgoing[FR_RADIUS_CODE_MAX]; //!< allowed outgoing packet types
42 
43  fr_retry_config_t retry[FR_RADIUS_CODE_MAX]; //!< default retry configuration for each packet type
45 
46 typedef struct {
47  bool connected;
48 
49  size_t outstanding;
51 
53 
55 
57 
59 
61 
63 
64 int fr_radius_client_bio_force_id(fr_bio_packet_t *bio, int code, int id);
Definition: base.h:103
#define RCSIDH(h, id)
Definition: build.h:445
@ FR_RADIUS_CODE_MAX
Maximum possible protocol code.
Definition: defs.h:53
Configuration for sockets.
Definition: fd.h:76
fr_radius_bio_verify_t verify
Definition: client.h:37
fr_bio_packet_t * fr_radius_client_bio_alloc(TALLOC_CTX *ctx, fr_radius_client_config_t *cfg, fr_bio_fd_config_t const *fd_cfg)
Definition: client.c:37
fr_bio_t * fr_radius_client_bio_get_fd(fr_bio_packet_t *bio)
Definition: client.c:393
int fr_radius_client_fd_bio_cancel(fr_bio_packet_t *bio, fr_packet_t *packet)
Cancel one packet.
Definition: client.c:309
fr_bio_retry_config_t retry_cfg
Definition: client.h:39
int fr_radius_client_bio_force_id(fr_bio_packet_t *bio, int code, int id)
Definition: client.c:415
fr_radius_client_bio_info_t const * fr_radius_client_bio_info(fr_bio_packet_t *bio)
Definition: client.c:407
size_t fr_radius_client_bio_outstanding(fr_bio_packet_t *bio)
Definition: client.c:400
int fr_radius_client_bio_connect(fr_bio_packet_t *bio)
Try to connect a socket.
Definition: client.c:444
static fr_bio_t * bio
Definition: radclient-ng.c:86
Definition: log.h:96
int nonnull(2, 5))