27RCSIDH(lib_bio_mem_h,
"$Id: 914acbda46e49aeccc20b99b2258d266d338ecd5 $")
static int const char char buffer[256]
fr_bio_t * fr_bio_mem_alloc(TALLOC_CTX *ctx, size_t read_size, size_t write_size, fr_bio_t *next)
Allocate a memory buffer bio.
fr_bio_verify_action_t
Status returned by the verification callback.
@ FR_BIO_VERIFY_ERROR_CLOSE
fatal error, the bio should be closed.
@ FR_BIO_VERIFY_DISCARD
the packet should be discarded
@ FR_BIO_VERIFY_OK
packet is OK
@ FR_BIO_VERIFY_WANT_MORE
not enough data for one packet
void fr_bio_mem_read_discard(fr_bio_t *bio, size_t size)
Discard data from the read buffer.
fr_bio_verify_action_t(* fr_bio_verify_t)(fr_bio_t *bio, void *verify_ctx, void *packet_ctx, const void *buffer, size_t *size)
Verifies the packet.
int fr_bio_mem_write_resume(fr_bio_t *bio)
See if we can resume writes to the memory bio.
fr_bio_t * fr_bio_mem_sink_alloc(TALLOC_CTX *ctx, size_t buffer_size)
Allocate a memory buffer which sinks data from a bio system into the callers application.
int fr_bio_mem_set_verify(fr_bio_t *bio, fr_bio_verify_t verify, void *verify_ctx, bool datagram)
Set the verification function for memory bios.
fr_bio_t * fr_bio_mem_source_alloc(TALLOC_CTX *ctx, size_t buffer_size, fr_bio_t *next)
Allocate a memory buffer which sources data from the callers application into the bio system.
int fr_bio_mem_write_pause(fr_bio_t *bio)
Pause writes.
uint8_t const * fr_bio_mem_read_peek(fr_bio_t *bio, size_t *size)
Peek at the data in the read buffer.