home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / uio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.5 KB  |  54 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_UIO_H
  11. #define _SYS_UIO_H
  12.  
  13. #ident    "@(#)/usr/include/sys/uio.h.sl 1.1 4.0 12/08/90 47816 AT&T-USL"
  14.  
  15. /*
  16.  * I/O parameter information.  A uio structure describes the I/O which
  17.  * is to be performed by an operation.  Typically the data movement will
  18.  * be performed by a routine such as uiomove(), which updates the uio
  19.  * structure to reflect what was done.
  20.  */
  21.  
  22. typedef struct iovec {
  23.     caddr_t    iov_base;
  24.     int    iov_len;
  25. } iovec_t;
  26.  
  27. typedef struct uio {
  28.     iovec_t    *uio_iov;    /* pointer to array of iovecs */
  29.     int    uio_iovcnt;    /* number of iovecs */
  30.     off_t    uio_offset;    /* file offset */
  31.     short    uio_segflg;    /* address space (kernel or user) */
  32.     short    uio_fmode;    /* file mode flags */
  33.     daddr_t    uio_limit;    /* u-limit (maximum "block" offset) */
  34.     int    uio_resid;    /* residual count */
  35. } uio_t;
  36.  
  37. /*
  38.  * I/O direction.
  39.  */
  40. typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
  41.  
  42. /*
  43.  * Segment flag values.
  44.  */
  45. typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
  46.  
  47. int    uiomove();
  48. int    ureadc();    /* should be errno_t in future */
  49. int    uwritec();
  50. int    uiomvuio();
  51. void    uioskip();
  52.  
  53. #endif    /* _SYS_UIO_H */
  54.