No empty .Rs/.Re
[netbsd-mini2440.git] / sys / compat / linux32 / arch / amd64 / linux32_termios.h
blob164fc81fa49d7c5cd44019e8b3d9bcb946d99970
1 /* $NetBSD: linux32_termios.h,v 1.1 2006/02/15 09:31:17 manu Exp $ */
3 /*-
4 * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Emmanuel Dreyfus
17 * 4. The name of the author may not be used to endorse or promote
18 * products derived from this software without specific prior written
19 * permission.
21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
34 #ifndef _AMD64_LINUX32_TERMIOS_H
35 #define _AMD64_LINUX32_TERMIOS_H
37 typedef unsigned char linux32_cc_t;
38 typedef netbsd32_long linux32_speed_t;
39 typedef netbsd32_long linux32_tcflag_t;
41 #define LINUX32_NCC 8
42 #define LINUX32_NCCS 19
44 #define LINUX32_TCGETS _LINUX32_IO('T', 1)
45 #define LINUX32_TCSETS _LINUX32_IO('T', 2)
46 #define LINUX32_TCSETSW _LINUX32_IO('T', 3)
47 #define LINUX32_TCSETSF _LINUX32_IO('T', 4)
48 #define LINUX32_TCGETA _LINUX32_IO('T', 5)
49 #define LINUX32_TCSETA _LINUX32_IO('T', 6)
50 #define LINUX32_TCSETAW _LINUX32_IO('T', 7)
51 #define LINUX32_TCSETAF _LINUX32_IO('T', 8)
52 #define LINUX32_TCSBRK _LINUX32_IO('T', 9)
53 #define LINUX32_TCXONC _LINUX32_IO('T', 10)
54 #define LINUX32_TCFLSH _LINUX32_IO('T', 11)
55 #define LINUX32_TIOCEXCL _LINUX32_IO('T', 12)
56 #define LINUX32_TIOCNXCL _LINUX32_IO('T', 13)
57 #define LINUX32_TIOCSCTTY _LINUX32_IO('T', 14)
58 #define LINUX32_TIOCGPGRP _LINUX32_IO('T', 15)
59 #define LINUX32_TIOCSPGRP _LINUX32_IO('T', 16)
60 #define LINUX32_TIOCOUTQ _LINUX32_IO('T', 17)
61 #define LINUX32_TIOCSTI _LINUX32_IO('T', 18)
62 #define LINUX32_TIOCGWINSZ _LINUX32_IO('T', 19)
63 #define LINUX32_TIOCSWINSZ _LINUX32_IO('T', 20)
64 #define LINUX32_TIOCMGET _LINUX32_IO('T', 21)
65 #define LINUX32_TIOCMBIS _LINUX32_IO('T', 22)
66 #define LINUX32_TIOCMBIC _LINUX32_IO('T', 23)
67 #define LINUX32_TIOCMSET _LINUX32_IO('T', 24)
68 #define LINUX32_TIOCGSOFTCAR _LINUX32_IO('T', 25)
69 #define LINUX32_TIOCSSOFTCAR _LINUX32_IO('T', 26)
70 #define LINUX32_FIONREAD _LINUX32_IO('T', 27)
71 #define LINUX32_TIOCINQ LINUX32_FIONREAD
72 #define LINUX32_TIOCLINUX _LINUX32_IO('T', 28)
73 #define LINUX32_TIOCCONS _LINUX32_IO('T', 29)
74 #define LINUX32_TIOCGSERIAL _LINUX32_IO('T', 30)
75 #define LINUX32_TIOCSSERIAL _LINUX32_IO('T', 31)
76 #define LINUX32_TIOCPKT _LINUX32_IO('T', 32)
77 #define LINUX32_FIONBIO _LINUX32_IO('T', 33)
78 #define LINUX32_TIOCNOTTY _LINUX32_IO('T', 34)
79 #define LINUX32_TIOCSETD _LINUX32_IO('T', 35)
80 #define LINUX32_TIOCGETD _LINUX32_IO('T', 36)
81 #define LINUX32_TCSBRKP _LINUX32_IO('T', 37)
82 #define LINUX32_TIOCTTYGSTRUCT _LINUX32_IO('T', 38)
84 #define LINUX32_TIOCGPTN _LINUX32_IOR('T', 48, unsigned int)
85 #define LINUX32_TIOCSPTLCK _LINUX32_IOW('T', 49, int)
87 #define LINUX32_FIONCLEX _LINUX32_IO('T', 80)
88 #define LINUX32_FIOCLEX _LINUX32_IO('T', 81)
89 #define LINUX32_FIOASYNC _LINUX32_IO('T', 82)
90 #define LINUX32_TIOCSERCONFIG _LINUX32_IO('T', 83)
91 #define LINUX32_TIOCSERGWILD _LINUX32_IO('T', 84)
92 #define LINUX32_TIOCSERSWILD _LINUX32_IO('T', 85)
93 #define LINUX32_TIOCGLCKTRMIOS _LINUX32_IO('T', 86)
94 #define LINUX32_TIOCSLCKTRMIOS _LINUX32_IO('T', 87)
95 #define LINUX32_TIOCSERGSTRUCT _LINUX32_IO('T', 88)
96 #define LINUX32_TIOCSERGETLSR _LINUX32_IO('T', 89)
98 /* linux32_termios c_cc chars: */
99 #define LINUX32_VINTR 0
100 #define LINUX32_VQUIT 1
101 #define LINUX32_VERASE 2
102 #define LINUX32_VKILL 3
103 #define LINUX32_VEOF 4
104 #define LINUX32_VTIME 5
105 #define LINUX32_VMIN 6
106 #define LINUX32_VSWTC 7
107 #define LINUX32_VSTART 8
108 #define LINUX32_VSTOP 9
109 #define LINUX32_VSUSP 10
110 #define LINUX32_VEOL 11
111 #define LINUX32_VREPRINT 12
112 #define LINUX32_VDISCARD 13
113 #define LINUX32_VWERASE 14
114 #define LINUX32_VLNEXT 15
115 #define LINUX32_VEOL2 16
117 /* Old style linux_termio */
118 #define LINUX32_OLD_VINTR LINUX32_VINTR
119 #define LINUX32_OLD_VQUIT LINUX32_VQUIT
120 #define LINUX32_OLD_VERASE LINUX32_VERASE
121 #define LINUX32_OLD_VKILL LINUX32_VKILL
122 #define LINUX32_OLD_VEOF LINUX32_VEOF
123 #define LINUX32_OLD_VMIN LINUX32_VMIN
124 #define LINUX32_OLD_VEOL LINUX32_VEOL
125 #define LINUX32_OLD_VTIME LINUX32_VTIME
126 #define LINUX32_OLD_VEOL2 LINUX32_VEOL2
127 #define LINUX32_OLD_VSWTC LINUX32_VSWTC
129 /* Linux c_iflag masks */
130 #define LINUX32_IGNBRK 0x0000001
131 #define LINUX32_BRKINT 0x0000002
132 #define LINUX32_IGNPAR 0x0000004
133 #define LINUX32_PARMRK 0x0000008
134 #define LINUX32_INPCK 0x0000010
135 #define LINUX32_ISTRIP 0x0000020
136 #define LINUX32_INLCR 0x0000040
137 #define LINUX32_IGNCR 0x0000080
138 #define LINUX32_ICRNL 0x0000100
139 #define LINUX32_IUCLC 0x0000200
140 #define LINUX32_IXON 0x0000400
141 #define LINUX32_IXANY 0x0000800
142 #define LINUX32_IXOFF 0x0001000
143 #define LINUX32_IMAXBEL 0x0002000
145 /* Linux c_oflag masks */
146 #define LINUX32_OPOST 0x0000001
147 #define LINUX32_OLCUC 0x0000002
148 #define LINUX32_ONLCR 0x0000004
149 #define LINUX32_OCRNL 0x0000008
150 #define LINUX32_ONOCR 0x0000010
151 #define LINUX32_ONLRET 0x0000020
152 #define LINUX32_OFILL 0x0000040
153 #define LINUX32_OFDEL 0x0000080
154 #define LINUX32_NLDLY 0x0000100
156 #define LINUX32_NL0 0x0000000
157 #define LINUX32_NL1 0x0000100
158 #define LINUX32_CRDLY 0x0000600
159 #define LINUX32_CR0 0x0000000
160 #define LINUX32_CR1 0x0000200
161 #define LINUX32_CR2 0x0000400
162 #define LINUX32_CR3 0x0000600
163 #define LINUX32_TABDLY 0x0001800
164 #define LINUX32_TAB0 0x0000000
165 #define LINUX32_TAB1 0x0000800
166 #define LINUX32_TAB2 0x0001000
167 #define LINUX32_TAB3 0x0001800
168 #define LINUX32_XTABS 0x0001800
169 #define LINUX32_BSDLY 0x0002000
170 #define LINUX32_BS0 0x0000000
171 #define LINUX32_BS1 0x0002000
172 #define LINUX32_VTDLY 0x0004000
173 #define LINUX32_VT0 0x0000000
174 #define LINUX32_VT1 0x0004000
175 #define LINUX32_FFDLY 0x0008000
176 #define LINUX32_FF0 0x0000000
177 #define LINUX32_FF1 0x0008000
179 /* Linux c_cflag bit masks */
181 #define LINUX32_NSPEEDS 16
182 #define LINUX32_NXSPEEDS 3 /* XXX Add B460800, NXSPEEDS=4 */
184 #define LINUX32_CBAUD 0x0000100f
186 #define LINUX32_B0 0x00000000
187 #define LINUX32_B50 0x00000001
188 #define LINUX32_B75 0x00000002
189 #define LINUX32_B110 0x00000003
190 #define LINUX32_B134 0x00000004
191 #define LINUX32_B150 0x00000005
192 #define LINUX32_B200 0x00000006
193 #define LINUX32_B300 0x00000007
194 #define LINUX32_B600 0x00000008
195 #define LINUX32_B1200 0x00000009
196 #define LINUX32_B1800 0x0000000a
197 #define LINUX32_B2400 0x0000000b
198 #define LINUX32_B4800 0x0000000c
199 #define LINUX32_B9600 0x0000000d
200 #define LINUX32_B19200 0x0000000e
201 #define LINUX32_B38400 0x0000000f
202 #define LINUX32_EXTA LINUX32_B19200
203 #define LINUX32_EXTB LINUX32_B38400
204 #define LINUX32_CBAUDEX 0x00001000
205 #define LINUX32_B57600 0x00001001
206 #define LINUX32_B115200 0x00001002
207 #define LINUX32_B230400 0x00001003
209 #define LINUX32_CSIZE 0x00000030
210 #define LINUX32_CS5 0x00000000
211 #define LINUX32_CS6 0x00000010
212 #define LINUX32_CS7 0x00000020
213 #define LINUX32_CS8 0x00000030
214 #define LINUX32_CSTOPB 0x00000040
215 #define LINUX32_CREAD 0x00000080
216 #define LINUX32_PARENB 0x00000100
217 #define LINUX32_PARODD 0x00000200
218 #define LINUX32_HUPCL 0x00000400
219 #define LINUX32_CLOCAL 0x00000800
221 #define LINUX32_CRTSCTS 0x80000000
223 /* Linux c_lflag masks */
224 #define LINUX32_ISIG 0x00000001
225 #define LINUX32_ICANON 0x00000002
226 #define LINUX32_XCASE 0x00000004
227 #define LINUX32_ECHO 0x00000008
228 #define LINUX32_ECHOE 0x00000010
229 #define LINUX32_ECHOK 0x00000020
230 #define LINUX32_ECHONL 0x00000040
231 #define LINUX32_NOFLSH 0x00000080
232 #define LINUX32_TOSTOP 0x00000100
233 #define LINUX32_ECHOCTL 0x00000200
234 #define LINUX32_ECHOPRT 0x00000400
235 #define LINUX32_ECHOKE 0x00000800
236 #define LINUX32_FLUSHO 0x00001000
237 #define LINUX32_PENDIN 0x00002000
238 #define LINUX32_IEXTEN 0x00008000
240 #endif /* !_AMD64_LINUX32_TERMIOS_H */