Low-level API Reference

Buffer

int buffer_init(buffer_t **buf, unsigned int n_bytes, buffer_type_t type)

Initialize buffer handle.

Parameters
  • buf – address of buffer_t* handle

  • n_bytes – number of bytes to allocate

  • type – buffer type (RING or LINEAR)

Returns

exit code

int buffer_init_ext(buffer_t **buf, unsigned int n_bytes, buffer_type_t type, void *raw_buffer)

Initialize buffer handle with an already-allocated memory area.

Parameters
  • buf – address of buffer_t* handle

  • n_bytes – number of bytes to allocate

  • type – buffer type (RING or LINEAR)

  • raw_buffer – buffer memory location

Returns

exit code

int buffer_delete(buffer_t **buf)

Free buffer memory.

Parameters

buf – address of buffer_t* handle

Returns

exit code

Async Event Loop

int async_loop_init(async_handle_t **h)

Initialize async event loop.

Parameters

h – address of async_handle_t* handle

Returns

exit code

int async_loop_delete(async_handle_t **h)

Delete async event loop.

Parameters

h – address of async_handle_t* handle

Returns

exit code