'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH ddi_dki.uio @(#)uio	40.6 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} uio D4DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} uio D4DK "" "DDI/DKI"
.if \nX=2 .ds x} uio D4DK "" "\&"
.if \nX=3 .ds x} uio "" "" "\&"
.TH \*(x}
.IX "\f4uio\fP(D4DK)"
.IX "block I/O, \f4uio\fP(D4DK)"
.SH NAME
\f4uio\f1 \- scatter/gather I/O request structure
.SH SYNOPSIS
\f4#include <sys/uio.h>\f1
.SH DESCRIPTION
A \f4uio\f1 structure describes an I/O request that
can be broken up into different data storage areas (scatter/gather
.IX "scatter/gather I/O"
I/O).  A request is a list of \f4iovec\f1 structures (base/length pairs)
indicating where in user space or kernel space the I/O data is to be
read/written.
.P
The contents of \f4uio\f1 structures passed to the driver through the
entry points should not be written by the driver.  The \f4uiomove\f1(D3D)
function takes care of all overhead related to maintaining the state of the
\f4uio\f1 structure.
.SH STRUCTURE MEMBERS
.TS
lf4p8 2 lf4p8 2 lf4p8.
iovec_t	*uio_iov;	/* pointer to the start of the iovec */
		/* list for the uio structure */
int	uio_iovcnt;	/* the number of iovecs in the list */
off_t	uio_offset;	/* offset into file where data is */
		/* transferred from or to */
short	uio_segflg;	/* identifies the type of I/O transfer: */
		/*    UIO_SYSSPACE:  kernel <-> kernel */
		/*    UIO_USERSPACE: kernel <-> user */
short	uio_fmode;	/* file mode flags (not driver setable) */
daddr_t	uio_limit;	/* ulimit for file (maximum block offset). */
		/* not driver setable */
int	uio_resid;	/* residual count */
.TE
.P
The \f4uio_iov\f1 member is a pointer to the beginning of the
\f4iovec\f1(D4DK)  
list for the \f4uio\f1.  When the \f4uio\f1 structure is passed to the
driver through an entry point, the driver should not set \f4uio_iov\f1.  When
the \f4uio\f1 structure is created by the driver, \f4uio_iov\f1 should be
initialized by the driver and not written to afterward.
.SH SEE ALSO
.na
\f4iovec\f1(D4DK)
.ad
