Summary
Performs a mediated write to an IOBuffer region.
Declaration
#include <zircon/syscalls/iob.h>
zx_status_t zx_iob_write(zx_handle_t handle,
zx_iob_write_options_t options,
uint32_t region_index,
const zx_iovec_t* vectors,
size_t num_vectors);
Description
Performs a mediated write to an IOBuffer region.
options
must be zero.
The IOBuffer handle used to interact with the region must admit mediated write access.
There is a limit of 65535 bytes including any headers that the discipline might mandate, and there can be no more than 8 vectors.
Return value
On success, the data is written to the specified region according to the semantics of the discipline.
Errors
ZX_ERR_ACCESS_DENIED
The IOB handle does not have write permissions,
or the corresponding region does not have mediated write permissions.
ZX_ERR_BAD_HANDLE
handle is not a valid handle.
ZX_ERR_INVALID_ARGS
options
was nonzero (there are no non-default options supported at
this time), the amount of data to write exceeds the limit, or the vectors are invalid.
ZX_ERR_IO_DATA_INTEGRITY
The region has been corrupted.
ZX_ERR_NOT_FOUND
A vector is invalid (e.g. points to invalid memory).
ZX_ERR_NO_SPACE
The region has insufficient space to write the message.
ZX_ERR_OUT_OF_RANGE
region_index
exceeded the maximum region index.
ZX_ERR_WRONG_TYPE
The handle is not an IOBuffer handle, or the corresponding region is not
of the required discipline.