root / lab4 / .minix-src / include / sys / ioctl_compat.h @ 14
History | View | Annotate | Download (6.9 KB)
1 | 13 | up20180614 | /* $NetBSD: ioctl_compat.h,v 1.17 2015/09/06 06:01:02 dholland Exp $ */
|
---|---|---|---|
2 | |||
3 | /*
|
||
4 | * Copyright (c) 1990, 1993
|
||
5 | * The Regents of the University of California. All rights reserved.
|
||
6 | * (c) UNIX System Laboratories, Inc.
|
||
7 | * All or some portions of this file are derived from material licensed
|
||
8 | * to the University of California by American Telephone and Telegraph
|
||
9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||
10 | * the permission of UNIX System Laboratories, Inc.
|
||
11 | *
|
||
12 | * Redistribution and use in source and binary forms, with or without
|
||
13 | * modification, are permitted provided that the following conditions
|
||
14 | * are met:
|
||
15 | * 1. Redistributions of source code must retain the above copyright
|
||
16 | * notice, this list of conditions and the following disclaimer.
|
||
17 | * 2. Redistributions in binary form must reproduce the above copyright
|
||
18 | * notice, this list of conditions and the following disclaimer in the
|
||
19 | * documentation and/or other materials provided with the distribution.
|
||
20 | * 3. Neither the name of the University nor the names of its contributors
|
||
21 | * may be used to endorse or promote products derived from this software
|
||
22 | * without specific prior written permission.
|
||
23 | *
|
||
24 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||
25 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
34 | * SUCH DAMAGE.
|
||
35 | *
|
||
36 | * @(#)ioctl_compat.h 8.4 (Berkeley) 1/21/94
|
||
37 | */
|
||
38 | |||
39 | #if !defined(__minix)
|
||
40 | #ifndef _SYS_IOCTL_COMPAT_H_
|
||
41 | #define _SYS_IOCTL_COMPAT_H_
|
||
42 | |||
43 | #include <sys/ioccom.h> |
||
44 | #include <sys/ttychars.h> |
||
45 | #include <sys/ttydev.h> |
||
46 | |||
47 | struct tchars {
|
||
48 | char t_intrc; /* interrupt */ |
||
49 | char t_quitc; /* quit */ |
||
50 | char t_startc; /* start output */ |
||
51 | char t_stopc; /* stop output */ |
||
52 | char t_eofc; /* end-of-file */ |
||
53 | char t_brkc; /* input delimiter (like nl) */ |
||
54 | }; |
||
55 | |||
56 | struct ltchars {
|
||
57 | char t_suspc; /* stop process signal */ |
||
58 | char t_dsuspc; /* delayed stop process signal */ |
||
59 | char t_rprntc; /* reprint line */ |
||
60 | char t_flushc; /* flush output (toggles) */ |
||
61 | char t_werasc; /* word erase */ |
||
62 | char t_lnextc; /* literal next character */ |
||
63 | }; |
||
64 | |||
65 | /*
|
||
66 | * Structure for TIOCGETP and TIOCSETP ioctls.
|
||
67 | */
|
||
68 | #ifndef _SGTTYB_
|
||
69 | #define _SGTTYB_
|
||
70 | struct sgttyb {
|
||
71 | char sg_ispeed; /* input speed */ |
||
72 | char sg_ospeed; /* output speed */ |
||
73 | char sg_erase; /* erase character */ |
||
74 | char sg_kill; /* kill character */ |
||
75 | short sg_flags; /* mode flags */ |
||
76 | }; |
||
77 | #endif
|
||
78 | |||
79 | #ifdef USE_OLD_TTY
|
||
80 | # undef TIOCGETD
|
||
81 | # define TIOCGETD _IOR('t', 0, int) /* get line discipline */ |
||
82 | # undef TIOCSETD
|
||
83 | # define TIOCSETD _IOW('t', 1, int) /* set line discipline */ |
||
84 | #else
|
||
85 | # define OTIOCGETD _IOR('t', 0, int) /* get line discipline */ |
||
86 | # define OTIOCSETD _IOW('t', 1, int) /* set line discipline */ |
||
87 | #endif
|
||
88 | #define TIOCHPCL _IO('t', 2) /* hang up on last close */ |
||
89 | #define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ |
||
90 | #define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ |
||
91 | #define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/ |
||
92 | #define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ |
||
93 | #define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ |
||
94 | /*
|
||
95 | * The entries marked as termios below, are common and should have the
|
||
96 | * same values.
|
||
97 | */
|
||
98 | #define TANDEM 0x00000001 /* send stopc on out q full */ |
||
99 | #define CBREAK 0x00000002 /* half-cooked mode */ |
||
100 | #define LCASE 0x00000004 /* simulate lower case */ |
||
101 | /* termios ECHO 0x00000008 enable echoing */
|
||
102 | #define CRMOD 0x00000010 /* map \r to \r\n on output */ |
||
103 | #define RAW 0x00000020 /* no i/o processing */ |
||
104 | #define ODDP 0x00000040 /* get/send odd parity */ |
||
105 | #define EVENP 0x00000080 /* get/send even parity */ |
||
106 | #define ANYP 0x000000c0 /* get any parity/send none */ |
||
107 | #define NLDELAY 0x00000300 /* \n delay */ |
||
108 | #define NL0 0x00000000 |
||
109 | #define NL1 0x00000100 /* tty 37 */ |
||
110 | #define NL2 0x00000200 /* vt05 */ |
||
111 | #define NL3 0x00000300 |
||
112 | #define TBDELAY 0x00000c00 /* horizontal tab delay */ |
||
113 | #define TAB0 0x00000000 |
||
114 | #define TAB1 0x00000400 /* tty 37 */ |
||
115 | #define TAB2 0x00000800 |
||
116 | #define XTABS 0x00000c00 /* expand tabs on output */ |
||
117 | #define CRDELAY 0x00003000 /* \r delay */ |
||
118 | #define CR0 0x00000000 |
||
119 | #define CR1 0x00001000 /* tn 300 */ |
||
120 | #define CR2 0x00002000 /* tty 37 */ |
||
121 | #define CR3 0x00003000 /* concept 100 */ |
||
122 | #define VTDELAY 0x00004000 /* vertical tab delay */ |
||
123 | #define FF0 0x00000000 |
||
124 | #define FF1 0x00004000 /* tty 37 */ |
||
125 | #define BSDELAY 0x00008000 /* \b delay */ |
||
126 | #define BS0 0x00000000 |
||
127 | #define BS1 0x00008000 |
||
128 | #define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
|
||
129 | #define CRTBS 0x00010000 /* do backspacing for crt */ |
||
130 | #define PRTERA 0x00020000 /* \ ... / erase */ |
||
131 | #define CRTERA 0x00040000 /* " \b " to wipe out char */ |
||
132 | #define TILDE 0x00080000 /* hazeltine tilde kludge */ |
||
133 | /* termios MDMBUF 0x00100000 DTR/DCD hardware flow control */
|
||
134 | #define LITOUT 0x00200000 /* literal output */ |
||
135 | /* termios TOSTOP 0x00400000 stop background jobs on output */
|
||
136 | /* termios FLUSHO 0x00800000 output being flushed (state) */
|
||
137 | #define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */ |
||
138 | #define L001000 0x02000000 |
||
139 | #define CRTKIL 0x04000000 /* kill line with " \b " */ |
||
140 | #define PASS8 0x08000000 |
||
141 | #define CTLECH 0x10000000 /* echo control chars as ^X */ |
||
142 | /* termios PENDIN 0x20000000 re-echo input buffer at next read */
|
||
143 | #define DECCTQ 0x40000000 /* only ^Q starts after ^S */ |
||
144 | /* termios NOFLSH 0x80000000 don't flush output on signal */
|
||
145 | #define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ |
||
146 | #define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ |
||
147 | #define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ |
||
148 | #define TIOCLGET _IOR('t', 124, int) /* get local modes */ |
||
149 | #define LCRTBS (CRTBS>>16) |
||
150 | #define LPRTERA (PRTERA>>16) |
||
151 | #define LCRTERA (CRTERA>>16) |
||
152 | #define LTILDE (TILDE>>16) |
||
153 | #define LMDMBUF (MDMBUF>>16) |
||
154 | #define LLITOUT (LITOUT>>16) |
||
155 | #define LTOSTOP (TOSTOP>>16) |
||
156 | #define LFLUSHO (FLUSHO>>16) |
||
157 | #define LNOHANG (NOHANG>>16) |
||
158 | #define LCRTKIL (CRTKIL>>16) |
||
159 | #define LPASS8 (PASS8>>16) |
||
160 | #define LCTLECH (CTLECH>>16) |
||
161 | #define LPENDIN (PENDIN>>16) |
||
162 | #define LDECCTQ (DECCTQ>>16) |
||
163 | #define LNOFLSH (NOFLSH>>16) |
||
164 | #define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars*/ |
||
165 | #define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars*/ |
||
166 | #define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */ |
||
167 | #define OTTYDISC 0 |
||
168 | #define NETLDISC 1 |
||
169 | #define NTTYDISC 2 |
||
170 | |||
171 | #endif /* !_SYS_IOCTL_COMPAT_H_ */ |
||
172 | #endif /* !defined(__minix) */ |