xref: /illumos-gate/usr/src/uts/common/sys/stermio.h (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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_STERMIO_H
27 #define	_SYS_STERMIO_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 /*
34  * ioctl commands for control channels
35  */
36 #define	STSTART		1	/* start protocol */
37 #define	STHALT		2	/* cease protocol */
38 #define	STPRINT		3	/* assign device to printer */
39 #define	STENABLE	4	/* enable polling */
40 #define	STDISABLE	5	/* disable polling */
41 #define	STPOLL		6	/* set polling rate */
42 #define	STCNTRS		7	/* poke for status reports */
43 #define	STTCHAN		8	/* set trace channel number */
44 
45 /*
46  * ioctl commands for terminal and printer channels
47  */
48 #define	STGET	(('X'<<8)|0)	/* get line options */
49 #define	STSET	(('X'<<8)|1)	/* set line options */
50 #define	STTHROW	(('X'<<8)|2)	/* throw away queued input */
51 #define	STWLINE	(('X'<<8)|3)	/* get synchronous line # */
52 #define	STTSV	(('X'<<8)|4)	/* get all line information */
53 
54 struct stio {
55 	unsigned short	ttyid;
56 	char		row;
57 	char		col;
58 	char		orow;
59 	char		ocol;
60 	char		tab;
61 	char		aid;
62 	char		ss1;
63 	char		ss2;
64 	unsigned short	imode;
65 	unsigned short	lmode;
66 	unsigned short	omode;
67 };
68 
69 /*
70  *	Mode Definitions.
71  */
72 #define	STFLUSH	00400	/* FLUSH mode; lmode */
73 #define	STWRAP	01000	/* WRAP mode; lmode */
74 #define	STAPPL	02000	/* APPLICATION mode; lmode */
75 
76 struct sttsv {
77 	char	st_major;
78 	short	st_pcdnum;
79 	char	st_devaddr;
80 	int	st_csidev;
81 };
82 
83 struct stcntrs {
84 	char	st_lrc;
85 	char	st_xnaks;
86 	char	st_rnaks;
87 	char	st_xwaks;
88 	char	st_rwaks;
89 	char	st_scc;
90 };
91 
92 /* trace message definitions */
93 
94 #define	LOC	113	/* loss of carrier */
95 
96 #ifdef	__cplusplus
97 }
98 #endif
99 
100 #endif	/* _SYS_STERMIO_H */
101