25#include <freeradius-devel/bio/fd_priv.h>
26#include <freeradius-devel/bio/null.h>
33# define SOL_IP IPPROTO_IP
47# ifdef IPV6_RECVPKTINFO
48# include <linux/version.h>
49# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
50# ifdef IPV6_2292PKTINFO
51# undef IPV6_RECVPKTINFO
53# define IPV6_RECVPKTINFO IPV6_2292PKTINFO
54# define IPV6_PKTINFO IPV6_2292PKTINFO
58# elif defined(IPV6_2292PKTINFO)
59# define IPV6_RECVPKTINFO IPV6_2292PKTINFO
72# if !defined(IPV6_RECVPKTINFO) && defined(IPV6_PKTINFO)
73# define IPV6_RECVPKTINFO IPV6_PKTINFO
79# elif !defined(IPV6_PKTINFO)
80# undef IPV6_RECVPKTINFO
84#define ADDR_INIT do { \
85 addr->when = fr_time(); \
86 addr->socket.type = my->info.socket.type; \
87 addr->socket.fd = -1; \
88 addr->socket.inet.ifindex = my->info.socket.inet.ifindex; \
101 if (
my->connect.el) {
103 my->connect.el = NULL;
128 my->info.write_blocked =
false;
145 rcode = read(
my->info.socket.fd,
buffer, size);
157 if (rcode < 0)
return rcode;
181 struct sockaddr_storage sockaddr;
183#ifdef STATIC_ANALYZER
184 sockaddr = (
struct sockaddr_storage) {};
188 salen =
sizeof(sockaddr);
190 rcode = recvfrom(
my->info.socket.fd,
buffer, size, 0, (
struct sockaddr *) &sockaddr, &salen);
193 fr_assert(sockaddr.ss_family ==
my->remote_sockaddr.ss_family);
194 fr_assert((sockaddr.ss_family == AF_INET) || (sockaddr.ss_family == AF_INET6));
200 if (rcode == 0)
return rcode;
215 struct sockaddr_storage sockaddr;
218 salen =
sizeof(sockaddr);
220 rcode = recvfrom(
my->info.socket.fd,
buffer, size, 0, (
struct sockaddr *) &sockaddr, &salen);
226 addr->
socket.inet.dst_ipaddr =
my->info.socket.inet.src_ipaddr;
227 addr->
socket.inet.dst_port =
my->info.socket.inet.src_port;
233 if (rcode == 0)
return rcode;
270 rcode = write(
my->info.socket.fd,
buffer, size);
287 struct sockaddr_storage sockaddr;
298 rcode = sendto(
my->info.socket.fd,
buffer, size, 0, (
struct sockaddr *) &sockaddr, salen);
306#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR) || defined(IPV6_PKTINFO)
311 struct sockaddr_storage from;
314#ifdef STATIC_ANALYZER
315 from.ss_family = AF_UNSPEC;
318 memset(&
my->cbuf, 0,
sizeof(
my->cbuf));
319 memset(&
my->msgh, 0,
sizeof(
struct msghdr));
321 my->iov = (
struct iovec) {
326 my->msgh = (
struct msghdr) {
327 .msg_control =
my->cbuf,
328 .msg_controllen =
sizeof(
my->cbuf),
330 .msg_namelen =
sizeof(from),
337 rcode = recvmsg(
my->info.socket.fd, &
my->msgh, 0);
339 if (
my->msgh.msg_flags == MSG_TRUNC)
return 0;
340 if (
my->msgh.msg_flags == MSG_CTRUNC)
return 0;
345 &from,
my->msgh.msg_namelen);
348 if (rcode == 0)
return rcode;
356#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR)
363 struct cmsghdr *cmsg;
368 rcode = fd_fd_recvfromto_common(
my, packet_ctx,
buffer, size);
369 if (rcode <= 0)
return rcode;
373 for (cmsg = CMSG_FIRSTHDR(&
my->msgh);
375 cmsg = CMSG_NXTHDR(&
my->msgh, cmsg)) {
379 if ((cmsg->cmsg_level ==
SOL_IP) &&
380 (cmsg->cmsg_type == IP_PKTINFO)) {
381 struct in_pktinfo *i = (
struct in_pktinfo *) CMSG_DATA(cmsg);
382 struct sockaddr_in to;
384 to.sin_family = AF_INET;
385 to.sin_addr = i->ipi_addr;
388 (
struct sockaddr_storage *) &to,
sizeof(
struct sockaddr_in));
389 addr->
socket.inet.ifindex = i->ipi_ifindex;
395 if ((cmsg->cmsg_level == IPPROTO_IP) &&
396 (cmsg->cmsg_type == IP_RECVDSTADDR)) {
397 struct in_addr *i = (
struct in_addr *) CMSG_DATA(cmsg);
398 struct sockaddr_in to;
400 to.sin_family = AF_INET;
403 (
struct sockaddr_storage *) &to,
sizeof(
struct sockaddr_in));
409 if ((cmsg->cmsg_level == SOL_SOCKET) && (cmsg->cmsg_type == SO_TIMESTAMPNS)) {
413#elif defined(SO_TIMESTAMP)
414 if ((cmsg->cmsg_level == SOL_SOCKET) && (cmsg->cmsg_type == SO_TIMESTAMP)) {
429static
ssize_t fr_bio_fd_sendfromto4(
fr_bio_t *bio,
void *packet_ctx, const
void *
buffer,
size_t size)
433 struct cmsghdr *cmsg;
434 struct sockaddr_storage to;
439 memset(&
my->cbuf, 0,
sizeof(
my->cbuf));
440 memset(&
my->msgh, 0,
sizeof(
struct msghdr));
444 my->iov = (
struct iovec) {
449 my->msgh = (
struct msghdr) {
450 .msg_control =
my->cbuf,
453 .msg_namelen = to_len,
461 struct in_pktinfo *pkt;
463 my->msgh.msg_controllen = CMSG_SPACE(
sizeof(*pkt));
465 cmsg = CMSG_FIRSTHDR(&
my->msgh);
466 cmsg->cmsg_level =
SOL_IP;
467 cmsg->cmsg_type = IP_PKTINFO;
468 cmsg->cmsg_len = CMSG_LEN(
sizeof(*pkt));
470 pkt = (
struct in_pktinfo *) CMSG_DATA(cmsg);
471 memset(pkt, 0,
sizeof(*pkt));
472 pkt->ipi_spec_dst = addr->
socket.inet.src_ipaddr.addr.v4;
473 pkt->ipi_ifindex = addr->
socket.inet.ifindex;
475#elif defined(IP_SENDSRCADDR)
478 my->msgh.msg_controllen = CMSG_SPACE(
sizeof(*
in));
480 cmsg = CMSG_FIRSTHDR(&
my->msgh);
481 cmsg->cmsg_level = IPPROTO_IP;
482 cmsg->cmsg_type = IP_SENDSRCADDR;
483 cmsg->cmsg_len = CMSG_LEN(
sizeof(*
in));
485 in = (
struct in_addr *) CMSG_DATA(cmsg);
486 *
in = addr->
socket.inet.src_ipaddr.addr.v4;
491 rcode = sendmsg(
my->info.socket.fd, &
my->msgh, 0);
498static inline int fr_bio_fd_udpfromto_init4(
int fd)
500 int proto = 0, flag = 0, opt = 1;
502#ifdef HAVE_IP_PKTINFO
509#elif defined(IP_RECVDSTADDR)
515 flag = IP_RECVDSTADDR;
518 return setsockopt(fd, proto, flag, &opt,
sizeof(opt));
522#if defined(IPV6_PKTINFO)
528 struct cmsghdr *cmsg;
533 rcode = fd_fd_recvfromto_common(
my, packet_ctx,
buffer, size);
534 if (rcode <= 0)
return rcode;
538 for (cmsg = CMSG_FIRSTHDR(&
my->msgh);
540 cmsg = CMSG_NXTHDR(&
my->msgh, cmsg)) {
543 if ((cmsg->cmsg_level == IPPROTO_IPV6) &&
544 (cmsg->cmsg_type == IPV6_PKTINFO)) {
545 struct in6_pktinfo *i = (
struct in6_pktinfo *) CMSG_DATA(cmsg);
546 struct sockaddr_in6 to;
548 to.sin6_family = AF_INET6;
549 to.sin6_addr = i->ipi6_addr;
552 (
struct sockaddr_storage *) &to,
sizeof(
struct sockaddr_in6));
553 addr->
socket.inet.ifindex = i->ipi6_ifindex;
558 if ((cmsg->cmsg_level == SOL_SOCKET) && (cmsg->cmsg_type == SO_TIMESTAMPNS)) {
562#elif defined(SO_TIMESTAMP)
563 if ((cmsg->cmsg_level == SOL_SOCKET) && (cmsg->cmsg_type == SO_TIMESTAMP)) {
578static
ssize_t fr_bio_fd_sendfromto6(
fr_bio_t *bio,
void *packet_ctx, const
void *
buffer,
size_t size)
582 struct cmsghdr *cmsg;
583 struct sockaddr_storage to;
588 memset(&
my->cbuf, 0,
sizeof(
my->cbuf));
589 memset(&
my->msgh, 0,
sizeof(
struct msghdr));
593 my->iov = (
struct iovec) {
598 my->msgh = (
struct msghdr) {
599 .msg_control =
my->cbuf,
602 .msg_namelen = to_len,
609 struct in6_pktinfo *pkt;
611 my->msgh.msg_controllen = CMSG_SPACE(
sizeof(*pkt));
613 cmsg = CMSG_FIRSTHDR(&
my->msgh);
614 cmsg->cmsg_level = IPPROTO_IPV6;
615 cmsg->cmsg_type = IPV6_PKTINFO;
616 cmsg->cmsg_len = CMSG_LEN(
sizeof(*pkt));
618 pkt = (
struct in6_pktinfo *) CMSG_DATA(cmsg);
619 memset(pkt, 0,
sizeof(*pkt));
620 pkt->ipi6_addr = addr->
socket.inet.src_ipaddr.addr.v6;
621 pkt->ipi6_ifindex = addr->
socket.inet.ifindex;
625 rcode = sendmsg(
my->info.socket.fd, &
my->msgh, 0);
633static inline int fr_bio_fd_udpfromto_init6(
int fd)
637 return setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &opt,
sizeof(opt));
645 len = strlen(filename);
646 if (len >=
sizeof(sun->sun_path)) {
647 fr_strerror_const(
"Failed parsing unix domain socket filename: Name is too long");
651 sun->sun_family = AF_LOCAL;
652 memcpy(sun->sun_path, filename, len + 1);
654 *sunlen = SUN_LEN(sun);
662 struct sockaddr_storage salocal;
668 (
my->info.socket.inet.src_port != 0)) {
677 salen =
sizeof(salocal);
678 memset(&salocal, 0, salen);
679 if (getsockname(
my->info.socket.fd, (
struct sockaddr *) &salocal, &salen) < 0) {
687 my->info.socket.inet.ifindex =
my->info.socket.inet.src_ipaddr.scope_id;
695 my->info.eof =
false;
696 my->info.read_blocked =
false;
697 my->info.write_blocked =
false;
702 if (
my->cb.connected)
my->cb.connected(&
my->bio);
719 if (
my->info.socket.af != AF_LOCAL) {
721 &
my->info.socket.inet.dst_ipaddr,
my->info.socket.inet.dst_port);
724 my->info.socket.unix.path);
735 if (connect(
my->info.socket.fd, (
struct sockaddr *) &
my->remote_sockaddr,
my->remote_sockaddr_len) == 0) {
750 if (tries <= my->max_tries)
goto retry;
764 if (!
my->info.write_blocked) {
765 my->info.write_blocked =
true;
768 if (rcode < 0)
return rcode;
793 switch (
my->info.cfg->flags & (O_RDONLY | O_WRONLY | O_RDWR)) {
841 my->info.eof =
false;
843 my->info.read_blocked =
false;
844 my->info.write_blocked =
false;
857 setsockopt(
my->info.socket.fd, SOL_SOCKET, SO_NOSIGPIPE, &on,
sizeof(on));
864 if (!
my->info.cfg->async)
return 0;
867 if (rcode == 0)
return 0;
869 if (rcode !=
fr_bio_error(IO_WOULD_BLOCK))
return rcode;
882 if (
my->info.socket.type == SOCK_STREAM) {
894#if defined(IP_PKTINFO) || defined(IP_RECVDSTADDR)
895 }
else if (
my->info.socket.inet.src_ipaddr.af == AF_INET) {
896 if (fr_bio_fd_udpfromto_init4(
my->info.socket.fd) < 0)
return -1;
898 my->bio.read = fr_bio_fd_recvfromto4;
899 my->bio.write = fr_bio_fd_sendfromto4;
902#if defined(IPV6_PKTINFO)
903 }
else if (
my->info.socket.inet.src_ipaddr.af == AF_INET6) {
905 if (fr_bio_fd_udpfromto_init6(
my->info.socket.fd) < 0)
return -1;
907 my->bio.read = fr_bio_fd_recvfromto6;
908 my->bio.write = fr_bio_fd_sendfromto6;
928 if (listen(
my->info.socket.fd,
my->info.cfg->backlog_is_set ?
my->info.cfg->backlog : 8) < 0) {
976 if (!
my)
return NULL;
991 .read_blocked =
false,
992 .write_blocked =
false,
1042 (void) shutdown(
my->info.socket.fd, SHUT_RDWR);
1046 rcode = close(
my->info.socket.fd);
1052 if (tries < my->max_tries)
goto retry;
1064 my->info.read_blocked =
true;
1065 my->info.write_blocked =
true;
1066 my->info.eof =
true;
1067 my->info.socket.fd = -1;
1079 my->info.connect_errno = fd_errno;
1081 if (
my->connect.error) {
1082 my->connect.error(&
my->bio);
1113 socklen_t socklen =
sizeof(error);
1128 if (getsockopt(
my->info.socket.fd, SOL_SOCKET, SO_ERROR, (
void *)&error, &socklen) < 0) {
1155 my->connect.el = NULL;
1164 my->connect.el = NULL;
1176 my->connect.timeout(&
my->bio);
1210 my->info.connect_errno = ECONNABORTED;
1212 my->info.connect_errno = ECONNREFUSED;
1214 if (error_cb) error_cb(bio);
1225 if (connected_cb) connected_cb(bio);
1247 if (!connected_cb) {
1252 if (error_cb) error_cb(bio);
1267 my->connect.success = connected_cb;
1268 my->connect.error = error_cb;
1269 my->connect.timeout = timeout_cb;
1287 my->connect.el =
el;
1312 rcode = read(
my->info.socket.fd,
buffer, size);
1313 if (rcode >= 0)
return 0;
1316#define flag_blocked read_blocked
1331 rcode = read(
my->info.socket.fd,
buffer, size);
1332 if (rcode > 0 )
return 0;
1339#define flag_blocked read_blocked
1352 switch (
my->info.type) {
1357 if (
my->info.socket.type != SOCK_DGRAM) {
1361 goto set_recv_buff_zero;
1367 if (shutdown(
my->info.socket.fd, SHUT_RD) < 0) {
1382 if (setsockopt(
my->info.socket.fd, SOL_SOCKET, SO_RCVBUF, &opt,
sizeof(opt)) < 0) {
1404#if !defined(__linux__) && !defined(__FreeBSD__)
1405static int inline accept4(
int fd,
struct sockaddr *sockaddr, socklen_t *salen,
UNUSED int flags)
1407 fd = accept(fd, sockaddr, salen);
1417#ifndef SOCK_NONBLOCK
1418#define SOCK_NONBLOCK 0
1422#define SOCK_CLOEXEC 0
1434 my->remote_sockaddr_len =
sizeof(
my->remote_sockaddr);
1440 fd =
accept4(
parent->info.socket.fd, (
struct sockaddr *) &
my->remote_sockaddr, &
my->remote_sockaddr_len,
1446 if (errno == EINTR) {
1448 if (tries <= my->max_tries)
goto retry;
1457 if ((
my->info.socket.af == AF_INET) || (
my->info.socket.af == AF_INET6)) {
1459 &
my->remote_sockaddr,
my->remote_sockaddr_len);
1465 my->info.socket.fd = fd;
1470 my->info.socket.fd = -1;
1476 if (!
my->info.name) {
1477 my->info.socket.fd = -1;
1508 out->info.cfg =
my->info.cfg;
1513 out->info.socket =
my->info.socket;
1515 if (
my->info.socket.type == SOCK_STREAM) {
static int const char char buffer[256]
fr_bio_write_t _CONST write
write to the underlying bio
fr_bio_read_t _CONST read
read from the underlying bio
static ssize_t fr_bio_write(fr_bio_t *bio, void *packet_ctx, void const *buffer, size_t size)
Write raw data to a bio.
static fr_bio_t * fr_bio_head(fr_bio_t *bio)
void(* fr_bio_callback_t)(fr_bio_t *bio)
#define UNCONST(_type, _ptr)
Remove const qualification from a pointer.
#define FALL_THROUGH
clang 10 doesn't recognised the FALL-THROUGH comment anymore
#define fr_event_fd_insert(...)
@ FR_EVENT_FILTER_IO
Combined filter for read/write functions/.
int fr_bio_fd_connect_full(fr_bio_t *bio, fr_event_list_t *el, fr_bio_callback_t connected_cb, fr_bio_callback_t error_cb, fr_time_delta_t *timeout, fr_bio_callback_t timeout_cb)
Finalize a connect()
static ssize_t fr_bio_fd_write(fr_bio_t *bio, UNUSED void *packet_ctx, const void *buffer, size_t size)
Write to fd.
int fr_bio_fd_socket_name(fr_bio_fd_t *my)
static void fr_bio_fd_el_connect(NDEBUG_UNUSED fr_event_list_t *el, NDEBUG_UNUSED int fd, NDEBUG_UNUSED int flags, void *uctx)
Connect callback for when the socket is writable.
static int fr_bio_fd_write_resume(fr_bio_t *bio)
fr_bio_t * fr_bio_fd_alloc(TALLOC_CTX *ctx, fr_bio_fd_config_t const *cfg, size_t offset)
Allocate a FD bio.
static ssize_t fr_bio_fd_read_discard_stream(fr_bio_t *bio, UNUSED void *packet_ctx, void *buffer, size_t size)
Discard all reads from a TCP socket.
static int accept4(int fd, struct sockaddr *sockaddr, socklen_t *salen, UNUSED int flags)
int fr_bio_fd_init_connected(fr_bio_fd_t *my)
static ssize_t fr_bio_fd_read_connected_datagram(fr_bio_t *bio, UNUSED void *packet_ctx, void *buffer, size_t size)
Connected datagram read.
static ssize_t fr_bio_fd_try_connect(fr_bio_fd_t *my)
Try to connect().
static ssize_t fr_bio_fd_recvfrom(fr_bio_t *bio, void *packet_ctx, void *buffer, size_t size)
Read from a UDP socket where we know our IP.
static int fr_bio_fd_eof(fr_bio_t *bio)
static ssize_t fr_bio_fd_sendto(fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size)
Write to a UDP socket where we know our IP.
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)
int fr_bio_fd_accept(TALLOC_CTX *ctx, fr_bio_t **out_p, fr_bio_t *bio)
Accept a new connection on a socket.
fr_bio_fd_info_t const * fr_bio_fd_info(fr_bio_t *bio)
Returns a pointer to the bio-specific information.
static int fr_bio_fd_shutdown(fr_bio_t *bio)
Orderly shutdown.
static int fr_bio_fd_accept_stream(fr_bio_fd_t *my, fr_bio_fd_t const *parent)
Accept a stream socket and initialize its flags.
static int fr_bio_fd_init_file(fr_bio_fd_t *my)
Files are a special case of connected sockets.
static void fr_bio_fd_el_timeout(UNUSED fr_timer_list_t *tl, UNUSED fr_time_t now, void *uctx)
We have a timeout on the conenction.
int fr_bio_fd_init_common(fr_bio_fd_t *my)
int fr_bio_fd_write_only(fr_bio_t *bio)
Mark up a bio as write-only.
static ssize_t fr_bio_fd_read_discard_datagram(fr_bio_t *bio, UNUSED void *packet_ctx, void *buffer, size_t size)
Discard all reads from a UDP socket.
static void fr_bio_fd_el_error(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, int fd_errno, void *uctx)
FD error when trying to connect, give up on the BIO.
int fr_bio_fd_close(fr_bio_t *bio)
Close the FD, but leave the bio allocated and alive.
static void fr_bio_fd_set_open(fr_bio_fd_t *my)
static ssize_t fr_bio_fd_read_stream(fr_bio_t *bio, UNUSED void *packet_ctx, void *buffer, size_t size)
Stream read.
@ FR_BIO_FD_CONNECTED
connected client sockets (UDP or TCP)
@ FR_BIO_FD_INVALID
not set
@ FR_BIO_FD_UNCONNECTED
unconnected UDP / datagram only
@ FR_BIO_FD_LISTEN
returns new fd in buffer on fr_bio_read() or fr_bio_fd_accept()
@ FR_BIO_FD_STATE_CONNECTING
@ FR_BIO_FD_STATE_OPEN
error states must be before this
int fr_bio_fd_open(fr_bio_t *bio, fr_bio_fd_config_t const *cfg)
Opens a socket and updates sock->fd.
fr_socket_t socket
socket information, including FD.
Configuration for sockets.
Run-time status of the socket.
void fr_bio_shutdown & my
void fr_bio_fd_name(fr_bio_fd_t *my)
Set the name of an FD BIO.
#define fr_bio_fd_packet_ctx(_my, _packet_ctx)
void fr_ipaddr_get_scope_id(fr_ipaddr_t *ipaddr)
int fr_ipaddr_from_sockaddr(fr_ipaddr_t *ipaddr, uint16_t *port, struct sockaddr_storage const *sa, socklen_t salen)
Convert sockaddr to our internal ip address representation.
int fr_ipaddr_is_inaddr_any(fr_ipaddr_t const *ipaddr)
Determine if an address is the INADDR_ANY address for its address family.
int fr_ipaddr_to_sockaddr(struct sockaddr_storage *sa, socklen_t *salen, fr_ipaddr_t const *ipaddr, uint16_t port)
Convert our internal ip address representation to a sockaddr.
int fr_bio_write_blocked(fr_bio_t *bio)
Internal BIO function to tell all BIOs that it's blocked.
ssize_t fr_bio_shutdown_read(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void *buffer, UNUSED size_t size)
void fr_bio_eof(fr_bio_t *bio)
Internal BIO function to run EOF callbacks.
int fr_bio_destructor(fr_bio_t *bio)
Free this bio.
ssize_t fr_bio_shutdown_write(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void const *buffer, UNUSED size_t size)
int fr_bio_shutdown(fr_bio_t *bio)
Shut down a set of BIOs.
int fr_event_fd_delete(fr_event_list_t *el, int fd, fr_event_filter_t filter)
Remove a file descriptor from the event loop.
Stores all information relating to an event list.
int fr_nonblock(UNUSED int fd)
int fr_cloexec(UNUSED int fd)
ssize_t fr_bio_null_write(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void const *buffer, UNUSED size_t size)
Always return 0 on write.
ssize_t fr_bio_null_read(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void *buffer, UNUSED size_t size)
Always return 0 on read.
ssize_t fr_bio_fail_read(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void *buffer, UNUSED size_t size)
Always return error on read.
ssize_t fr_bio_fail_write(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void const *buffer, UNUSED size_t size)
Always return an error on write.
char const * fr_syserror(int num)
Guaranteed to be thread-safe version of strerror.
static fr_time_t fr_time_from_timeval(struct timeval const *when_tv)
Convert a timeval (wallclock time) to a fr_time_t (internal time)
#define fr_time_wrap(_time)
#define fr_time_eq(_a, _b)
static fr_time_t fr_time_from_timespec(struct timespec const *when_ts)
Convert a timespec (wallclock time) to a fr_time_t (internal time)
A time delta, a difference in time measured in nanoseconds.
#define FR_TIMER_DELETE(_ev_p)
static fr_event_list_t * el
#define fr_strerror_printf(_fmt,...)
Log to thread local error buffer.
#define fr_strerror_const(_msg)
static size_t char ** out