The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
client.c File Reference

Functions to support RADIUS bio handlers for client sockets. More...

#include <freeradius-devel/radius/client.h>
#include <freeradius-devel/radius/client_udp.h>
#include <freeradius-devel/radius/client_tcp.h>
#include <freeradius-devel/radius/client_priv.h>
+ Include dependency graph for client.c:

Go to the source code of this file.

Functions

static int _radius_client_fd_bio_free (fr_radius_client_fd_bio_t *my)
 
fr_bio_packet_tfr_radius_client_bio_alloc (TALLOC_CTX *ctx, fr_radius_client_config_t *cfg, fr_bio_fd_config_t const *fd_cfg)
 
int fr_radius_client_bio_connect (fr_bio_packet_t *bio)
 Try to connect a socket. More...
 
int fr_radius_client_bio_force_id (fr_bio_packet_t *bio, int code, int id)
 
fr_bio_tfr_radius_client_bio_get_fd (fr_bio_packet_t *bio)
 
fr_radius_client_bio_info_t const * fr_radius_client_bio_info (fr_bio_packet_t *bio)
 
size_t fr_radius_client_bio_outstanding (fr_bio_packet_t *bio)
 
fr_radius_client_fd_bio_tfr_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)
 
int fr_radius_client_fd_bio_cancel (fr_bio_packet_t *bio, fr_packet_t *packet)
 Cancel one packet. More...
 
int fr_radius_client_fd_bio_read (fr_bio_packet_t *bio, void **request_ctx_p, fr_packet_t **packet_p, UNUSED TALLOC_CTX *out_ctx, fr_pair_list_t *out)
 
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)
 
static void radius_client_retry_release (fr_bio_t *bio, fr_bio_retry_entry_t *retry_ctx, UNUSED fr_bio_retry_release_reason_t reason)
 
static bool radius_client_retry_response (fr_bio_t *bio, fr_bio_retry_entry_t **retry_ctx_p, UNUSED void *packet_ctx, const void *buffer, UNUSED size_t size)
 
static bool radius_client_retry_response (fr_bio_t *bio, fr_bio_retry_entry_t **retry_ctx_p, void *packet_ctx, const void *buffer, UNUSED size_t size)
 
static void radius_client_retry_sent (fr_bio_t *bio, void *packet_ctx, const void *buffer, UNUSED size_t size, fr_bio_retry_entry_t *retry_ctx)
 

Variables

static const fr_radius_packet_code_t allowed_replies [FR_RADIUS_CODE_MAX]
 

Detailed Description

Functions to support RADIUS bio handlers for client sockets.

Id
64c45ff76169ad20d4032349ba1daf1d15a0042a

Definition in file client.c.

Function Documentation

◆ _radius_client_fd_bio_free()

static int _radius_client_fd_bio_free ( fr_radius_client_fd_bio_t my)
static

Definition at line 51 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_bio_alloc()

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 at line 37 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_bio_connect()

int fr_radius_client_bio_connect ( fr_bio_packet_t bio)

Try to connect a socket.

Calls fr_bio_fd_connect()

Parameters
biothe packet bio
Returns

Definition at line 444 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_bio_force_id()

int fr_radius_client_bio_force_id ( fr_bio_packet_t bio,
int  code,
int  id 
)

Definition at line 415 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_bio_get_fd()

fr_bio_t* fr_radius_client_bio_get_fd ( fr_bio_packet_t bio)

Definition at line 393 of file client.c.

+ Here is the caller graph for this function:

◆ fr_radius_client_bio_info()

fr_radius_client_bio_info_t const* fr_radius_client_bio_info ( fr_bio_packet_t bio)

Definition at line 407 of file client.c.

+ Here is the caller graph for this function:

◆ fr_radius_client_bio_outstanding()

size_t fr_radius_client_bio_outstanding ( fr_bio_packet_t bio)

Definition at line 400 of file client.c.

+ Here is the caller graph for this function:

◆ fr_radius_client_fd_bio_alloc()

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 at line 61 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_fd_bio_cancel()

int fr_radius_client_fd_bio_cancel ( fr_bio_packet_t bio,
fr_packet_t packet 
)

Cancel one packet.

The packet can have a reply, or not. It doesn't matter.

This also frees any IDs associated with the packet.

Definition at line 309 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_fd_bio_read()

int fr_radius_client_fd_bio_read ( fr_bio_packet_t bio,
void **  request_ctx_p,
fr_packet_t **  packet_p,
UNUSED TALLOC_CTX *  out_ctx,
fr_pair_list_t out 
)

Definition at line 329 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_radius_client_fd_bio_write()

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 at line 119 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radius_client_retry_release()

static void radius_client_retry_release ( fr_bio_t bio,
fr_bio_retry_entry_t retry_ctx,
UNUSED fr_bio_retry_release_reason_t  reason 
)
static

Definition at line 284 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radius_client_retry_response() [1/2]

static bool radius_client_retry_response ( fr_bio_t bio,
fr_bio_retry_entry_t **  retry_ctx_p,
UNUSED void *  packet_ctx,
const void *  buffer,
UNUSED size_t  size 
)
static
+ Here is the caller graph for this function:

◆ radius_client_retry_response() [2/2]

static bool radius_client_retry_response ( fr_bio_t bio,
fr_bio_retry_entry_t **  retry_ctx_p,
void *  packet_ctx,
const void *  buffer,
UNUSED size_t  size 
)
static

Definition at line 225 of file client.c.

+ Here is the call graph for this function:

◆ radius_client_retry_sent()

static void radius_client_retry_sent ( fr_bio_t bio,
void *  packet_ctx,
const void *  buffer,
UNUSED size_t  size,
fr_bio_retry_entry_t retry_ctx 
)
static

Definition at line 198 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ allowed_replies

const fr_radius_packet_code_t allowed_replies[FR_RADIUS_CODE_MAX]
static
Initial value:
= {
}
@ FR_RADIUS_CODE_ACCESS_CHALLENGE
RFC2865 - Access-Challenge.
Definition: defs.h:43
@ FR_RADIUS_CODE_ACCESS_REQUEST
RFC2865 - Access-Request.
Definition: defs.h:33
@ FR_RADIUS_CODE_DISCONNECT_REQUEST
RFC3575/RFC5176 - Disconnect-Request.
Definition: defs.h:46
@ FR_RADIUS_CODE_DISCONNECT_ACK
RFC3575/RFC5176 - Disconnect-Ack (positive)
Definition: defs.h:47
@ FR_RADIUS_CODE_COA_REQUEST
RFC3575/RFC5176 - CoA-Request.
Definition: defs.h:49
@ FR_RADIUS_CODE_ACCESS_ACCEPT
RFC2865 - Access-Accept.
Definition: defs.h:34
@ FR_RADIUS_CODE_ACCOUNTING_RESPONSE
RFC2866 - Accounting-Response.
Definition: defs.h:37
@ FR_RADIUS_CODE_COA_NAK
RFC3575/RFC5176 - CoA-Nak (not willing to perform)
Definition: defs.h:51
@ FR_RADIUS_CODE_COA_ACK
RFC3575/RFC5176 - CoA-Ack (positive)
Definition: defs.h:50
@ FR_RADIUS_CODE_DISCONNECT_NAK
RFC3575/RFC5176 - Disconnect-Nak (not willing to perform)
Definition: defs.h:48
@ FR_RADIUS_CODE_PROTOCOL_ERROR
RFC7930 - Protocol-Error (generic NAK)
Definition: defs.h:52
@ FR_RADIUS_CODE_ACCOUNTING_REQUEST
RFC2866 - Accounting-Request.
Definition: defs.h:36
@ FR_RADIUS_CODE_ACCESS_REJECT
RFC2865 - Access-Reject.
Definition: defs.h:35

Definition at line 182 of file client.c.