The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Functions
buf.h File Reference

Binary IO abstractions for buffers. More...

Go to the source code of this file.

Data Structures

struct  fr_bio_buf_t
 

Functions

int fr_bio_buf_alloc (TALLOC_CTX *ctx, fr_bio_buf_t *bio_buf, size_t size)
 
static bool fr_bio_buf_contains (fr_bio_buf_t *bio_buf, void const *buffer)
 
static void fr_bio_buf_init (fr_bio_buf_t *bio_buf, uint8_t *buffer, size_t size)
 
static bool fr_bio_buf_initialized (fr_bio_buf_t const *bio_buf)
 
size_t fr_bio_buf_make_room (fr_bio_buf_t *bio_buf)
 
size_t fr_bio_buf_read (fr_bio_buf_t *bio_buf, void *buffer, size_t size))
 
static void fr_bio_buf_reset (fr_bio_buf_t *bio_buf)
 
static size_t fr_bio_buf_size (fr_bio_buf_t const *bio_buf)
 
static size_t fr_bio_buf_used (fr_bio_buf_t const *bio_buf)
 
static void fr_bio_buf_verify (fr_bio_buf_t const *bio_buf)
 
ssize_t fr_bio_buf_write (fr_bio_buf_t *bio_buf, const void *buffer, size_t size)
 
static int fr_bio_buf_write_alloc (fr_bio_buf_t *bio_buf, size_t size)
 
static uint8_tfr_bio_buf_write_reserve (fr_bio_buf_t *bio_buf, size_t size)
 
static size_t fr_bio_buf_write_room (fr_bio_buf_t const *bio_buf)
 
static void fr_bio_buf_write_undo (fr_bio_buf_t *bio_buf, size_t size)
 

Detailed Description

Binary IO abstractions for buffers.

Id
deae54c1bda80d1163fabb64e8db5e53373a10cb

The fr_bio_buf_t allows readers and writers to use a shared buffer, without overflow.

Definition in file buf.h.


Data Structure Documentation

◆ fr_bio_buf_t

struct fr_bio_buf_t

Definition at line 29 of file buf.h.

Data Fields
uint8_t * end end of the buffer
uint8_t * read where in the buffer reads are taken from
uint8_t * start start of the buffer
uint8_t * write where in the buffer writes are sent to

Function Documentation

◆ fr_bio_buf_alloc()

int fr_bio_buf_alloc ( TALLOC_CTX *  ctx,
fr_bio_buf_t bio_buf,
size_t  size 
)

Definition at line 114 of file buf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_contains()

static bool fr_bio_buf_contains ( fr_bio_buf_t bio_buf,
void const *  buffer 
)
inlinestatic

Definition at line 125 of file buf.h.

+ Here is the caller graph for this function:

◆ fr_bio_buf_init()

static void fr_bio_buf_init ( fr_bio_buf_t bio_buf,
uint8_t buffer,
size_t  size 
)
inlinestatic

Definition at line 37 of file buf.h.

+ Here is the caller graph for this function:

◆ fr_bio_buf_initialized()

static bool fr_bio_buf_initialized ( fr_bio_buf_t const *  bio_buf)
inlinestatic

Definition at line 68 of file buf.h.

+ Here is the caller graph for this function:

◆ fr_bio_buf_make_room()

size_t fr_bio_buf_make_room ( fr_bio_buf_t bio_buf)

Definition at line 28 of file buf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_read()

size_t fr_bio_buf_read ( fr_bio_buf_t bio_buf,
void *  buffer,
size_t  size 
)

Definition at line 45 of file buf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_reset()

static void fr_bio_buf_reset ( fr_bio_buf_t bio_buf)
inlinestatic

Definition at line 61 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_size()

static size_t fr_bio_buf_size ( fr_bio_buf_t const *  bio_buf)
inlinestatic

Definition at line 151 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_used()

static size_t fr_bio_buf_used ( fr_bio_buf_t const *  bio_buf)
inlinestatic

Definition at line 73 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_verify()

static void fr_bio_buf_verify ( fr_bio_buf_t const *  bio_buf)
inlinestatic

Definition at line 50 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_write()

ssize_t fr_bio_buf_write ( fr_bio_buf_t bio_buf,
const void *  buffer,
size_t  size 
)

Definition at line 81 of file buf.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_write_alloc()

static int fr_bio_buf_write_alloc ( fr_bio_buf_t bio_buf,
size_t  size 
)
inlinestatic

Definition at line 98 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_write_reserve()

static uint8_t* fr_bio_buf_write_reserve ( fr_bio_buf_t bio_buf,
size_t  size 
)
inlinestatic

Definition at line 89 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_write_room()

static size_t fr_bio_buf_write_room ( fr_bio_buf_t const *  bio_buf)
inlinestatic

Definition at line 82 of file buf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bio_buf_write_undo()

static void fr_bio_buf_write_undo ( fr_bio_buf_t bio_buf,
size_t  size 
)
inlinestatic

Definition at line 111 of file buf.h.

+ Here is the call graph for this function: