The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
bio.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: d900b9cb7471502399f72c0cbe8d3bed1f3f85ad $
20  *
21  * @file protocols/radius/bio.h
22  * @brief RADIUS bio handlers
23  *
24  * @copyright 2024 Network RADIUS SAS (legal@networkradius.com)
25  */
26 RCSIDH(radius_bio_h, "$Id: d900b9cb7471502399f72c0cbe8d3bed1f3f85ad $")
27 
28 #include <freeradius-devel/radius/radius.h>
29 #include <freeradius-devel/bio/fd.h>
30 #include <freeradius-devel/bio/mem.h>
31 #include <freeradius-devel/util/retry.h>
32 
33 typedef struct {
34  uint8_t const *secret;
35  size_t secret_len;
36 
38 
39  bool allowed[FR_RADIUS_CODE_MAX]; //!< allowed outgoing packet types
40 
43 
44 fr_bio_verify_action_t fr_radius_bio_verify(fr_bio_t *bio, UNUSED void *packet_ctx, const void *data, size_t *size);
45 
46 fr_bio_verify_action_t fr_radius_bio_verify_datagram(fr_bio_t *bio, UNUSED void *packet_ctx, const void *data, size_t *size);
47 
Definition: base.h:103
#define RCSIDH(h, id)
Definition: build.h:445
#define UNUSED
Definition: build.h:313
@ FR_RADIUS_CODE_MAX
Maximum possible protocol code.
Definition: defs.h:53
fr_bio_verify_action_t
Status returned by the verification callback.
Definition: mem.h:32
unsigned int uint32_t
Definition: merged_model.c:33
unsigned char uint8_t
Definition: merged_model.c:30
uint32_t max_attributes
Definition: bio.h:37
bool require_message_authenticator
Definition: bio.h:41
fr_bio_verify_action_t fr_radius_bio_verify_datagram(fr_bio_t *bio, UNUSED void *packet_ctx, const void *data, size_t *size)
And verify a datagram packet.
Definition: bio.c:64
uint8_t const * secret
Definition: bio.h:34
size_t secret_len
Definition: bio.h:35
fr_bio_verify_action_t fr_radius_bio_verify(fr_bio_t *bio, UNUSED void *packet_ctx, const void *data, size_t *size)
Callback for RADIUS packet verification.
Definition: bio.c:32
static fr_bio_t * bio
Definition: radclient-ng.c:86
static fr_slen_t data
Definition: value.h:1259