root / linux-user / x86_64 / termbits.h @ 4118a970
History | View | Annotate | Download (7.7 kB)
1 | 74aa0429 | j_mayer | #define TARGET_NCCS 19 |
---|---|---|---|
2 | 74aa0429 | j_mayer | |
3 | 74aa0429 | j_mayer | typedef unsigned char target_cc_t; |
4 | 74aa0429 | j_mayer | typedef unsigned int target_speed_t; |
5 | 74aa0429 | j_mayer | typedef unsigned int target_tcflag_t; |
6 | 74aa0429 | j_mayer | struct target_termios {
|
7 | 74aa0429 | j_mayer | target_tcflag_t c_iflag; /* input mode flags */
|
8 | 74aa0429 | j_mayer | target_tcflag_t c_oflag; /* output mode flags */
|
9 | 74aa0429 | j_mayer | target_tcflag_t c_cflag; /* control mode flags */
|
10 | 74aa0429 | j_mayer | target_tcflag_t c_lflag; /* local mode flags */
|
11 | 74aa0429 | j_mayer | target_cc_t c_line; /* line discipline */
|
12 | 74aa0429 | j_mayer | target_cc_t c_cc[TARGET_NCCS]; /* control characters */
|
13 | 74aa0429 | j_mayer | }; |
14 | 74aa0429 | j_mayer | |
15 | 74aa0429 | j_mayer | /* c_cc characters */
|
16 | 74aa0429 | j_mayer | #define TARGET_VINTR 0 |
17 | 74aa0429 | j_mayer | #define TARGET_VQUIT 1 |
18 | 74aa0429 | j_mayer | #define TARGET_VERASE 2 |
19 | 74aa0429 | j_mayer | #define TARGET_VKILL 3 |
20 | 74aa0429 | j_mayer | #define TARGET_VEOF 4 |
21 | 74aa0429 | j_mayer | #define TARGET_VTIME 5 |
22 | 74aa0429 | j_mayer | #define TARGET_VMIN 6 |
23 | 74aa0429 | j_mayer | #define TARGET_VSWTC 7 |
24 | 74aa0429 | j_mayer | #define TARGET_VSTART 8 |
25 | 74aa0429 | j_mayer | #define TARGET_VSTOP 9 |
26 | 74aa0429 | j_mayer | #define TARGET_VSUSP 10 |
27 | 74aa0429 | j_mayer | #define TARGET_VEOL 11 |
28 | 74aa0429 | j_mayer | #define TARGET_VREPRINT 12 |
29 | 74aa0429 | j_mayer | #define TARGET_VDISCARD 13 |
30 | 74aa0429 | j_mayer | #define TARGET_VWERASE 14 |
31 | 74aa0429 | j_mayer | #define TARGET_VLNEXT 15 |
32 | 74aa0429 | j_mayer | #define TARGET_VEOL2 16 |
33 | 74aa0429 | j_mayer | |
34 | 74aa0429 | j_mayer | /* c_iflag bits */
|
35 | 74aa0429 | j_mayer | #define TARGET_IGNBRK 0000001 |
36 | 74aa0429 | j_mayer | #define TARGET_BRKINT 0000002 |
37 | 74aa0429 | j_mayer | #define TARGET_IGNPAR 0000004 |
38 | 74aa0429 | j_mayer | #define TARGET_PARMRK 0000010 |
39 | 74aa0429 | j_mayer | #define TARGET_INPCK 0000020 |
40 | 74aa0429 | j_mayer | #define TARGET_ISTRIP 0000040 |
41 | 74aa0429 | j_mayer | #define TARGET_INLCR 0000100 |
42 | 74aa0429 | j_mayer | #define TARGET_IGNCR 0000200 |
43 | 74aa0429 | j_mayer | #define TARGET_ICRNL 0000400 |
44 | 74aa0429 | j_mayer | #define TARGET_IUCLC 0001000 |
45 | 74aa0429 | j_mayer | #define TARGET_IXON 0002000 |
46 | 74aa0429 | j_mayer | #define TARGET_IXANY 0004000 |
47 | 74aa0429 | j_mayer | #define TARGET_IXOFF 0010000 |
48 | 74aa0429 | j_mayer | #define TARGET_IMAXBEL 0020000 |
49 | 74aa0429 | j_mayer | #define TARGET_IUTF8 0040000 |
50 | 74aa0429 | j_mayer | |
51 | 74aa0429 | j_mayer | /* c_oflag bits */
|
52 | 74aa0429 | j_mayer | #define TARGET_OPOST 0000001 |
53 | 74aa0429 | j_mayer | #define TARGET_OLCUC 0000002 |
54 | 74aa0429 | j_mayer | #define TARGET_ONLCR 0000004 |
55 | 74aa0429 | j_mayer | #define TARGET_OCRNL 0000010 |
56 | 74aa0429 | j_mayer | #define TARGET_ONOCR 0000020 |
57 | 74aa0429 | j_mayer | #define TARGET_ONLRET 0000040 |
58 | 74aa0429 | j_mayer | #define TARGET_OFILL 0000100 |
59 | 74aa0429 | j_mayer | #define TARGET_OFDEL 0000200 |
60 | 74aa0429 | j_mayer | #define TARGET_NLDLY 0000400 |
61 | 74aa0429 | j_mayer | #define TARGET_NL0 0000000 |
62 | 74aa0429 | j_mayer | #define TARGET_NL1 0000400 |
63 | 74aa0429 | j_mayer | #define TARGET_CRDLY 0003000 |
64 | 74aa0429 | j_mayer | #define TARGET_CR0 0000000 |
65 | 74aa0429 | j_mayer | #define TARGET_CR1 0001000 |
66 | 74aa0429 | j_mayer | #define TARGET_CR2 0002000 |
67 | 74aa0429 | j_mayer | #define TARGET_CR3 0003000 |
68 | 74aa0429 | j_mayer | #define TARGET_TABDLY 0014000 |
69 | 74aa0429 | j_mayer | #define TARGET_TAB0 0000000 |
70 | 74aa0429 | j_mayer | #define TARGET_TAB1 0004000 |
71 | 74aa0429 | j_mayer | #define TARGET_TAB2 0010000 |
72 | 74aa0429 | j_mayer | #define TARGET_TAB3 0014000 |
73 | 74aa0429 | j_mayer | #define TARGET_XTABS 0014000 |
74 | 74aa0429 | j_mayer | #define TARGET_BSDLY 0020000 |
75 | 74aa0429 | j_mayer | #define TARGET_BS0 0000000 |
76 | 74aa0429 | j_mayer | #define TARGET_BS1 0020000 |
77 | 74aa0429 | j_mayer | #define TARGET_VTDLY 0040000 |
78 | 74aa0429 | j_mayer | #define TARGET_VT0 0000000 |
79 | 74aa0429 | j_mayer | #define TARGET_VT1 0040000 |
80 | 74aa0429 | j_mayer | #define TARGET_FFDLY 0100000 |
81 | 74aa0429 | j_mayer | #define TARGET_FF0 0000000 |
82 | 74aa0429 | j_mayer | #define TARGET_FF1 0100000 |
83 | 74aa0429 | j_mayer | |
84 | 74aa0429 | j_mayer | /* c_cflag bit meaning */
|
85 | 74aa0429 | j_mayer | #define TARGET_CBAUD 0010017 |
86 | 74aa0429 | j_mayer | #define TARGET_B0 0000000 /* hang up */ |
87 | 74aa0429 | j_mayer | #define TARGET_B50 0000001 |
88 | 74aa0429 | j_mayer | #define TARGET_B75 0000002 |
89 | 74aa0429 | j_mayer | #define TARGET_B110 0000003 |
90 | 74aa0429 | j_mayer | #define TARGET_B134 0000004 |
91 | 74aa0429 | j_mayer | #define TARGET_B150 0000005 |
92 | 74aa0429 | j_mayer | #define TARGET_B200 0000006 |
93 | 74aa0429 | j_mayer | #define TARGET_B300 0000007 |
94 | 74aa0429 | j_mayer | #define TARGET_B600 0000010 |
95 | 74aa0429 | j_mayer | #define TARGET_B1200 0000011 |
96 | 74aa0429 | j_mayer | #define TARGET_B1800 0000012 |
97 | 74aa0429 | j_mayer | #define TARGET_B2400 0000013 |
98 | 74aa0429 | j_mayer | #define TARGET_B4800 0000014 |
99 | 74aa0429 | j_mayer | #define TARGET_B9600 0000015 |
100 | 74aa0429 | j_mayer | #define TARGET_B19200 0000016 |
101 | 74aa0429 | j_mayer | #define TARGET_B38400 0000017 |
102 | 74aa0429 | j_mayer | #define TARGET_EXTA B19200
|
103 | 74aa0429 | j_mayer | #define TARGET_EXTB B38400
|
104 | 74aa0429 | j_mayer | #define TARGET_CSIZE 0000060 |
105 | 74aa0429 | j_mayer | #define TARGET_CS5 0000000 |
106 | 74aa0429 | j_mayer | #define TARGET_CS6 0000020 |
107 | 74aa0429 | j_mayer | #define TARGET_CS7 0000040 |
108 | 74aa0429 | j_mayer | #define TARGET_CS8 0000060 |
109 | 74aa0429 | j_mayer | #define TARGET_CSTOPB 0000100 |
110 | 74aa0429 | j_mayer | #define TARGET_CREAD 0000200 |
111 | 74aa0429 | j_mayer | #define TARGET_PARENB 0000400 |
112 | 74aa0429 | j_mayer | #define TARGET_PARODD 0001000 |
113 | 74aa0429 | j_mayer | #define TARGET_HUPCL 0002000 |
114 | 74aa0429 | j_mayer | #define TARGET_CLOCAL 0004000 |
115 | 74aa0429 | j_mayer | #define TARGET_CBAUDEX 0010000 |
116 | 74aa0429 | j_mayer | #define TARGET_BOTHER 0010000 /* non standard rate */ |
117 | 74aa0429 | j_mayer | #define TARGET_B57600 0010001 |
118 | 74aa0429 | j_mayer | #define TARGET_B115200 0010002 |
119 | 74aa0429 | j_mayer | #define TARGET_B230400 0010003 |
120 | 74aa0429 | j_mayer | #define TARGET_B460800 0010004 |
121 | 74aa0429 | j_mayer | #define TARGET_B500000 0010005 |
122 | 74aa0429 | j_mayer | #define TARGET_B576000 0010006 |
123 | 74aa0429 | j_mayer | #define TARGET_B921600 0010007 |
124 | 74aa0429 | j_mayer | #define TARGET_B1000000 0010010 |
125 | 74aa0429 | j_mayer | #define TARGET_B1152000 0010011 |
126 | 74aa0429 | j_mayer | #define TARGET_B1500000 0010012 |
127 | 74aa0429 | j_mayer | #define TARGET_B2000000 0010013 |
128 | 74aa0429 | j_mayer | #define TARGET_B2500000 0010014 |
129 | 74aa0429 | j_mayer | #define TARGET_B3000000 0010015 |
130 | 74aa0429 | j_mayer | #define TARGET_B3500000 0010016 |
131 | 74aa0429 | j_mayer | #define TARGET_B4000000 0010017 |
132 | 74aa0429 | j_mayer | #define TARGET_CIBAUD 002003600000 /* input baud rate */ |
133 | 74aa0429 | j_mayer | #define TARGET_CMSPAR 010000000000 /* mark or space (stick) parity */ |
134 | 74aa0429 | j_mayer | #define TARGET_CRTSCTS 020000000000 /* flow control */ |
135 | 74aa0429 | j_mayer | |
136 | 74aa0429 | j_mayer | #define TARGET_IBSHIFT 8 /* Shift from CBAUD to CIBAUD */ |
137 | 74aa0429 | j_mayer | |
138 | 74aa0429 | j_mayer | /* c_lflag bits */
|
139 | 74aa0429 | j_mayer | #define TARGET_ISIG 0000001 |
140 | 74aa0429 | j_mayer | #define TARGET_ICANON 0000002 |
141 | 74aa0429 | j_mayer | #define TARGET_XCASE 0000004 |
142 | 74aa0429 | j_mayer | #define TARGET_ECHO 0000010 |
143 | 74aa0429 | j_mayer | #define TARGET_ECHOE 0000020 |
144 | 74aa0429 | j_mayer | #define TARGET_ECHOK 0000040 |
145 | 74aa0429 | j_mayer | #define TARGET_ECHONL 0000100 |
146 | 74aa0429 | j_mayer | #define TARGET_NOFLSH 0000200 |
147 | 74aa0429 | j_mayer | #define TARGET_TOSTOP 0000400 |
148 | 74aa0429 | j_mayer | #define TARGET_ECHOCTL 0001000 |
149 | 74aa0429 | j_mayer | #define TARGET_ECHOPRT 0002000 |
150 | 74aa0429 | j_mayer | #define TARGET_ECHOKE 0004000 |
151 | 74aa0429 | j_mayer | #define TARGET_FLUSHO 0010000 |
152 | 74aa0429 | j_mayer | #define TARGET_PENDIN 0040000 |
153 | 74aa0429 | j_mayer | #define TARGET_IEXTEN 0100000 |
154 | 74aa0429 | j_mayer | |
155 | 74aa0429 | j_mayer | /* tcflow() and TCXONC use these */
|
156 | 74aa0429 | j_mayer | #define TARGET_TCOOFF 0 |
157 | 74aa0429 | j_mayer | #define TARGET_TCOON 1 |
158 | 74aa0429 | j_mayer | #define TARGET_TCIOFF 2 |
159 | 74aa0429 | j_mayer | #define TARGET_TCION 3 |
160 | 74aa0429 | j_mayer | |
161 | 74aa0429 | j_mayer | /* tcflush() and TCFLSH use these */
|
162 | 74aa0429 | j_mayer | #define TARGET_TCIFLUSH 0 |
163 | 74aa0429 | j_mayer | #define TARGET_TCOFLUSH 1 |
164 | 74aa0429 | j_mayer | #define TARGET_TCIOFLUSH 2 |
165 | 74aa0429 | j_mayer | |
166 | 74aa0429 | j_mayer | /* tcsetattr uses these */
|
167 | 74aa0429 | j_mayer | #define TARGET_TCSANOW 0 |
168 | 74aa0429 | j_mayer | #define TARGET_TCSADRAIN 1 |
169 | 74aa0429 | j_mayer | #define TARGET_TCSAFLUSH 2 |
170 | 74aa0429 | j_mayer | |
171 | 74aa0429 | j_mayer | #define TARGET_TCGETS 0x5401 |
172 | 74aa0429 | j_mayer | #define TARGET_TCSETS 0x5402 |
173 | 74aa0429 | j_mayer | #define TARGET_TCSETSW 0x5403 |
174 | 74aa0429 | j_mayer | #define TARGET_TCSETSF 0x5404 |
175 | 74aa0429 | j_mayer | #define TARGET_TCGETA 0x5405 |
176 | 74aa0429 | j_mayer | #define TARGET_TCSETA 0x5406 |
177 | 74aa0429 | j_mayer | #define TARGET_TCSETAW 0x5407 |
178 | 74aa0429 | j_mayer | #define TARGET_TCSETAF 0x5408 |
179 | 74aa0429 | j_mayer | #define TARGET_TCSBRK 0x5409 |
180 | 74aa0429 | j_mayer | #define TARGET_TCXONC 0x540A |
181 | 74aa0429 | j_mayer | #define TARGET_TCFLSH 0x540B |
182 | 74aa0429 | j_mayer | #define TARGET_TIOCEXCL 0x540C |
183 | 74aa0429 | j_mayer | #define TARGET_TIOCNXCL 0x540D |
184 | 74aa0429 | j_mayer | #define TARGET_TIOCSCTTY 0x540E |
185 | 74aa0429 | j_mayer | #define TARGET_TIOCGPGRP 0x540F |
186 | 74aa0429 | j_mayer | #define TARGET_TIOCSPGRP 0x5410 |
187 | 74aa0429 | j_mayer | #define TARGET_TIOCOUTQ 0x5411 |
188 | 74aa0429 | j_mayer | #define TARGET_TIOCSTI 0x5412 |
189 | 74aa0429 | j_mayer | #define TARGET_TIOCGWINSZ 0x5413 |
190 | 74aa0429 | j_mayer | #define TARGET_TIOCSWINSZ 0x5414 |
191 | 74aa0429 | j_mayer | #define TARGET_TIOCMGET 0x5415 |
192 | 74aa0429 | j_mayer | #define TARGET_TIOCMBIS 0x5416 |
193 | 74aa0429 | j_mayer | #define TARGET_TIOCMBIC 0x5417 |
194 | 74aa0429 | j_mayer | #define TARGET_TIOCMSET 0x5418 |
195 | 74aa0429 | j_mayer | #define TARGET_TIOCGSOFTCAR 0x5419 |
196 | 74aa0429 | j_mayer | #define TARGET_TIOCSSOFTCAR 0x541A |
197 | 74aa0429 | j_mayer | #define TARGET_FIONREAD 0x541B |
198 | 74aa0429 | j_mayer | #define TARGET_TIOCINQ FIONREAD
|
199 | 74aa0429 | j_mayer | #define TARGET_TIOCLINUX 0x541C |
200 | 74aa0429 | j_mayer | #define TARGET_TIOCCONS 0x541D |
201 | 74aa0429 | j_mayer | #define TARGET_TIOCGSERIAL 0x541E |
202 | 74aa0429 | j_mayer | #define TARGET_TIOCSSERIAL 0x541F |
203 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT 0x5420 |
204 | 74aa0429 | j_mayer | #define TARGET_FIONBIO 0x5421 |
205 | 74aa0429 | j_mayer | #define TARGET_TIOCNOTTY 0x5422 |
206 | 74aa0429 | j_mayer | #define TARGET_TIOCSETD 0x5423 |
207 | 74aa0429 | j_mayer | #define TARGET_TIOCGETD 0x5424 |
208 | 74aa0429 | j_mayer | #define TARGET_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ |
209 | 74aa0429 | j_mayer | #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ |
210 | 74aa0429 | j_mayer | #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ |
211 | 74aa0429 | j_mayer | #define TARGET_TIOCGSID 0x5429 /* Return the session ID of FD */ |
212 | 74aa0429 | j_mayer | #define TARGET_TCGETS2 _IOR('T',0x2A, struct termios2) |
213 | 74aa0429 | j_mayer | #define TARGET_TCSETS2 _IOW('T',0x2B, struct termios2) |
214 | 74aa0429 | j_mayer | #define TARGET_TCSETSW2 _IOW('T',0x2C, struct termios2) |
215 | 74aa0429 | j_mayer | #define TARGET_TCSETSF2 _IOW('T',0x2D, struct termios2) |
216 | 74aa0429 | j_mayer | #define TARGET_TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
217 | 74aa0429 | j_mayer | #define TARGET_TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
218 | 74aa0429 | j_mayer | |
219 | 74aa0429 | j_mayer | #define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
220 | 74aa0429 | j_mayer | #define TARGET_FIOCLEX 0x5451 |
221 | 74aa0429 | j_mayer | #define TARGET_FIOASYNC 0x5452 |
222 | 74aa0429 | j_mayer | #define TARGET_TIOCSERCONFIG 0x5453 |
223 | 74aa0429 | j_mayer | #define TARGET_TIOCSERGWILD 0x5454 |
224 | 74aa0429 | j_mayer | #define TARGET_TIOCSERSWILD 0x5455 |
225 | 74aa0429 | j_mayer | #define TARGET_TIOCGLCKTRMIOS 0x5456 |
226 | 74aa0429 | j_mayer | #define TARGET_TIOCSLCKTRMIOS 0x5457 |
227 | 74aa0429 | j_mayer | #define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
228 | 74aa0429 | j_mayer | #define TARGET_TIOCSERGETLSR 0x5459 /* Get line status register */ |
229 | 74aa0429 | j_mayer | #define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config */ |
230 | 74aa0429 | j_mayer | #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ |
231 | 74aa0429 | j_mayer | |
232 | 74aa0429 | j_mayer | #define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ |
233 | 74aa0429 | j_mayer | #define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
234 | 74aa0429 | j_mayer | #define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ |
235 | 74aa0429 | j_mayer | #define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ |
236 | 74aa0429 | j_mayer | #define TARGET_FIOQSIZE 0x5460 |
237 | 74aa0429 | j_mayer | |
238 | 74aa0429 | j_mayer | /* Used for packet mode */
|
239 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_DATA 0 |
240 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_FLUSHREAD 1 |
241 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_FLUSHWRITE 2 |
242 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_STOP 4 |
243 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_START 8 |
244 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_NOSTOP 16 |
245 | 74aa0429 | j_mayer | #define TARGET_TIOCPKT_DOSTOP 32 |
246 | 74aa0429 | j_mayer | |
247 | 74aa0429 | j_mayer | #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |