|
struct GNUNET_BIO_ReadHandle * | GNUNET_BIO_read_open_file (const char *fn) |
| Open a file for reading. More...
|
|
struct GNUNET_BIO_ReadHandle * | GNUNET_BIO_read_open_buffer (void *buffer, size_t size) |
| Create a handle from an existing allocated buffer. More...
|
|
int | GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) |
| Close an open handle. More...
|
|
void | GNUNET_BIO_read_set_error (struct GNUNET_BIO_ReadHandle *h, const char *emsg) |
| Set read error to handle. More...
|
|
static int | read_from_file (struct GNUNET_BIO_ReadHandle *h, const char *what, char *result, size_t len) |
| Function used internally to read the contents of a file into a buffer. More...
|
|
static int | read_from_buffer (struct GNUNET_BIO_ReadHandle *h, const char *what, char *result, size_t len) |
| Function used internally to read the content of a buffer into a buffer. More...
|
|
int | GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what, void *result, size_t len) |
| Read some contents into a buffer. More...
|
|
int | GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what, char **result, size_t max_length) |
| Read 0-terminated string. More...
|
|
int | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, const char *what, float *f) |
| Read a float. More...
|
|
int | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, const char *what, double *f) |
| Read a double. More...
|
|
int | GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, const char *what, int32_t *i) |
| Read an (u)int32_t. More...
|
|
int | GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, const char *what, int64_t *i) |
| Read an (u)int64_t. More...
|
|
struct GNUNET_BIO_WriteHandle * | GNUNET_BIO_write_open_file (const char *fn) |
| Open a file for writing. More...
|
|
struct GNUNET_BIO_WriteHandle * | GNUNET_BIO_write_open_buffer (void) |
| Create a handle backed by an in-memory buffer. More...
|
|
enum GNUNET_GenericReturnValue | GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg) |
| Close an IO handle. More...
|
|
enum GNUNET_GenericReturnValue | GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h) |
| Force a file-based buffered writer to flush its buffer. More...
|
|
enum GNUNET_GenericReturnValue | GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h, char **emsg, void **contents, size_t *size) |
| Get the IO handle's contents. More...
|
|
static enum GNUNET_GenericReturnValue | write_to_file (struct GNUNET_BIO_WriteHandle *h, const char *what, const char *source, size_t len) |
| Function used internally to write the contents of a buffer into a file. More...
|
|
static int | write_to_buffer (struct GNUNET_BIO_WriteHandle *h, const char *what, const char *source, size_t len) |
| Function used internally to write the contents of a buffer to another buffer. More...
|
|
int | GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const char *what, const void *buffer, size_t n) |
| Write a buffer to a handle. More...
|
|
int | GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *what, const char *s) |
| Write a 0-terminated string. More...
|
|
int | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, const char *what, float f) |
| Write a float. More...
|
|
int | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, const char *what, double f) |
| Write a double. More...
|
|
int | GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, const char *what, int32_t i) |
| Write an (u)int32_t. More...
|
|
int | GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, const char *what, int64_t i) |
| Write an (u)int64_t. More...
|
|
static int | read_spec_handler_object (void *cls, struct GNUNET_BIO_ReadHandle *h, const char *what, void *target, size_t target_size) |
| Function used internally to read some bytes from within a read spec. More...
|
|
struct GNUNET_BIO_ReadSpec | GNUNET_BIO_read_spec_object (const char *what, void *result, size_t len) |
| Create the specification to read a certain amount of bytes. More...
|
|
static int | read_spec_handler_string (void *cls, struct GNUNET_BIO_ReadHandle *h, const char *what, void *target, size_t target_size) |
| Function used internally to read a string from within a read spec. More...
|
|
struct GNUNET_BIO_ReadSpec | GNUNET_BIO_read_spec_string (const char *what, char **result, size_t max_length) |
| Create the specification to read a 0-terminated string. More...
|
|
static int | read_spec_handler_int32 (void *cls, struct GNUNET_BIO_ReadHandle *h, const char *what, void *target, size_t target_size) |
| Function used internally to read an (u)int32_t from within a read spec. More...
|
|
struct GNUNET_BIO_ReadSpec | GNUNET_BIO_read_spec_int32 (const char *what, int32_t *i) |
| Create the specification to read an (u)int32_t. More...
|
|
static int | read_spec_handler_int64 (void *cls, struct GNUNET_BIO_ReadHandle *h, const char *what, void *target, size_t target_size) |
| Function used internally to read an (u)int64_t from within a read spec. More...
|
|
struct GNUNET_BIO_ReadSpec | GNUNET_BIO_read_spec_int64 (const char *what, int64_t *i) |
| Create the specification to read an (u)int64_t. More...
|
|
struct GNUNET_BIO_ReadSpec | GNUNET_BIO_read_spec_float (const char *what, float *f) |
| Create the specification to read a float. More...
|
|
struct GNUNET_BIO_ReadSpec | GNUNET_BIO_read_spec_double (const char *what, double *f) |
| Create the specification to read a double. More...
|
|
int | GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, struct GNUNET_BIO_ReadSpec *rs) |
| Execute the read specifications in order. More...
|
|
static int | write_spec_handler_object (void *cls, struct GNUNET_BIO_WriteHandle *h, const char *what, void *source, size_t source_size) |
| Function used internally to write some bytes from within a write spec. More...
|
|
struct GNUNET_BIO_WriteSpec | GNUNET_BIO_write_spec_object (const char *what, void *source, size_t size) |
| Create the specification to read some bytes. More...
|
|
static int | write_spec_handler_string (void *cls, struct GNUNET_BIO_WriteHandle *h, const char *what, void *source, size_t source_size) |
| Function used internally to write a 0-terminated string from within a write spec. More...
|
|
struct GNUNET_BIO_WriteSpec | GNUNET_BIO_write_spec_string (const char *what, const char *s) |
| Create the specification to write a 0-terminated string. More...
|
|
static int | write_spec_handler_int32 (void *cls, struct GNUNET_BIO_WriteHandle *h, const char *what, void *source, size_t source_size) |
| Function used internally to write an (u)int32_t from within a write spec. More...
|
|
struct GNUNET_BIO_WriteSpec | GNUNET_BIO_write_spec_int32 (const char *what, int32_t *i) |
| Create the specification to write an (u)int32_t. More...
|
|
static int | write_spec_handler_int64 (void *cls, struct GNUNET_BIO_WriteHandle *h, const char *what, void *source, size_t source_size) |
| Function used internally to write an (u)int64_t from within a write spec. More...
|
|
struct GNUNET_BIO_WriteSpec | GNUNET_BIO_write_spec_int64 (const char *what, int64_t *i) |
| Create the specification to write an (u)int64_t. More...
|
|
struct GNUNET_BIO_WriteSpec | GNUNET_BIO_write_spec_float (const char *what, float *f) |
| Create the specification to write a float. More...
|
|
struct GNUNET_BIO_WriteSpec | GNUNET_BIO_write_spec_double (const char *what, double *f) |
| Create the specification to write an double. More...
|
|
int | GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, struct GNUNET_BIO_WriteSpec *ws) |
| Execute the write specifications in order. More...
|
|
functions for buffering IO
- Author
- Christian Grothoff
Definition in file bio.c.