1 /* ioctl.h 4.18 82/03/03 */ 2 /* 3 * ioctl definitions, and special character and local tty definitions 4 */ 5 #ifndef _IOCTL_ 6 #define _IOCTL_ 7 struct tchars { 8 char t_intrc; /* interrupt */ 9 char t_quitc; /* quit */ 10 char t_startc; /* start output */ 11 char t_stopc; /* stop output */ 12 char t_eofc; /* end-of-file */ 13 char t_brkc; /* input delimiter (like nl) */ 14 }; 15 struct ltchars { 16 char t_suspc; /* stop process signal */ 17 char t_dsuspc; /* delayed stop process signal */ 18 char t_rprntc; /* reprint line */ 19 char t_flushc; /* flush output (toggles) */ 20 char t_werasc; /* word erase */ 21 char t_lnextc; /* literal next character */ 22 }; 23 24 /* 25 * local mode settings 26 */ 27 #define LCRTBS 0000001 /* correct backspacing for crt */ 28 #define LPRTERA 0000002 /* printing terminal \ ... / erase */ 29 #define LCRTERA 0000004 /* do " \b " to wipe out character */ 30 #define LTILDE 0000010 /* IIASA - hazeltine tilde kludge */ 31 #define LMDMBUF 0000020 /* IIASA - start/stop output on carrier intr */ 32 #define LLITOUT 0000040 /* IIASA - suppress any output translations */ 33 #define LTOSTOP 0000100 /* send stop for any background tty output */ 34 #define LFLUSHO 0000200 /* flush output sent to terminal */ 35 #define LNOHANG 0000400 /* IIASA - don't send hangup on carrier drop */ 36 #define LETXACK 0001000 /* IIASA - diablo style buffer hacking */ 37 #define LCRTKIL 0002000 /* erase whole line on kill with " \b " */ 38 #define L004000 0004000 39 #define LCTLECH 0010000 /* echo control characters as ^X */ 40 #define LPENDIN 0020000 /* tp->t_rawq is waiting to be reread */ 41 #define LDECCTQ 0040000 /* only ^Q starts after ^S */ 42 #define LNOFLSH 0100000 /* dont flush output on signals */ 43 44 /* local state */ 45 #define LSBKSL 01 /* state bit for lowercase backslash work */ 46 #define LSQUOT 02 /* last character input was \ */ 47 #define LSERASE 04 /* within a \.../ for LPRTRUB */ 48 #define LSLNCH 010 /* next character is literal */ 49 #define LSTYPEN 020 /* retyping suspended input (LPENDIN) */ 50 #define LSCNTTB 040 /* counting width of tab; leave LFLUSHO alone */ 51 52 /* modem control */ 53 #define MLE 0001 /* line enable */ 54 #define MDTR 0002 /* data terminal ready */ 55 #define MRTS 0004 /* request to send */ 56 #define MST 0010 /* secondary transmit */ 57 #define MSR 0020 /* secondary receive */ 58 #define MCTS 0040 /* clear to send */ 59 #define MCAR 0100 /* carrier detect */ 60 #define MCD MCAR 61 #define MRNG 0200 /* ring */ 62 #define MRI MRNG 63 #define MDSR 0400 /* data set ready */ 64 65 /* 66 * tty ioctl commands 67 */ 68 #define TIOCGETD (('t'<<8)|0) /* get line discipline */ 69 #define TIOCSETD (('t'<<8)|1) /* set line discipline */ 70 #define TIOCHPCL (('t'<<8)|2) /* set hangup line on close bit */ 71 #define TIOCMODG (('t'<<8)|3) /* modem bits get (???) */ 72 #define TIOCMODS (('t'<<8)|4) /* modem bits set (???) */ 73 #define TIOCGETP (('t'<<8)|8) /* get parameters - like old gtty */ 74 #define TIOCSETP (('t'<<8)|9) /* set parameters - like old stty */ 75 #define TIOCSETN (('t'<<8)|10) /* set params w/o flushing buffers */ 76 #define TIOCEXCL (('t'<<8)|13) /* set exclusive use of tty */ 77 #define TIOCNXCL (('t'<<8)|14) /* reset exclusive use of tty */ 78 #define TIOCFLUSH (('t'<<8)|16) /* flush buffers */ 79 #define TIOCSETC (('t'<<8)|17) /* set special characters */ 80 #define TIOCGETC (('t'<<8)|18) /* get special characters */ 81 #define TIOCIOANS (('t'<<8)|20) 82 #define TIOCSIGNAL (('t'<<8)|21) 83 #define TIOCUTTY (('t'<<8)|22) 84 /* locals, from 127 down */ 85 #define TIOCLBIS (('t'<<8)|127) /* bis local mode bits */ 86 #define TIOCLBIC (('t'<<8)|126) /* bic local mode bits */ 87 #define TIOCLSET (('t'<<8)|125) /* set entire local mode word */ 88 #define TIOCLGET (('t'<<8)|124) /* get local modes */ 89 #define TIOCSBRK (('t'<<8)|123) /* set break bit */ 90 #define TIOCCBRK (('t'<<8)|122) /* clear break bit */ 91 #define TIOCSDTR (('t'<<8)|121) /* set data terminal ready */ 92 #define TIOCCDTR (('t'<<8)|120) /* clear data terminal ready */ 93 #define TIOCGPGRP (('t'<<8)|119) /* get pgrp of tty */ 94 #define TIOCSPGRP (('t'<<8)|118) /* set pgrp of tty */ 95 #define TIOCSLTC (('t'<<8)|117) /* set local special characters */ 96 #define TIOCGLTC (('t'<<8)|116) /* get local special characters */ 97 #define TIOCOUTQ (('t'<<8)|115) /* number of chars in output queue */ 98 #define TIOCSTI (('t'<<8)|114) /* simulate a terminal in character */ 99 #define TIOCNOTTY (('t'<<8)|113) /* get rid of tty association */ 100 #define TIOCPKT (('t'<<8)|112) /* on pty: set/clear packet mode */ 101 #define TIOCPKT_DATA 0 /* data packet */ 102 #define TIOCPKT_FLUSHREAD 1 /* flush packet */ 103 #define TIOCPKT_FLUSHWRITE 2 /* flush packet */ 104 #define TIOCPKT_STOP 4 /* stop output */ 105 #define TIOCPKT_START 8 /* start output */ 106 #define TIOCSTOP (('t'<<8)|111) /* stop output, like ^S */ 107 #define TIOCSTART (('t'<<8)|110) /* start output, like ^Q */ 108 #define TIOCMSET (('t'<<8)|109) /* set all modem bits */ 109 #define TIOCMBIS (('t'<<8)|108) /* bis modem bits */ 110 #define TIOCMBIC (('t'<<8)|107) /* bic modem bits */ 111 #define TIOCMGET (('t'<<8)|106) /* get all modem bits */ 112 #define TIOCREMOTE (('t'<<8)|105) /* remote input editing */ 113 114 #define OTTYDISC 0 /* old, v7 std tty driver */ 115 #define NETLDISC 1 /* line discip for berk net */ 116 #define NTTYDISC 2 /* new tty discipline */ 117 118 #define FIOCLEX (('f'<<8)|1) 119 #define FIONCLEX (('f'<<8)|2) 120 /* another local */ 121 #define FIONREAD (('f'<<8)|127) /* get # bytes to read */ 122 #define FIONBIO (('f'<<8)|126) 123 #define FIOASYNC (('f'<<8)|125) 124 125 #define SIOCDONE (('s'<<8)|0) /* shutdown read/write on socket */ 126 #define SIOCSKEEP (('s'<<8)|1) /* set keep alive */ 127 #define SIOCGKEEP (('s'<<8)|2) /* inspect keep alive */ 128 #define SIOCSLINGER (('s'<<8)|3) /* set linger time */ 129 #define SIOCGLINGER (('s'<<8)|4) /* get linger time */ 130 #define SIOCSENDOOB (('s'<<8)|5) /* send out of band */ 131 #define SIOCRCVOOB (('s'<<8)|6) /* get out of band */ 132 #define SIOCATMARK (('s'<<8)|7) /* at out of band mark? */ 133 #define SIOCSPGRP (('s'<<8)|8) /* set process group */ 134 #define SIOCGPGRP (('s'<<8)|9) /* get process group */ 135 #define SIOCADDRT (('s'<<8)|10) /* add a routing table entry */ 136 #define SIOCDELRT (('s'<<8)|11) /* delete a routing table entry */ 137 #define SIOCCHGRT (('s'<<8)|12) /* change a routing table entry */ 138 #endif 139