The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Binary IO private functions. More...
#include <freeradius-devel/bio/base.h>
Go to the source code of this file.
Data Structures | |
struct | fr_bio_common_s |
struct | fr_bio_priv_callback_t |
Macros | |
#define | _BIO_PRIVATE 1 |
#define | FR_BIO_COMMON |
Common elements at the start of each private fr_bio_t. More... | |
Typedefs | |
typedef struct fr_bio_common_s | fr_bio_common_t |
typedef int(* | fr_bio_shutdown_t) (fr_bio_t *bio) |
Functions | |
static void | fr_bio_chain (fr_bio_t *first, fr_bio_t *second) |
Chain one bio after another. More... | |
void | fr_bio_eof (fr_bio_t *bio) |
Internal BIO function to run EOF callbacks. More... | |
ssize_t | fr_bio_next_read (fr_bio_t *bio, void *packet_ctx, void *buffer, size_t size) |
Internal bio function which just reads from the "next" bio. More... | |
ssize_t | fr_bio_next_write (fr_bio_t *bio, void *packet_ctx, void const *buffer, size_t size) |
Internal bio function which just writes to the "next" bio. More... | |
static void | fr_bio_unchain (fr_bio_t *bio) |
Remove a bio from a chain. More... | |
int | fr_bio_write_blocked (fr_bio_t *bio) |
Internal BIO function to tell all BIOs that it's blocked. More... | |
Binary IO private functions.
Create abstract binary input / output buffers.
Definition in file bio_priv.h.
struct fr_bio_common_s |
Definition at line 57 of file bio_priv.h.
Data Fields | ||
---|---|---|
FR_BIO_COMMON |
struct fr_bio_priv_callback_t |
Definition at line 36 of file bio_priv.h.
Data Fields | ||
---|---|---|
fr_bio_io_t | connected | |
fr_bio_io_t | eof | |
fr_bio_callback_t | failed | |
fr_bio_io_t | read_blocked | |
fr_bio_io_t | read_resume | "unblocked" is too similar to "blocked" |
fr_bio_callback_t | shutdown | |
fr_bio_io_t | write_blocked | |
fr_bio_io_t | write_resume |
#define _BIO_PRIVATE 1 |
Definition at line 29 of file bio_priv.h.
#define FR_BIO_COMMON |
Common elements at the start of each private fr_bio_t.
Definition at line 52 of file bio_priv.h.
typedef struct fr_bio_common_s fr_bio_common_t |
Definition at line 32 of file bio_priv.h.
typedef int(* fr_bio_shutdown_t) (fr_bio_t *bio) |
Definition at line 32 of file bio_priv.h.
Chain one bio after another.
Definition at line 69 of file bio_priv.h.
void fr_bio_eof | ( | fr_bio_t * | bio | ) |
Internal BIO function to run EOF callbacks.
When a BIO hits EOF, it MUST call this function. This function will take care of changing the read() function to return nothing. It will also take care of walking back up the hierarchy, and calling any BIO EOF callbacks.
Once all of the BIOs have been marked as blocked, it will call the application EOF callback.
Definition at line 244 of file base.c.
Internal bio function which just writes to the "next" bio.
It is mainly used when the current bio needs to modify the read path, but does not need to do anything on the write path.
Definition at line 74 of file base.c.
|
inlinestatic |
Remove a bio from a chain.
And reset prev/next ptrs to NULL.
Definition at line 86 of file bio_priv.h.
int fr_bio_write_blocked | ( | fr_bio_t * | bio | ) |
Internal BIO function to tell all BIOs that it's blocked.
When a BIO blocks on write, it MUST call this function. This function will take care of walking back up the hierarchy, and calling any write_blocked callbacks.
Once all of the BIOs have been marked as blocked, it will call the application write_blocked callback.
Definition at line 293 of file base.c.