1: /*
2: * ioctl definitions, and special character and local tty definitions
3: */
4: #ifndef _IOCTL_
5: #define _IOCTL_
6: struct tchars {
7: char t_intrc; /* interrupt */
8: char t_quitc; /* quit */
9: char t_startc; /* start output */
10: char t_stopc; /* stop output */
11: char t_eofc; /* end-of-file */
12: char t_brkc; /* input delimiter (like nl) */
13: };
14: struct ltchars {
15: char t_suspc; /* stop process signal */
16: char t_dsuspc; /* delayed stop process signal */
17: char t_rprntc; /* reprint line */
18: char t_flushc; /* flush output (toggles) */
19: char t_werasc; /* word erase */
20: char t_lnextc; /* literal next character */
21: };
22:
23: /*
24: * local mode settings
25: */
26: #define LCRTBS 0000001 /* correct backspacing for crt */
27: #define LPRTERA 0000002 /* printing terminal \ ... / erase */
28: #define LCRTERA 0000004 /* do " \b " to wipe out character */
29: #define LTILDE 0000010 /* IIASA - hazeltine tilde kludge */
30: #define LMDMBUF 0000020 /* IIASA - start/stop output on carrier intr */
31: #define LLITOUT 0000040 /* IIASA - suppress any output translations */
32: #define LTOSTOP 0000100 /* send stop for any background tty output */
33: #define LFLUSHO 0000200 /* flush output sent to terminal */
34: #define LNOHANG 0000400 /* IIASA - don't send hangup on carrier drop */
35: #define LETXACK 0001000 /* IIASA - diablo style buffer hacking */
36: #define LCRTKIL 0002000 /* erase whole line on kill with " \b " */
37: #define LINTRUP 0004000 /* interrupt on every input char - SIGTINT */
38: #define LCTLECH 0010000 /* echo control characters as ^X */
39: #define LPENDIN 0020000 /* tp->t_rawq is waiting to be reread */
40: #define LDECCTQ 0040000 /* only ^Q starts after ^S */
41: #define LNOFLSH 0100000 /* don't flush output on signals */
42:
43: /* local mode extension (t_xflags) */
44: #ifdef TEXAS_AUTOBAUD
45: #define LIMAGE 01 /* ignoring framing errors for autobauding */
46: #endif
47:
48: /* local state */
49: #define LSBKSL 01 /* state bit for lowercase backslash work */
50: #define LSQUOT 02 /* last character input was \ */
51: #define LSERASE 04 /* within a \.../ for LPRTRUB */
52: #define LSLNCH 010 /* next character is literal */
53: #define LSTYPEN 020 /* retyping suspended input (LPENDIN) */
54: #define LSCNTTB 040 /* counting width of tab; leave LFLUSHO alone */
55:
56: /*
57: * tty ioctl commands
58: */
59: #define TIOCGETD (('t'<<8)|0) /* get line discipline */
60: #define TIOCSETD (('t'<<8)|1) /* set line discipline */
61: #define TIOCHPCL (('t'<<8)|2) /* set hangup line on close bit */
62: #define TIOCMODG (('t'<<8)|3) /* modem bits get (???) */
63: #define TIOCMODS (('t'<<8)|4) /* modem bits set (???) */
64: #define TIOCGETP (('t'<<8)|8) /* get parameters - like old gtty */
65: #define TIOCSETP (('t'<<8)|9) /* set parameters - like old stty */
66: #define TIOCSETN (('t'<<8)|10) /* set params w/o flushing buffers */
67: #define TIOCEXCL (('t'<<8)|13) /* set exclusive use of tty */
68: #define TIOCNXCL (('t'<<8)|14) /* reset exclusive use of tty */
69: #define TIOCFLUSH (('t'<<8)|16) /* flush buffers */
70: #define TIOCSETC (('t'<<8)|17) /* set special characters */
71: #define TIOCGETC (('t'<<8)|18) /* get special characters */
72: #define TIOCIOANS (('t'<<8)|20)
73: #define TIOCSIGNAL (('t'<<8)|21)
74: #define TIOCUTTY (('t'<<8)|22)
75: /* locals, from 127 down */
76: #define TIOCLBIS (('t'<<8)|127) /* bis local mode bits */
77: #define TIOCLBIC (('t'<<8)|126) /* bic local mode bits */
78: #define TIOCLSET (('t'<<8)|125) /* set entire local mode word */
79: #define TIOCLGET (('t'<<8)|124) /* get local modes */
80: #define TIOCSBRK (('t'<<8)|123) /* set break bit */
81: #define TIOCCBRK (('t'<<8)|122) /* clear break bit */
82: #define TIOCSDTR (('t'<<8)|121) /* set data terminal ready */
83: #define TIOCCDTR (('t'<<8)|120) /* clear data terminal ready */
84: #define TIOCGPGRP (('t'<<8)|119) /* get pgrp of tty */
85: #define TIOCSPGRP (('t'<<8)|118) /* set pgrp of tty */
86: #define TIOCSLTC (('t'<<8)|117) /* set local special characters */
87: #define TIOCGLTC (('t'<<8)|116) /* get local special characters */
88: #define TIOCOUTQ (('t'<<8)|115) /* number of chars in output queue */
89: #define TIOCSTI (('t'<<8)|114) /* simulate a terminal input character*/
90: #define TIOCNOTTY (('t'<<8)|113) /* get rid of tty association */
91: #define TIOCPKT (('t'<<8)|112) /* on pty: set/clear packet mode */
92: #define TIOCPKT_DATA 0x00 /* data packet */
93: #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
94: #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
95: #define TIOCPKT_STOP 0x04 /* stop output */
96: #define TIOCPKT_START 0x08 /* start output */
97: #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
98: #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
99: #define TIOCSTOP (('t'<<8)|111) /* stop output, like ^S */
100: #define TIOCSTART (('t'<<8)|110) /* start output, like ^Q */
101: #define TIOCMSET (('t'<<8)|109) /* set all modem bits */
102: #define TIOCMBIS (('t'<<8)|108) /* bis modem bits */
103: #define TIOCMBIC (('t'<<8)|107) /* bic modem bits */
104: #define TIOCMGET (('t'<<8)|106) /* get all modem bits */
105: #define TIOCREMOTE (('t'<<8)|105) /* remote input editing */
106: #ifdef TEXAS_AUTOBAUD
107: #define TIOCSIMG (('t'<<8)|104) /* set image mode */
108: #define TIOCCIMG (('t'<<8)|103) /* clear image mode */
109: #endif
110:
111: #define OTTYDISC 0 /* old, v7 std tty driver */
112: #define NTTYDISC 1 /* new tty discipline */
113: #define NETLDISC 2 /* line discip for berk net */
114: #ifdef OLDTTY
115: # define DFLT_LDISC OTTYDISC /* default disc. on initial open */
116: #else
117: # define DFLT_LDISC NTTYDISC /* default disc. on initial open */
118: #endif
119:
120: #define FIOCLEX (('f'<<8)|1)
121: #define FIONCLEX (('f'<<8)|2)
122: /* another local */
123: #define FIONREAD (('f'<<8)|127) /* get # bytes to read */
124:
125: #ifdef UCB_NET
126: #define FIONBIO (('f'<<8)|126)
127: #define FIOASYNC (('f'<<8)|125)
128: #define SIOCDONE (('s'<<8)|0) /* shutdown read/write on socket */
129: #define SIOCSKEEP (('s'<<8)|1) /* set keep alive */
130: #define SIOCGKEEP (('s'<<8)|2) /* inspect keep alive */
131: #define SIOCSLINGER (('s'<<8)|3) /* set linger time */
132: #define SIOCGLINGER (('s'<<8)|4) /* get linger time */
133: #define SIOCSENDOOB (('s'<<8)|5) /* send out of band */
134: #define SIOCRCVOOB (('s'<<8)|6) /* get out of band */
135: #define SIOCATMARK (('s'<<8)|7) /* at out of band mark? */
136: #define SIOCSPGRP (('s'<<8)|8) /* set process group */
137: #define SIOCGPGRP (('s'<<8)|9) /* get process group */
138: #define SIOCADDRT (('s'<<8)|10) /* add a routing table entry */
139: #define SIOCDELRT (('s'<<8)|11) /* delete a routing table entry */
140: #define SIOCCHGRT (('s'<<8)|12) /* change a routing table entry */
141: #endif
142: #endif _IOCTL_
Defined struct's
tchars
defined in line
6; used 14 times
Defined macros
LCRTBS
defined in line
26; used 13 times
LFLUSHO
defined in line
33; used 19 times
- in /usr/src/cmd/stty.c line
107-108(2),
390
- in /usr/src/sys/dev/ttynew.c line
135-141(3),
147,
296,
317,
338,
372,
440,
625,
724,
758-762(2),
837
- in /usr/src/ucb/csh/sh.print.c line
85-86(2)
TIOCGETP
defined in line
64; used 23 times
- in /usr/src/cmd/cu.3451A.c line
219,
829
- in /usr/src/cmd/cu.c line
192,
299,
705
- in /usr/src/cmd/getty.c line
221,
254,
441
- in /usr/src/cmd/remind/send.c line
95
- in /usr/src/cmd/uucp/4.2/conn.c line
403,
679
- in /usr/src/cmd/uucp/DIALUP/conn.c line
406,
682
- in /usr/src/cmd/uucp/cico.c line
167,
449,
541
- in /usr/src/cmd/uucp/conn.c line
406,
682
- in /usr/src/cmd/uucp/dial.c line
147
- in /usr/src/lib/c/gen/stty.c line
17
- in /usr/src/sys/sys/ioctl.c line
35
- in /usr/src/ucb/csh/sh.lex.c line
1135
- in /usr/src/ucb/lpr/src/ulf.c line
189
TIOCSETP
defined in line
65; used 37 times
- in /usr/src/cmd/cu.3451A.c line
266,
327
- in /usr/src/cmd/cu.c line
199,
223,
302,
720
- in /usr/src/cmd/getty.c line
249,
255,
287,
304,
446,
465,
474
- in /usr/src/cmd/remind/send.c line
99,
125
- in /usr/src/cmd/uucp/4.2/conn.c line
406,
682-686(2)
- in /usr/src/cmd/uucp/DIALUP/conn.c line
409,
685-689(2)
- in /usr/src/cmd/uucp/cico.c line
187,
201,
452-454(2),
543
- in /usr/src/cmd/uucp/conn.c line
409,
685-689(2)
- in /usr/src/cmd/uucp/dial.c line
179
- in /usr/src/lib/c/gen/stty.c line
11
- in /usr/src/sys/dev/Others/dc.c line
224
- in /usr/src/sys/dev/Others/rx2.c line
334
- in /usr/src/sys/dev/tty.c line
372,
381
- in /usr/src/sys/sys/ioctl.c line
28
- in /usr/src/ucb/lpr/src/ulf.c line
206
TIOCSTI
defined in line
89; used 13 times
- in /usr/src/ucb/Mail/tty.c line
17,
30,
41,
50,
58,
67,
76,
85,
96,
128,
140-143(2),
174
Usage of this include