The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
fd_priv.h File Reference

Private binary IO abstractions for file descriptors. More...

#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/bio/bio_priv.h>
#include <freeradius-devel/bio/fd.h>
+ Include dependency graph for fd_priv.h:

Go to the source code of this file.

Data Structures

struct  fr_bio_fd_s
 Our FD bio structure. More...
 
struct  fr_bio_fd_s.connect
 

Macros

#define FR_BIO_FD_MAX_DATAGRAM   (65535)
 The largest payload of a UDP datagram.
 
#define fr_bio_fd_packet_ctx(_my, _packet_ctx)   ((fr_bio_fd_packet_ctx_t *) (((uint8_t *) _packet_ctx) + _my->offset))
 

Typedefs

typedef struct fr_bio_fd_s fr_bio_fd_t
 Our FD bio structure.
 

Functions

int fr_bio_fd_init_common (fr_bio_fd_t *my)
 
int fr_bio_fd_init_connected (fr_bio_fd_t *my)
 
int fr_bio_fd_init_listen (fr_bio_fd_t *my)
 
void fr_bio_fd_name (fr_bio_fd_t *my)
 Set the name of an FD BIO.
 
int fr_bio_fd_socket_name (fr_bio_fd_t *my)
 
int fr_bio_fd_unix_shutdown (fr_bio_t *bio)
 Remove the Unix domain socket which this bio created.
 
int fr_filename_to_sockaddr (struct sockaddr_un *sun, socklen_t *sunlen, char const *filename)
 

Detailed Description

Private binary IO abstractions for file descriptors.

Id
f81c4fd38eaf7b7bf3230243bd14212f903cadb7

Definition in file fd_priv.h.


Data Structure Documentation

◆ fr_bio_fd_s

struct fr_bio_fd_s

Our FD bio structure.

Definition at line 40 of file fd_priv.h.

+ Collaboration diagram for fr_bio_fd_s:
Data Fields
uint8_t * accept_buffer A LISTEN datagram bio reads datagrams into this buffer, which is allocated once by fr_bio_fd_init_listen().
struct fr_bio_fd_s.connect connect
uint8_t * first_datagram The datagram which fr_bio_fd_accept() read to name the peer.

Only fr_bio_fd_read_first_datagram() reads it.

size_t first_datagram_len Length of first_datagram.
FR_BIO_COMMON
fr_bio_fd_info_t info
int max_tries how many times we retry on EINTR
size_t offset where fr_bio_fd_packet_ctx_t is stored
struct sockaddr_storage remote_sockaddr for connected UDP sockets.
socklen_t remote_sockaddr_len

◆ fr_bio_fd_s.connect

struct fr_bio_fd_s.connect

Macro Definition Documentation

◆ FR_BIO_FD_MAX_DATAGRAM

#define FR_BIO_FD_MAX_DATAGRAM   (65535)

The largest payload of a UDP datagram.

Definition at line 35 of file fd_priv.h.

◆ fr_bio_fd_packet_ctx

#define fr_bio_fd_packet_ctx (   _my,
  _packet_ctx 
)    ((fr_bio_fd_packet_ctx_t *) (((uint8_t *) _packet_ctx) + _my->offset))

Definition at line 80 of file fd_priv.h.

Typedef Documentation

◆ fr_bio_fd_t

typedef struct fr_bio_fd_s fr_bio_fd_t

Our FD bio structure.

Function Documentation

◆ fr_bio_fd_init_common()

int fr_bio_fd_init_common ( fr_bio_fd_t *  my)

< stream socket

< connected datagram

< we know our IP address

Definition at line 985 of file fd.c.

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

◆ fr_bio_fd_init_connected()

int fr_bio_fd_init_connected ( fr_bio_fd_t *  my)

Definition at line 930 of file fd.c.

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

◆ fr_bio_fd_init_listen()

int fr_bio_fd_init_listen ( fr_bio_fd_t *  my)

Definition at line 1026 of file fd.c.

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

◆ fr_bio_fd_name()

void fr_bio_fd_name ( fr_bio_fd_t *  my)

Set the name of an FD BIO.

Definition at line 897 of file fd_open.c.

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

◆ fr_bio_fd_socket_name()

int fr_bio_fd_socket_name ( fr_bio_fd_t *  my)

Definition at line 714 of file fd.c.

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

◆ fr_bio_fd_unix_shutdown()

int fr_bio_fd_unix_shutdown ( fr_bio_t *  bio)

Remove the Unix domain socket which this bio created.

Called from fr_bio_fd_shutdown() for every Unix domain bio.

Definition at line 499 of file fd_open.c.

+ Here is the caller graph for this function:

◆ fr_filename_to_sockaddr()

int fr_filename_to_sockaddr ( struct sockaddr_un *  sun,
socklen_t *  sunlen,
char const *  filename 
)

Definition at line 696 of file fd.c.

+ Here is the caller graph for this function: