25 #include <freeradius-devel/bio/bio_priv.h>
26 #include <freeradius-devel/bio/packet.h>
41 if (
my->write_blocked)
return 1;
42 my->write_blocked =
true;
47 if (!
my->cb.write_blocked)
return 1;
52 return my->cb.write_blocked(
my);
61 if (!
my->write_blocked)
return 1;
62 my->write_blocked =
false;
78 if (rcode < 0)
return rcode;
81 my->write_blocked =
true;
86 rcode =
my->cb.write_resume(
my);
87 if (rcode < 0)
return rcode;
89 my->write_blocked = (rcode == 0);
98 my->read_blocked =
true;
100 return my->cb.read_blocked(
my);
107 my->read_blocked =
false;
109 return my->cb.read_resume(
my);
139 my->connected =
true;
149 my->cb.connected(
my);
156 if (
my->cb.shutdown)
my->cb.shutdown(
my);
157 my->cb.shutdown = NULL;
164 if (
my->cb.eof)
my->cb.eof(
my);
172 if (
my->cb.failed)
my->cb.failed(
my);
173 my->cb.failed = NULL;
fr_bio_callback_t connected
called when the BIO is ready to be used
static fr_bio_t * fr_bio_prev(fr_bio_t *bio)
static fr_bio_t * fr_bio_next(fr_bio_t *bio)
void * uctx
user ctx, caller can manually set it.
void fr_bio_cb_set(fr_bio_t *bio, fr_bio_cb_funcs_t const *cb)
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.
static void fr_bio_packet_failed(fr_bio_t *bio)
static void fr_bio_packet_shutdown(fr_bio_t *bio)
static void fr_bio_packet_eof(fr_bio_t *bio)
static int fr_bio_packet_write_blocked(fr_bio_t *bio)
Inform all of the BIOs that the write is blocked.
static int fr_bio_packet_read_resume(fr_bio_t *bio)
static int fr_bio_packet_read_blocked(fr_bio_t *bio)
static int fr_bio_packet_write_resume(fr_bio_t *bio)
static int talloc_const_free(void const *ptr)
Free const'd memory.