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