25 RCSIDH(lib_bio_packet_h,
"$Id: 67853fd048f654ca4e0d5094fcfdfb72b21164d7 $")
27 #include <freeradius-devel/util/packet.h>
28 #include <freeradius-devel/bio/base.h>
121 return my->read(
my, pctx_p, packet_p, out_ctx,
out);
147 rcode =
my->write(
my, pctx, packet, list);
148 if (rcode == 0)
return 0;
169 if (!
my->write_blocked)
return 0;
174 slen =
my->bio->write(
my->bio, NULL, NULL, SIZE_MAX);
176 my->write_blocked =
false;
fr_bio_t * bio
underlying BIO(s) for IO
fr_bio_packet_io_t read_blocked
fr_bio_packet_cb_funcs_t cb
fr_bio_packet_callback_t shutdown
fr_bio_packet_callback_t eof
fr_bio_packet_signal_t release
void fr_bio_packet_init(fr_bio_packet_t *my)
void fr_bio_packet_connected(fr_bio_t *bio)
Called when a particular BIO is connected.
fr_bio_packet_write_t write
write to the underlying bio
int(* fr_bio_packet_read_t)(fr_bio_packet_t *bio, void **request_ctx_p, fr_packet_t **packet_p, TALLOC_CTX *out_ctx, fr_pair_list_t *out)
Read a packet and pairs from the network.
fr_bio_packet_io_t write_blocked
fr_bio_packet_signal_t retry
fr_bio_packet_io_t write_resume
fr_bio_packet_io_t read_resume
static int fr_bio_packet_read(fr_bio_packet_t *my, void **pctx_p, fr_packet_t **packet_p, TALLOC_CTX *out_ctx, fr_pair_list_t *out)
Read a packet from a packet BIO.
fr_bio_packet_callback_t connected
void(* fr_bio_packet_signal_t)(fr_bio_packet_t *bio, fr_packet_t *packet)
Signal an outgoing packet.
fr_bio_packet_callback_t failed
fr_event_timer_t const * ev
connection timeout
int(* fr_bio_packet_io_t)(fr_bio_packet_t *bio)
void * uctx
user ctx, caller can manually set it.
fr_bio_packet_read_t read
read from the underlying bio
static int fr_bio_packet_write_flush(fr_bio_packet_t *my)
Flush a bio which is blocked.
int fr_bio_packet_connect(fr_bio_t *bio)
int(* fr_bio_packet_write_t)(fr_bio_packet_t *bio, void *rctx, fr_packet_t *packet, fr_pair_list_t *list)
Write a packet and pairs from the network.
static int fr_bio_packet_write(fr_bio_packet_t *my, void *pctx, fr_packet_t *packet, fr_pair_list_t *list)
Write a packet to a packet BIO.
void(* fr_bio_packet_callback_t)(fr_bio_packet_t *bio)
static size_t char ** out