iobuf Struct Reference
iobuf: I/O Buffer Management

`#include <iobuf_common.h>`

## Data Fields

int | fd
char * | buffer
unsigned | bufsize
unsigned | buflen
unsigned | bufstart
unsigned | offset
unsigned | timeout
unsigned | flags
int | errnum

## Detailed Description

The base I/O buffer structure.

## Field Documentation

## buffer

char* iobuf::buffer

The buffer memory.

Referenced by ibuf_copytofd(), ibuf_getc(), ibuf_gets(), ibuf_getstr(), ibuf_peek(), ibuf_read(), ibuf_read_large(), ibuf_readall(), ibuf_refill(), iobuf_close(), iobuf_copy(), iobuf_init(), obuf_copyfromfd(), obuf_flush(), obuf_putc(), and obuf_write().

## buflen

unsigned iobuf::buflen

Length of the data in the buffer.

Referenced by ibuf_copytofd(), ibuf_eof(), ibuf_getc(), ibuf_gets(), ibuf_getstr(), ibuf_peek(), ibuf_read(), ibuf_read_large(), ibuf_readall(), ibuf_refill(), ibuf_seek(), ibuf_tell(), iobuf_copy(), obuf_copyfromfd(), obuf_flush(), obuf_putc(), obuf_seek(), and obuf_write().

## bufsize

unsigned iobuf::bufsize

Total buffer size.

Referenced by ibuf_read(), ibuf_refill(), iobuf_close(), iobuf_init(), obuf_copyfromfd(), obuf_putc(), and obuf_write().

## bufstart

unsigned iobuf::bufstart

Start of the data in the buffer.

Referenced by ibuf_copytofd(), ibuf_eof(), ibuf_getc(), ibuf_gets(), ibuf_getstr(), ibuf_peek(), ibuf_read(), ibuf_read_large(), ibuf_readall(), ibuf_refill(), ibuf_seek(), ibuf_tell(), iobuf_copy(), and obuf_flush().

## errnum

int iobuf::errnum

Saved errno flag.

Referenced by ibuf_getnetstring(), and obuf_seek().

## fd

int iobuf::fd

File descriptor being buffered.

Referenced by ibuf_read_large(), ibuf_refill(), ibuf_seek(), iobuf_close(), iobuf_init(), iobuf_timeout(), obuf_flush(), obuf_seek(), obuf_sync(), and obuf_write_large().

## flags

unsigned iobuf::flags

Status flags.

Referenced by ibuf_eof(), ibuf_read_large(), ibuf_refill(), ibuf_seek(), iobuf_close(), iobuf_init(), iobuf_timeout(), and obuf_seek().

## offset

unsigned iobuf::offset

Current file read/write offset.

Referenced by ibuf_read_large(), ibuf_refill(), ibuf_seek(), ibuf_tell(), obuf_flush(), obuf_seek(), and obuf_write_large().

## timeout

unsigned iobuf::timeout

I/O timeout in ms (`0` for no timeout).

Referenced by ibuf_read_large(), ibuf_refill(), iobuf_timeout(), obuf_flush(), and obuf_write_large().

The documentation for this struct was generated from the following file:

- iobuf_common.h