xref: /illumos-gate/usr/src/head/sgtty.h (revision 99ea293e719ac006d413e4fde6ac0d5cd4dd6c59)
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 /*	Copyright (c) 1988 AT&T	*/
23 /*	  All Rights Reserved	*/
24 
25 
26 #ifndef _SGTTY_H
27 #define	_SGTTY_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 /*
34  * Modes
35  */
36 #define	HUPCL	01
37 #ifndef _SYS_IOCTL_H
38 #define	XTABS	02
39 #define	LCASE	04
40 #define	ECHO	010
41 #define	CRMOD	020
42 #define	RAW	040
43 #define	ODDP	0100
44 #define	EVENP	0200
45 #define	ANYP	0300
46 #define	NLDELAY	001400
47 #define	TBDELAY	002000
48 #define	CRDELAY	030000
49 #define	VTDELAY	040000
50 #define	BSDELAY 0100000
51 #define	ALLDELAY 0177400
52 
53 /*
54  * Delay algorithms
55  */
56 #define	CR0	0
57 #define	CR1	010000
58 #define	CR2	020000
59 #define	CR3	030000
60 #define	NL0	0
61 #define	NL1	000400
62 #define	NL2	001000
63 #define	NL3	001400
64 #define	TAB0	0
65 #define	TAB1	002000
66 #endif /* _SYS_IOCTL_H */
67 #define	NOAL	004000
68 #ifndef _SYS_IOCTL_H
69 #define	FF0	0
70 #define	FF1	040000
71 #define	BS0	0
72 #define	BS1	0100000
73 #endif /* _SYS_IOCTL_H */
74 
75 #ifndef _SYS_TTOLD_H
76 
77 /*
78  * Structure for stty and gtty system calls.
79  */
80 struct sgttyb {
81 	char	sg_ispeed;		/* input speed */
82 	char	sg_ospeed;		/* output speed */
83 	char	sg_erase;		/* erase character */
84 	char	sg_kill;		/* kill character */
85 	int	sg_flags;		/* mode flags */
86 };
87 
88 /* BSD local special chars. Structure for TIOCSLTC/TIOCGLTC */
89 struct ltchars {
90 	char	t_suspc;	/* stop process signal */
91 	char	t_dsuspc;	/* delayed stop process signal */
92 	char	t_rprntc;	/* reprint line */
93 	char	t_flushc;	/* flush output (toggles) */
94 	char	t_werasc;	/* word erase */
95 	char	t_lnextc;	/* literal next character */
96 };
97 
98 /*
99  * Speeds
100  */
101 #define	B0	0
102 #define	B50	1
103 #define	B75	2
104 #define	B110	3
105 #define	B134	4
106 #define	B150	5
107 #define	B200	6
108 #define	B300	7
109 #define	B600	8
110 #define	B1200	9
111 #define	B1800	10
112 #define	B2400	11
113 #define	B4800	12
114 #define	B9600	13
115 #define	EXTA	14
116 #define	EXTB	15
117 
118 /*
119  *	ioctl arguments
120  */
121 #define	FIOCLEX		(('f'<<8)|1)
122 #define	FIONCLEX	(('f'<<8)|2)
123 #define	TIOCHPCL	(('t'<<8)|2)
124 #define	TIOCGETP	(('t'<<8)|8)
125 #define	TIOCSETP	(('t'<<8)|9)
126 #define	TIOCEXCL	(('t'<<8)|13)
127 #define	TIOCNXCL	(('t'<<8)|14)
128 
129 #endif	/* _SYS_TTOLD_H */
130 
131 #ifdef	__cplusplus
132 }
133 #endif
134 
135 #endif	/* _SGTTY_H */
136