1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License").  You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 1991 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28/*	  All Rights Reserved	*/
29
30#ifndef _SYS_IOCTL_H
31#define	_SYS_IOCTL_H
32
33#ifdef	__cplusplus
34extern "C" {
35#endif
36
37/*
38 *	There are some inherent problems in having a single file
39 *	ioctl.h, with both System V and BSD flags. Introducing
40 *	BSD flags into this file creates compilation problems
41 *	with flags such as ECHO, NL1 etc., if termio.h and ioctl.h
42 *	are included by the same file. Since these two files can
43 *	be only included by System V applications, /usr/inclule/sys/ioctl.h
44 *	will be System V mode and all the BSD flags will be turned off
45 *	using #ifdef BSD_COMP. This file will also exist in
46 *	/usr/ucbinclude/sys/ioctl.h for BSD applications but without the
47 *	BSD flags turned off. System V appliactions can use ioctl.h without
48 *	any changes, System V applications requiring BSD flags should
49 *	-D BSD_COMP when compiling (and be warned about the common
50 *	flags between System V and BSD) and BSD applications should
51 *	use /usr/ucbinclude/sys/ioctl.h.
52 *
53 */
54
55#define	IOCTYPE	0xff00
56
57#define	LIOC	('l'<<8)
58#define	LIOCGETP	(LIOC|1)
59#define	LIOCSETP	(LIOC|2)
60#define	LIOCGETS	(LIOC|5)
61#define	LIOCSETS	(LIOC|6)
62
63#define	DIOC	('d'<<8)
64#define	DIOCGETC	(DIOC|1)
65#define	DIOCGETB	(DIOC|2)
66#define	DIOCSETE	(DIOC|3)
67
68#ifdef	__cplusplus
69}
70#endif
71
72/* BSD related defines */
73
74#ifdef BSD_COMP
75
76#include <sys/ttychars.h>
77#include <sys/ttydev.h>
78#include <sys/ttold.h>
79
80#ifdef	__cplusplus
81extern "C" {
82#endif
83
84#define	TANDEM		O_TANDEM
85#define	CBREAK		O_CBREAK
86#ifndef _SGTTY_H
87#define	LCASE		O_LCASE
88#define	ECHO		O_ECHO
89#define	CRMOD		O_CRMOD
90#define	RAW		O_RAW
91#define	ODDP		O_ODDP
92#define	EVENP		O_EVENP
93#define	ANYP		O_ANYP
94#define	NLDELAY		O_NLDELAY
95#define		NL0		O_NL0
96#define		NL1		O_NL1
97#define		NL2		O_NL2
98#define		NL3		O_NL3
99#define	TBDELAY		O_TBDELAY
100#define		TAB0		O_TAB0
101#define		TAB1		O_TAB1
102#define		TAB2		O_TAB2
103#define	XTABS		O_XTABS
104#define	CRDELAY		O_CRDELAY
105#define		CR0		O_CR0
106#define		CR1		O_CR1
107#define		CR2		O_CR2
108#define		CR3		O_CR3
109#define	VTDELAY		O_VTDELAY
110#define		FF0		O_FF0
111#define		FF1		O_FF1
112#define	BSDELAY		O_BSDELAY
113#define		BS0		O_BS0
114#define		BS1		O_BS1
115#define		ALLDELAY	O_ALLDELAY
116#endif /* _SGTTY_H */
117#define	CRTBS		O_CRTBS
118#define	PRTERA		O_PRTERA
119#define	CRTERA		O_CRTERA
120#define	TILDE		O_TILDE
121#define	MDMBUF		O_MDMBUF
122#define	LITOUT		O_LITOUT
123#define	TOSTOP		O_TOSTOP
124#define	FLUSHO		O_FLUSHO
125#define	NOHANG		O_NOHANG
126#define	L001000		O_L001000
127#define	CRTKIL		O_CRTKIL
128#define	PASS8		O_PASS8
129#define	CTLECH		O_CTLECH
130#define	PENDIN		O_PENDIN
131#define	DECCTQ		O_DECCTQ
132#define	NOFLSH		O_NOFLSH
133
134#ifdef	__cplusplus
135}
136#endif
137
138#include <sys/filio.h>
139#include <sys/sockio.h>
140
141#endif /* BSD_COMP */
142
143#endif	/* _SYS_IOCTL_H */
144