Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uio(9s) [osf1 man page]

uio(9s) 																   uio(9s)

NAME
uio - General: Describes I/O, either single vector or multiple vectors SYNOPSIS
----------------------------- Member Name Data Type ----------------------------- uio_iov struct iovec * uio_iovcnt int uio_offset off_t uio_segflg enum uio_seg uio_resid int uio_rw enum uio_rw ----------------------------- MEMBERS
Specifies a pointer to the first iovec structure. The iovec structure has two members: one that specifies the address of the segment and another that specifies the size of the segment. The system allocates contiguous iovec structures for a given transfer. Specifies the num- ber of iovec structures for this transfer. Specifies the offset within the file. Specifies the segment type. This member can be set to one of the following values: UIO_USERSPACE (the segment is from the user data space), UIO_SYSSPACE (the segment is from the system space), or UIO_USERISPACE (the segment is from the user I space). Specifies the number of bytes that still need to be transferred. Specifies whether the transfer is a read or a write. This member is set by read and write system calls according to the corresponding field in the file descriptor. This member can be set to one of the following values: UIO_READ (read transfer), UIO_WRITE (write transfer), or UIO_AIORW (Alpha I/O read/write transfer). DESCRIPTION
The uio data structure describes, either singler-vector or multiple-vector I/O. Typically, kernel modules do not manipulate the members of this data structure. However, the data structure is presented here for the purpose of understanding the uiomove routine, which operates on the members of the uio structure. FILES
SEE ALSO
Routines: uiomove(9r) uio(9s)

Check Out this Related Man Page

uiomove(9F)						   Kernel Functions for Drivers 					       uiomove(9F)

NAME
uiomove - copy kernel data using uio structure SYNOPSIS
#include <sys/types.h> #include <sys/uio.h> int uiomove(caddr_t address, size_t nbytes, enum uio_rw rwflag, uio_t *uio_p); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
address Source/destination kernel address of the copy. nbytes Number of bytes to copy. rwflag Flag indicating read or write operation. Possible values are UIO_READ and UIO_WRITE. uio_p Pointer to the uio structure for the copy. DESCRIPTION
The uiomove() function copies nbytes of data to or from the space defined by the uio structure (described in uio(9S)) and the driver. The uio_segflg member of the uio(9S) structure determines the type of space to or from which the transfer is being made. If it is set to UIO_SYSSPACE, the data transfer is between addresses in the kernel. If it is set to UIO_USERSPACE, the transfer is between a user program and kernel space. rwflag indicates the direction of the transfer. If UIO_READ is set, the data will be transferred from address to the buffer(s) described by uio_p. If UIO_WRITE is set, the data will be transferred from the buffer(s) described by uio_p to address. In addition to moving the data, uiomove() adds the number of bytes moved to the iov_base member of the iovec(9S) structure, decreases the iov_len member, increases the uio_offset member of the uio(9S) structure, and decreases the uio_resid member. This function automatically handles page faults. nbytes does not have to be word-aligned. RETURN VALUES
uiomove() returns 0 upon success or EFAULT on failure. CONTEXT
User context only, if uio_segflg is set to UIO_USERSPACE. User or interrupt context, if uio_segflg is set to UIO_SYSSPACE. SEE ALSO
ureadc(9F), uwritec(9F), iovec(9S), uio(9S) Writing Device Drivers WARNINGS
If uio_segflg is set to UIO_SYSSPACE and address is selected from user space, the system may panic. SunOS 5.10 7 Feb 2003 uiomove(9F)
Man Page