.TH iovec "" "" "DDI/DKI Data Structure"
.PC "DDI/DKI data-storage structure for scatter/gather I/O"
.B "#include <sys/types.h>"
.B "#include <sys/uio.h>"
.PP
The structure
.B iovec
describes a data storage area that is used in a scatter/gather I/O transfer.
The structure
.B uio
controls such a transfer;
it contains a pointer to an array of
.B iovec
structures, each of which describes one hunk of memory to be used in
the transfer.
.PP
The kernel or a driver can create an
.BR iovec .
The rules by which an
.B iovec
is manipulated depend upon its origin \(em and therefore, upon which
entity ``owns'' it.
A driver can set the fields within
.B iovec
structure only for the
.B uio
structures that it has created.
It can, however, read all
.B iovec
structures.
.PP
.B iovec
contains two fields that are available to drivers:
.IP "\fBcaddr_t iov_base;\fR"
The base address of the ``hunk'' of memory.
.IP "\fBint iov_len;\fR"
The size, in bytes, of the ``hunk'' of memory.
.SH "See Also"
.B
data structures,
physiock(),
uio,
uiomove(),
ureadc(),
uwritec()
.R
.SH Notes
No function exists for allocating
.B iovec
structures when a driver needs to create them.
Therefore, a driver can either use
.B kmem_zalloc()
to allocate them, or allocate them statically.
