The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
Macros | Functions
fd_errno.h File Reference

Common errno handling for FD bio reads and writes. More...

#include <freeradius-devel/bio/fd_priv.h>
+ Include dependency graph for fd_errno.h:

Go to the source code of this file.

Macros

#define FD_ENET_SUPPRESS
 

Functions

static bool fr_bio_fd_errno_retry (fr_bio_fd_t *my, ssize_t *rcode_p, int *tries_p, bool is_write)
 Turn a failed read / write into a bio return code.
 

Detailed Description

Common errno handling for FD bio reads and writes.

Id
62c6cc2fb5aaab69922eb6ec22d0f20988cc7007

Definition in file fd_errno.h.

Macro Definition Documentation

◆ FD_ENET_SUPPRESS

#define FD_ENET_SUPPRESS
Value:
do { \
if ((rcode == fr_bio_error(IO)) && ((errno == ENETDOWN) || (errno == ENETUNREACH))) return 0; \
} while (0)
#define fr_bio_error(_x)
Definition base.h:200

Definition at line 146 of file fd_errno.h.

Function Documentation

◆ fr_bio_fd_errno_retry()

static bool fr_bio_fd_errno_retry ( fr_bio_fd_t my,
ssize_t rcode_p,
int *  tries_p,
bool  is_write 
)
inlinestatic

Turn a failed read / write into a bio return code.

Only called when the syscall failed, i.e. when rcode is negative.

Parameters
mythe FD bio.
[in,out]rcode_pin: the failed syscall return code. out: what to return to the application.
[in,out]tries_phow many times we have retried on EINTR.
is_writetrue for the write path, false for the read path.
Returns
  • false return *rcode_p to the application.
  • true the syscall was interrupted, redo it.

Definition at line 41 of file fd_errno.h.

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