27 RCSIDH(ring_buffer_h,
"$Id: d8f3088307a19dd06a1395d94256ebc8330c2593 $")
29 #include <freeradius-devel/util/talloc.h>
static fr_ring_buffer_t * rb
size_t size
Size of this ring buffer.
fr_ring_buffer_t * fr_ring_buffer_create(TALLOC_CTX *ctx, size_t size)
Create a ring buffer.
uint8_t * fr_ring_buffer_reserve(fr_ring_buffer_t *rb, size_t size)
Reserve room in the ring buffer.
int fr_ring_buffer_start(fr_ring_buffer_t *dst, uint8_t **p_start, size_t *p_size)
Get a pointer to the data at the start of the ring buffer.
void fr_ring_buffer_debug(fr_ring_buffer_t *rb, FILE *fp)
Print debug information about the ring buffer.
int fr_ring_buffer_free(fr_ring_buffer_t *rb, size_t size)
Mark data as free,.
int fr_ring_buffer_close(fr_ring_buffer_t *rb)
Close a ring buffer so that no further allocations can take place.
size_t fr_ring_buffer_used(fr_ring_buffer_t *rb)
Get the amount of data used in a ring buffer.
size_t fr_ring_buffer_size(fr_ring_buffer_t *rb)
Get the size of the ring buffer.
uint8_t * fr_ring_buffer_alloc(fr_ring_buffer_t *rb, size_t size)
Mark data as allocated.