|
|
1.1 root 1: /*
2: * teletype-related ioctls
3: */
4:
5: struct sgttyb {
6: char sg_ispeed; /* no longer set/returned by kernel */
7: char sg_ospeed; /* no longer set/returned by kernel */
8: char sg_erase; /* erase character */
9: char sg_kill; /* kill character */
10: short sg_flags; /* mode flags */
11: };
12:
13: /*
14: * Structure for setting and getting tty device parammeters.
15: */
16: struct ttydevb {
17: char ispeed; /* input speed */
18: char ospeed; /* output speed */
19: short flags; /* mode flags */
20: };
21:
22: /*
23: * List of special characters
24: */
25: struct tchars {
26: char t_intrc; /* interrupt */
27: char t_quitc; /* quit */
28: char t_startc; /* start output */
29: char t_stopc; /* stop output */
30: char t_eofc; /* end-of-file */
31: char t_brkc; /* input delimiter (like nl) */
32: };
33:
34: /*
35: * modes in sg_flags
36: */
37: #define TANDEM 01
38: #define CBREAK 02
39: #define LCASE 04
40: #define ECHO 010
41: #define CRMOD 020
42: #define RAW 040
43: /* 0300: former parity bits */
44: #define NLDELAY 001400
45: #define TBDELAY 006000
46: #define XTABS 06000
47: #define CRDELAY 030000
48: #define VTDELAY 040000
49: #define BSDELAY 0100000
50: #define ALLDELAY 0177400
51:
52: /*
53: * Delay algorithms
54: */
55: #define CR0 0
56: #define CR1 010000
57: #define CR2 020000
58: #define CR3 030000
59: #define NL0 0
60: #define NL1 000400
61: #define NL2 001000
62: #define NL3 001400
63: #define TAB0 0
64: #define TAB1 002000
65: #define TAB2 004000
66: #define FF0 0
67: #define FF1 040000
68: #define BS0 0
69: #define BS1 0100000
70:
71: /*
72: * Speeds
73: */
74: #define B0 0
75: #define B50 1
76: #define B75 2
77: #define B110 3
78: #define B134 4
79: #define B150 5
80: #define B200 6
81: #define B300 7
82: #define B600 8
83: #define B1200 9
84: #define B1800 10
85: #define B2400 11
86: #define B4800 12
87: #define B9600 13
88: #define EXTA 14
89: #define EXTB 15
90:
91: /*
92: * device flags
93: */
94:
95: #define F8BIT 040 /* eight-bit path */
96: #define ODDP 0100
97: #define EVENP 0200
98: #define ANYP 0300
99:
100: /*
101: * tty ioctl commands
102: */
103: #define TIOCHPCL (('t'<<8)|2)
104: #define TIOCGETP (('t'<<8)|8)
105: #define TIOCSETP (('t'<<8)|9)
106: #define TIOCSETN (('t'<<8)|10)
107: #define TIOCEXCL (('t'<<8)|13)
108: #define TIOCNXCL (('t'<<8)|14)
109: #define TIOCFLUSH (('t'<<8)|16)
110: #define TIOCSETC (('t'<<8)|17)
111: #define TIOCGETC (('t'<<8)|18)
112: #define TIOCSBRK (('t'<<8)|19)
113: #define TIOCGDEV (('t'<<8)|23) /* get device parameters */
114: #define TIOCSDEV (('t'<<8)|24) /* set device parameters */
115: #define TIOCSPGRP (('t'<<8)|118) /* set pgrp of tty */
116: #define TIOCGPGRP (('t'<<8)|119) /* get pgrp of tty */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.