25RCSIDH(lib_bio_fd_privh,
"$Id: f81c4fd38eaf7b7bf3230243bd14212f903cadb7 $")
27#include <freeradius-devel/util/syserror.h>
29#include <freeradius-devel/bio/bio_priv.h>
30#include <freeradius-devel/bio/fd.h>
35#define FR_BIO_FD_MAX_DATAGRAM (65535)
65#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) || defined(IPV6_PKTINFO)
75 uint8_t cbuf[CMSG_SPACE(
sizeof(
struct in6_pktinfo)) +
76 CMSG_SPACE(
sizeof(
union {
struct timespec ts;
struct timeval tv; }))];
80#define fr_bio_fd_packet_ctx(_my, _packet_ctx) ((fr_bio_fd_packet_ctx_t *) (((uint8_t *) _packet_ctx) + _my->offset))
void(* fr_bio_callback_t)(fr_bio_t *bio)
Run-time status of the socket.
socklen_t remote_sockaddr_len
struct fr_bio_fd_s::@18 connect
int fr_bio_fd_unix_shutdown(fr_bio_t *bio)
Remove the Unix domain socket which this bio created.
size_t offset
where fr_bio_fd_packet_ctx_t is stored
int fr_bio_fd_socket_name(fr_bio_fd_t *my)
int max_tries
how many times we retry on EINTR
int fr_bio_fd_init_connected(fr_bio_fd_t *my)
void fr_bio_fd_name(fr_bio_fd_t *my)
Set the name of an FD BIO.
int fr_filename_to_sockaddr(struct sockaddr_un *sun, socklen_t *sunlen, char const *filename)
int fr_bio_fd_init_listen(fr_bio_fd_t *my)
uint8_t * first_datagram
The datagram which fr_bio_fd_accept() read to name the peer.
uint8_t * accept_buffer
A LISTEN datagram bio reads datagrams into this buffer, which is allocated once by fr_bio_fd_init_lis...
int fr_bio_fd_init_common(fr_bio_fd_t *my)
struct fr_bio_fd_s fr_bio_fd_t
Our FD bio structure.
size_t first_datagram_len
Length of first_datagram.
struct sockaddr_storage remote_sockaddr
for connected UDP sockets.
Stores all information relating to an event list.
static fr_event_list_t * el