Structure defining a libtrace IO reader module. More...
Data Fields | |
const char * | name |
Module name. | |
off_t(* | read )(io_t *io, void *buffer, off_t len) |
Reads from the IO source into the provided buffer. | |
off_t(* | peek )(io_t *io, void *buffer, off_t len) |
Reads from the IO source into the provided buffer but does not advance the read pointer. | |
off_t(* | tell )(io_t *io) |
Returns the current offset of the read pointer for an IO source. | |
off_t(* | seek )(io_t *io, off_t offset, int whence) |
Moves the read pointer for an IO source. | |
void(* | close )(io_t *io) |
Closes an IO reader. |
Structure defining a libtrace IO reader module.
void(* io_source_t::close)(io_t *io) |
Closes an IO reader.
This function should free the IO reader.
io | The IO reader to close |
Referenced by wandio_destroy().
const char* io_source_t::name |
Module name.
Referenced by wandio_peek(), and wandio_read().
off_t(* io_source_t::peek)(io_t *io, void *buffer, off_t len) |
Reads from the IO source into the provided buffer but does not advance the read pointer.
io | The IO reader | |
buffer | The buffer to read into | |
len | The amount of space available in the buffer |
Referenced by wandio_peek().
off_t(* io_source_t::read)(io_t *io, void *buffer, off_t len) |
Reads from the IO source into the provided buffer.
io | The IO reader | |
buffer | The buffer to read into | |
len | The amount of space available in the buffer |
Referenced by wandio_read().
off_t(* io_source_t::seek)(io_t *io, off_t offset, int whence) |
Moves the read pointer for an IO source.
io | The IO reader to move the read pointer for | |
offset | The new read pointer offset | |
whence | Where to start counting the new offset from. whence can be one of three values: SEEK_SET, SEEK_CUR and SEEK_END. See the lseek(2) manpage for more details as to what these mean. |
Referenced by wandio_seek().
off_t(* io_source_t::tell)(io_t *io) |
Returns the current offset of the read pointer for an IO source.
io | The IO reader to get the read offset for |
Referenced by wandio_tell().