xref: /illumos-gate/usr/src/uts/common/sys/termio.h (revision 8fd2e913f04a71b9e820a088819d5b3d5205945b)
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) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved	*/
24 
25 
26 #ifndef _SYS_TERMIO_H
27 #define	_SYS_TERMIO_H
28 
29 #include <sys/termios.h>
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /* all the ioctl codes and flags are now in termios.h */
36 
37 /*
38  * Ioctl control packet
39  */
40 struct termio {
41 	unsigned short	c_iflag;	/* input modes */
42 	unsigned short	c_oflag;	/* output modes */
43 	unsigned short	c_cflag;	/* control modes */
44 	unsigned short	c_lflag;	/* line discipline modes */
45 	char	c_line;		/* line discipline */
46 	unsigned char	c_cc[_NCC];	/* control chars */
47 };
48 
49 #define	IOCTYPE	0xff00
50 
51 
52 /*
53  * structure of ioctl arg for LDGETT and LDSETT
54  */
55 struct	termcb	{
56 	char	st_flgs;	/* term flags */
57 	char	st_termt;	/* term type */
58 	char	st_crow;	/* gtty only - current row */
59 	char	st_ccol;	/* gtty only - current col */
60 	char	st_vrow;	/* variable row */
61 	char	st_lrow;	/* last row */
62 };
63 
64 #ifndef u3b15
65 #define	SSPEED	7	/* default speed: 300 baud */
66 #else
67 #define	SSPEED	9	/* default speed: 1200 baud */
68 #endif
69 
70 #ifdef u3b15
71 #define	TTYTYPE (_TIOC|8)
72 #endif
73 #define	TCDSET	(_TIOC|32)
74 
75 /*
76  * Terminal types
77  */
78 #define	TERM_NONE	0	/* tty */
79 #define	TERM_TEC	1	/* TEC Scope */
80 #define	TERM_V61	2	/* DEC VT61 */
81 #define	TERM_V10	3	/* DEC VT100 */
82 #define	TERM_TEX	4	/* Tektronix 4023 */
83 #define	TERM_D40	5	/* TTY Mod 40/1 */
84 #define	TERM_H45	6	/* Hewlitt-Packard 45 */
85 #define	TERM_D42	7	/* TTY Mod 40/2B */
86 
87 /*
88  * Terminal flags
89  */
90 #define	TM_NONE		0000	/* use default flags */
91 #define	TM_SNL		0001	/* special newline flag */
92 #define	TM_ANL		0002	/* auto newline on column 80 */
93 #define	TM_LCF		0004	/* last col of last row special */
94 #define	TM_CECHO	0010	/* echo terminal cursor control */
95 #define	TM_CINVIS	0020	/* do not send esc seq to user */
96 #define	TM_SET		0200	/* must be on to set/res flags */
97 
98 #ifdef	__cplusplus
99 }
100 #endif
101 
102 #endif	/* _SYS_TERMIO_H */
103