xref: /titanic_51/usr/src/lib/libbc/inc/include/sys/uio.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
3*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
4*7c478bd9Sstevel@tonic-gate  */
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate /*
7*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1982, 1986 Regents of the University of California.
8*7c478bd9Sstevel@tonic-gate  * All rights reserved.  The Berkeley software License Agreement
9*7c478bd9Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
10*7c478bd9Sstevel@tonic-gate  */
11*7c478bd9Sstevel@tonic-gate 
12*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
13*7c478bd9Sstevel@tonic-gate 
14*7c478bd9Sstevel@tonic-gate #ifndef	_sys_uio_h
15*7c478bd9Sstevel@tonic-gate #define	_sys_uio_h
16*7c478bd9Sstevel@tonic-gate 
17*7c478bd9Sstevel@tonic-gate struct	iovec {
18*7c478bd9Sstevel@tonic-gate 	caddr_t	iov_base;
19*7c478bd9Sstevel@tonic-gate 	int	iov_len;
20*7c478bd9Sstevel@tonic-gate };
21*7c478bd9Sstevel@tonic-gate 
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * The uio_seg define below is obsolete and is included only
24*7c478bd9Sstevel@tonic-gate  * for compatibility with previous releases.  New code should
25*7c478bd9Sstevel@tonic-gate  * use the uio_segflg field.
26*7c478bd9Sstevel@tonic-gate  */
27*7c478bd9Sstevel@tonic-gate struct	uio {
28*7c478bd9Sstevel@tonic-gate 	struct	iovec *uio_iov;
29*7c478bd9Sstevel@tonic-gate 	int	uio_iovcnt;
30*7c478bd9Sstevel@tonic-gate 	off_t	uio_offset;
31*7c478bd9Sstevel@tonic-gate 	short	uio_segflg;
32*7c478bd9Sstevel@tonic-gate #define	uio_seg	uio_segflg		/* obsolete */
33*7c478bd9Sstevel@tonic-gate 	short	uio_fmode;		/* careful what you put here, the file
34*7c478bd9Sstevel@tonic-gate 					 * bits that fill this are an int. */
35*7c478bd9Sstevel@tonic-gate 	int	uio_resid;
36*7c478bd9Sstevel@tonic-gate };
37*7c478bd9Sstevel@tonic-gate 
38*7c478bd9Sstevel@tonic-gate enum	uio_rw { UIO_READ, UIO_WRITE };
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate /*
41*7c478bd9Sstevel@tonic-gate  * Segment flag values (should be enum).
42*7c478bd9Sstevel@tonic-gate  *
43*7c478bd9Sstevel@tonic-gate  * The UIOSEG_* defines are obsolete and are included only
44*7c478bd9Sstevel@tonic-gate  * for compatibility with previous releases.  New code should
45*7c478bd9Sstevel@tonic-gate  * use the UIO_* definitions.
46*7c478bd9Sstevel@tonic-gate  */
47*7c478bd9Sstevel@tonic-gate #define	UIO_USERSPACE	0		/* from user data space */
48*7c478bd9Sstevel@tonic-gate #define	UIO_SYSSPACE	1		/* from system space */
49*7c478bd9Sstevel@tonic-gate #define	UIO_USERISPACE	2		/* from user I space */
50*7c478bd9Sstevel@tonic-gate 
51*7c478bd9Sstevel@tonic-gate #define	UIOSEG_USER	0		/* obsolete */
52*7c478bd9Sstevel@tonic-gate #define	UIOSEG_KERNEL	1		/* obsolete */
53*7c478bd9Sstevel@tonic-gate 
54*7c478bd9Sstevel@tonic-gate #endif	/*!_sys_uio_h*/
55