Print this page
Bring back LX zones.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/termios.h
+++ new/usr/src/uts/common/sys/termios.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 22 /* All Rights Reserved */
23 23
24 24
25 25 /*
26 26 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
27 27 */
28 28
29 29 #ifndef _SYS_TERMIOS_H
30 30 #define _SYS_TERMIOS_H
31 31
32 32 #include <sys/feature_tests.h>
33 33
34 34 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
35 35 #include <sys/ttydev.h>
36 36 #include <sys/time.h>
37 37 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
38 38
39 39 #include <sys/types.h>
40 40
41 41 #ifdef __cplusplus
42 42 extern "C" {
43 43 #endif
44 44
45 45 /*
46 46 * _POSIX_VDISABLE has been defined in <sys/termios.h> since the
47 47 * introduction of the header. The POSIX standard, IEEE Std.
48 48 * 1003.1-1988 also required the existence of _POSIX_VDISABLE in
49 49 * this header. Subsequent versions of the IEEE Standard as well
50 50 * as the X/Open specifications required that _POSIX_VDISABLE be
51 51 * defined in <unistd.h> while still allowing for it's existence
52 52 * here. With the introduction of XPG6, _POSIX_VDISABLE can only
53 53 * be defined in <unistd.h>.
54 54 */
55 55 #if !defined(_XPG6) || defined(__EXTENSIONS__)
56 56 #ifndef _POSIX_VDISABLE
57 57 #define _POSIX_VDISABLE 0 /* Disable special character functions */
58 58 #endif
59 59 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
60 60
61 61 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
62 62 #define CTRL(c) ((c)&037)
63 63 #define IBSHIFT 16
64 64 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
65 65
66 66 /* required by termio.h and VCEOF/VCEOL */
67 67 #define _NCC 8
68 68 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
69 69 #define NCC _NCC
70 70 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
71 71
72 72 /* some defines required by POSIX */
73 73 #define NCCS 19
74 74
75 75 /*
76 76 * types defined by POSIX. These are better off in types.h, but
77 77 * the standard says that they have to be in termios.h.
78 78 */
79 79 typedef unsigned int tcflag_t;
80 80 typedef unsigned char cc_t;
81 81 typedef unsigned int speed_t;
82 82
83 83 /*
84 84 * Ioctl control packet
85 85 */
86 86 struct termios {
87 87 tcflag_t c_iflag; /* input modes */
88 88 tcflag_t c_oflag; /* output modes */
89 89 tcflag_t c_cflag; /* control modes */
90 90 tcflag_t c_lflag; /* line discipline modes */
91 91 cc_t c_cc[NCCS]; /* control chars */
92 92 };
93 93
94 94 /*
95 95 * POSIX termios functions
96 96 * These functions get mapped into ioctls.
97 97 */
98 98
99 99 #ifndef _KERNEL
100 100
101 101 #if defined(__STDC__)
102 102
103 103 extern speed_t cfgetospeed(const struct termios *);
104 104 extern int cfsetospeed(struct termios *, speed_t);
105 105 extern speed_t cfgetispeed(const struct termios *);
106 106 extern int cfsetispeed(struct termios *, speed_t);
107 107 extern int tcgetattr(int, struct termios *);
108 108 extern int tcsetattr(int, int, const struct termios *);
109 109 extern int tcsendbreak(int, int);
110 110 extern int tcdrain(int);
111 111 extern int tcflush(int, int);
112 112 extern int tcflow(int, int);
113 113
114 114 #else
115 115
116 116 extern speed_t cfgetospeed();
117 117 extern int cfsetospeed();
118 118 extern speed_t cfgetispeed();
119 119 extern int cfsetispeed();
120 120 extern int tcgetattr();
121 121 extern int tcsetattr();
122 122 extern int tcsendbreak();
123 123 extern int tcdrain();
124 124 extern int tcflush();
125 125 extern int tcflow();
126 126
127 127 #endif /* __STDC__ */
128 128
129 129 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
130 130
131 131 #if defined(__STDC__)
132 132 extern pid_t tcgetsid(int);
133 133 #else
134 134 extern pid_t tcgetsid();
135 135 #endif /* __STDC__ */
136 136
137 137 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
138 138
139 139 #endif
140 140
141 141 /* control characters */
142 142 #define VINTR 0
143 143 #define VQUIT 1
144 144 #define VERASE 2
145 145 #define VKILL 3
146 146 #define VEOF 4
147 147 #define VEOL 5
148 148 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
149 149 #define VEOL2 6
150 150 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
151 151 #define VMIN 4
152 152 #define VTIME 5
153 153 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
154 154 #define VSWTCH 7
155 155 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
156 156 #define VSTART 8
157 157 #define VSTOP 9
158 158 #define VSUSP 10
159 159 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
160 160 #define VDSUSP 11
161 161 #define VREPRINT 12
162 162 #define VDISCARD 13
163 163 #define VWERASE 14
164 164 #define VLNEXT 15
165 165 /* 16 thru 19 reserved for future use */
166 166
167 167 /*
168 168 * control characters form Xenix termio.h
169 169 */
170 170 #define VCEOF NCC /* RESERVED true EOF char (V7 compatability) */
171 171 #define VCEOL (NCC + 1) /* RESERVED true EOL char */
172 172
173 173 #define CNUL 0
174 174 #define CDEL 0177
175 175
176 176 /* S5 default control chars */
177 177 /* CINTR, CERASE and CKILL modified to SunOS traditional values */
178 178 #define CESC '\\'
179 179 #define CINTR CTRL('c')
180 180 #define CQUIT 034 /* FS, cntl | */
181 181 #define CERASE 0177 /* DEL */
182 182 #define CKILL CTRL('u')
183 183 #define CEOT 04
184 184 #define CEOL 0
185 185 #define CEOL2 0
186 186 #define CEOF 04 /* cntl d */
187 187 #define CSTART 021 /* cntl q */
188 188 #define CSTOP 023 /* cntl s */
189 189 #define CSWTCH 032 /* cntl z */
190 190 #define CNSWTCH 0
191 191 #define CSUSP CTRL('z')
192 192 #define CDSUSP CTRL('y')
193 193 #define CRPRNT CTRL('r')
194 194 #define CFLUSH CTRL('o')
195 195 #define CWERASE CTRL('w')
196 196 #define CLNEXT CTRL('v')
197 197 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
198 198
199 199
200 200 /* input modes */
201 201 #define IGNBRK 0000001
202 202 #define BRKINT 0000002
203 203 #define IGNPAR 0000004
204 204 #define PARMRK 0000010
205 205 #define INPCK 0000020
206 206 #define ISTRIP 0000040
207 207 #define INLCR 0000100
208 208 #define IGNCR 0000200
209 209 #define ICRNL 0000400
210 210 #if !defined(_POSIX_C_SOURCE) || \
211 211 (defined(_XOPEN_SOURCE) && !defined(_XPG6)) || \
212 212 defined(__EXTENSIONS__)
213 213 #define IUCLC 0001000
214 214 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
215 215 #define IXON 0002000
216 216 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
217 217 defined(__EXTENSIONS__)
218 218 #define IXANY 0004000
219 219 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
220 220 #define IXOFF 0010000
221 221 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
222 222 #define IMAXBEL 0020000
223 223 #define DOSMODE 0100000 /* for 386 compatibility */
224 224 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
225 225
226 226 /* output modes */
227 227 #define OPOST 0000001
228 228 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
229 229 defined(__EXTENSIONS__)
230 230 #if !defined(_XPG6) || defined(__EXTENSIONS__)
231 231 #define OLCUC 0000002
232 232 #endif
233 233 #define ONLCR 0000004
234 234 #define OCRNL 0000010
235 235 #define ONOCR 0000020
236 236 #define ONLRET 0000040
237 237 #define OFILL 0000100
238 238 #define OFDEL 0000200
239 239 #define NLDLY 0000400
240 240 #define NL0 0
241 241 #define NL1 0000400
242 242 #define CRDLY 0003000
243 243 #define CR0 0
244 244 #define CR1 0001000
245 245 #define CR2 0002000
246 246 #define CR3 0003000
247 247 #define TABDLY 0014000
248 248 #define TAB0 0
249 249 #define TAB1 0004000
250 250 #define TAB2 0010000
251 251 #define TAB3 0014000
252 252 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
253 253 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
254 254 #define XTABS 0014000
255 255 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
256 256 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
257 257 defined(__EXTENSIONS__)
258 258 #define BSDLY 0020000
259 259 #define BS0 0
260 260 #define BS1 0020000
261 261 #define VTDLY 0040000
262 262 #define VT0 0
263 263 #define VT1 0040000
264 264 #define FFDLY 0100000
265 265 #define FF0 0
266 266 #define FF1 0100000
267 267 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
268 268 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
269 269 #define PAGEOUT 0200000
270 270 #define WRAP 0400000
271 271
272 272 /* control modes */
273 273 #define CBAUD 0000017
274 274 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
275 275 #define CSIZE 0000060
276 276 #define CS5 0
277 277 #define CS6 0000020
278 278 #define CS7 0000040
279 279 #define CS8 0000060
280 280 #define CSTOPB 0000100
281 281 #define CREAD 0000200
282 282 #define PARENB 0000400
283 283 #define PARODD 0001000
284 284 #define HUPCL 0002000
285 285 #define CLOCAL 0004000
286 286 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
287 287 #define RCV1EN 0010000
288 288 #define XMT1EN 0020000
289 289 #define LOBLK 0040000
290 290 #define XCLUDE 0100000 /* *V7* exclusive use coming fron XENIX */
291 291 #define CRTSXOFF 010000000000
292 292 #define CRTSCTS 020000000000
293 293 #define CIBAUD 03600000
294 294 #define PAREXT 04000000
295 295 #define CBAUDEXT 010000000
296 296 #define CIBAUDEXT 020000000
297 297
298 298 /*
299 299 * 4.4BSD hardware flow control flags
300 300 */
301 301 #define CRTS_IFLOW 010000000000
302 302 #define CCTS_OFLOW 020000000000
303 303
304 304 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
305 305
306 306 /* line discipline 0 modes */
307 307 #define ISIG 0000001
308 308 #define ICANON 0000002
309 309 #if !defined(_POSIX_C_SOURCE) || \
310 310 (defined(_XOPEN_SOURCE) && !defined(_XPG6)) || \
311 311 defined(__EXTENSIONS__)
312 312 #define XCASE 0000004
313 313 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
314 314 #define ECHO 0000010
315 315 #define ECHOE 0000020
316 316 #define ECHOK 0000040
317 317 #define ECHONL 0000100
318 318 #define NOFLSH 0000200
319 319 #define TOSTOP 0000400
320 320 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
321 321 #define ECHOCTL 0001000
322 322 #define ECHOPRT 0002000
323 323 #define ECHOKE 0004000
324 324 #define DEFECHO 0010000
325 325 #define FLUSHO 0020000
326 326 #define PENDIN 0040000
327 327 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
328 328
329 329 #define IEXTEN 0100000 /* POSIX flag - enable POSIX extensions */
330 330 #define _TIOC ('T'<<8)
331 331
332 332 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
333 333
334 334 #define TIOC _TIOC
335 335
336 336 #define TCGETA (_TIOC|1)
337 337 #define TCSETA (_TIOC|2)
338 338 #define TCSETAW (_TIOC|3)
339 339 #define TCSETAF (_TIOC|4)
340 340 #define TCSBRK (_TIOC|5)
341 341 #define TCXONC (_TIOC|6)
342 342 #define TCFLSH (_TIOC|7)
343 343
344 344 /* Slots reserved for 386/XENIX compatibility - keyboard control */
345 345
346 346 #define TIOCKBON (_TIOC|8)
347 347 #define TIOCKBOF (_TIOC|9)
348 348 #define KBENABLED (_TIOC|10)
349 349
350 350 #ifndef IOCTYPE
351 351 #define IOCTYPE 0xff00
352 352 #endif
353 353
354 354 #define TCDSET (_TIOC|32)
355 355 #define RTS_TOG (_TIOC|33) /* 386 - "RTS" toggle define 8A1 protocol */
356 356
357 357 #define TIOCGWINSZ (_TIOC|104)
358 358 #define TIOCSWINSZ (_TIOC|103)
359 359
360 360 /*
361 361 * Softcarrier ioctls
362 362 */
363 363 #define TIOCGSOFTCAR (_TIOC|105)
364 364 #define TIOCSSOFTCAR (_TIOC|106)
365 365
366 366
367 367 /* termios ioctls */
368 368
369 369 #define TCGETS (_TIOC|13)
↓ open down ↓ |
369 lines elided |
↑ open up ↑ |
370 370 #define TCSETS (_TIOC|14)
371 371 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
372 372 #define TCSANOW (_TIOC|14) /* same as TCSETS */
373 373 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
374 374 #define TCSETSW (_TIOC|15)
375 375 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
376 376 #define TCSADRAIN (_TIOC|15) /* same as TCSETSW */
377 377 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
378 378 #define TCSETSF (_TIOC|16)
379 379
380 + /*
381 + * linux terminal ioctls we need to be aware of
382 + */
383 +#define TIOCSETLD (_TIOC|123) /* set line discipline parms */
384 +#define TIOCGETLD (_TIOC|124) /* get line discipline parms */
385 +
386 +/*
387 + * The VMIN and VTIME and solaris overlap with VEOF and VEOL - This is
388 + * perfectly legal except, linux expects them to be separate. So we keep
389 + * them separately.
390 + */
391 +struct lx_cc {
392 + unsigned char veof; /* veof value */
393 + unsigned char veol; /* veol value */
394 + unsigned char vmin; /* vmin value */
395 + unsigned char vtime; /* vtime value */
396 +};
397 +
380 398 /*
381 399 * NTP PPS ioctls
382 400 */
383 401 #define TIOCGPPS (_TIOC|125)
384 402 #define TIOCSPPS (_TIOC|126)
385 403 #define TIOCGPPSEV (_TIOC|127)
386 404
387 405 /* Argument filled in by TIOCGPPSEV */
388 406 struct ppsclockev {
389 407 struct timeval tv;
390 408 uint_t serial;
391 409 };
392 410
393 411 #if defined(_SYSCALL32)
394 412 struct ppsclockev32 {
395 413 struct timeval32 tv;
396 414 uint32_t serial;
397 415 };
398 416 #endif /* _SYSCALL32 */
399 417
400 418 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
401 419
402 420 #define TCSAFLUSH (_TIOC|16) /* same as TCSETSF */
403 421
404 422 /* termios option flags */
405 423
406 424 #define TCIFLUSH 0 /* flush data received but not read */
407 425 #define TCOFLUSH 1 /* flush data written but not transmitted */
408 426 #define TCIOFLUSH 2 /* flush both data both input and output queues */
409 427
410 428 #define TCOOFF 0 /* suspend output */
411 429 #define TCOON 1 /* restart suspended output */
412 430 #define TCIOFF 2 /* suspend input */
413 431 #define TCION 3 /* restart suspended input */
414 432
415 433 /* TIOC ioctls for BSD, ptys, job control and modem control */
416 434
417 435 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
418 436 #define tIOC ('t'<<8)
419 437 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
420 438
421 439 /* Slots for 386/XENIX compatibility */
422 440 /* BSD includes these ioctls in ttold.h */
423 441
424 442 #ifndef _SYS_TTOLD_H
425 443
426 444 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
427 445 #define TIOCGETD (tIOC|0)
428 446 #define TIOCSETD (tIOC|1)
429 447 #define TIOCHPCL (tIOC|2)
430 448 #define TIOCGETP (tIOC|8)
431 449 #define TIOCSETP (tIOC|9)
432 450 #define TIOCSETN (tIOC|10)
433 451 #define TIOCEXCL (tIOC|13)
434 452 #define TIOCNXCL (tIOC|14)
435 453 #define TIOCFLUSH (tIOC|16)
436 454 #define TIOCSETC (tIOC|17)
437 455 #define TIOCGETC (tIOC|18)
438 456 /*
439 457 * BSD ioctls that are not the same as XENIX are included here.
440 458 * There are also some relevant ioctls from SUN/BSD sys/ttycom.h
441 459 * BSD pty ioctls like TIOCPKT are not supported in SVR4.
442 460 */
443 461
444 462 #define TIOCLBIS (tIOC|127) /* bis local mode bits */
445 463 #define TIOCLBIC (tIOC|126) /* bic local mode bits */
446 464 #define TIOCLSET (tIOC|125) /* set entire local mode word */
447 465 #define TIOCLGET (tIOC|124) /* get local modes */
448 466 #define TIOCSBRK (tIOC|123) /* set break bit */
449 467 #define TIOCCBRK (tIOC|122) /* clear break bit */
450 468 #define TIOCSDTR (tIOC|121) /* set data terminal ready */
451 469 #define TIOCCDTR (tIOC|120) /* clear data terminal ready */
452 470 #define TIOCSLTC (tIOC|117) /* set local special chars */
453 471 #define TIOCGLTC (tIOC|116) /* get local special chars */
454 472 #define TIOCOUTQ (tIOC|115) /* driver output queue size */
455 473 #define TIOCNOTTY (tIOC|113) /* void tty association */
456 474 #define TIOCSCTTY (tIOC|132) /* get a ctty */
457 475 #define TIOCSTOP (tIOC|111) /* stop output, like ^S */
458 476 #define TIOCSTART (tIOC|110) /* start output, like ^Q */
459 477 #define TIOCSILOOP (tIOC|109) /* private to Sun; do not use */
460 478 #define TIOCCILOOP (tIOC|108) /* private to Sun; do not use */
461 479
462 480 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
463 481
464 482 #endif /* end _SYS_TTOLD_H */
465 483
466 484 /* POSIX job control ioctls */
467 485
468 486 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
469 487 #define TIOCGPGRP (tIOC|20) /* get pgrp of tty */
470 488 #define TIOCSPGRP (tIOC|21) /* set pgrp of tty */
471 489 #define TIOCGSID (tIOC|22) /* get session id on ctty */
472 490
473 491 /* Miscellaneous */
474 492 #define TIOCSTI (tIOC|23) /* simulate terminal input */
475 493
476 494 /* Modem control */
477 495 #define TIOCMSET (tIOC|26) /* set all modem bits */
478 496 #define TIOCMBIS (tIOC|27) /* bis modem bits */
479 497 #define TIOCMBIC (tIOC|28) /* bic modem bits */
480 498 #define TIOCMGET (tIOC|29) /* get all modem bits */
481 499 #define TIOCM_LE 0001 /* line enable */
482 500 #define TIOCM_DTR 0002 /* data terminal ready */
483 501 #define TIOCM_RTS 0004 /* request to send */
484 502 #define TIOCM_ST 0010 /* secondary transmit */
485 503 #define TIOCM_SR 0020 /* secondary receive */
486 504 #define TIOCM_CTS 0040 /* clear to send */
487 505 #define TIOCM_CAR 0100 /* carrier detect */
488 506 #define TIOCM_CD TIOCM_CAR
489 507 #define TIOCM_RNG 0200 /* ring */
490 508 #define TIOCM_RI TIOCM_RNG
491 509 #define TIOCM_DSR 0400 /* data set ready */
492 510
493 511 /* pseudo-tty */
494 512
495 513 #define TIOCREMOTE (tIOC|30) /* remote input editing */
496 514 #define TIOCSIGNAL (tIOC|31) /* pty: send signal to slave */
497 515
498 516
499 517 /* Some more 386 xenix stuff */
500 518
501 519 #define LDIOC ('D'<<8)
502 520
503 521 #define LDOPEN (LDIOC|0)
504 522 #define LDCLOSE (LDIOC|1)
505 523 #define LDCHG (LDIOC|2)
506 524 #define LDGETT (LDIOC|8)
507 525 #define LDSETT (LDIOC|9)
508 526
509 527 /* Slots for 386 compatibility */
510 528
511 529 #define LDSMAP (LDIOC|110)
512 530 #define LDGMAP (LDIOC|111)
513 531 #define LDNMAP (LDIOC|112)
514 532 #define LDEMAP (LDIOC|113)
515 533 #define LDDMAP (LDIOC|114)
516 534
517 535 /*
518 536 * These are retained for 386/XENIX compatibility.
519 537 */
520 538
521 539 #define DIOC ('d'<<8)
522 540 #define DIOCGETP (DIOC|8) /* V7 */
523 541 #define DIOCSETP (DIOC|9) /* V7 */
524 542
525 543 /*
526 544 * Returns a non-zero value if there
527 545 * are characters in the input queue.
528 546 *
529 547 * XXX - somebody is confused here. V7 had no such "ioctl", although XENIX may
530 548 * have added it; 4BSD had FIONREAD, which returned the number of characters
531 549 * waiting, and was supposed to work on all descriptors (i.e., every driver
532 550 * should make a stab at implementing it).
533 551 */
534 552 #define FIORDCHK (('f'<<8)|3) /* V7 */
535 553 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
536 554
537 555 /*
538 556 * Speeds
539 557 */
540 558 #define B0 0
541 559 #define B50 1
542 560 #define B75 2
543 561 #define B110 3
544 562 #define B134 4
545 563 #define B150 5
546 564 #define B200 6
547 565 #define B300 7
548 566 #define B600 8
549 567 #define B1200 9
550 568 #define B1800 10
551 569 #define B2400 11
552 570 #define B4800 12
553 571 #define B9600 13
554 572 #define B19200 14
555 573 #define B38400 15
556 574 #define B57600 16
557 575 #define B76800 17
558 576 #define B115200 18
559 577 #define B153600 19
560 578 #define B230400 20
561 579 #define B307200 21
562 580 #define B460800 22
563 581 #define B921600 23
564 582
565 583 #ifndef _SYS_TTOLD_H
566 584
567 585 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
568 586 /* Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ */
569 587 struct winsize {
570 588 unsigned short ws_row; /* rows, in characters */
571 589 unsigned short ws_col; /* columns, in character */
572 590 unsigned short ws_xpixel; /* horizontal size, pixels */
573 591 unsigned short ws_ypixel; /* vertical size, pixels */
574 592 };
575 593 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
576 594
577 595 #endif /* end _SYS_TTOLD_H */
578 596
579 597 #ifdef __cplusplus
580 598 }
581 599 #endif
582 600
583 601 #endif /* _SYS_TERMIOS_H */
↓ open down ↓ |
194 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX