1 /* ioctl.h 4.7 81/03/17 */ 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 LINTRUP 0004000 /* interrupt on every input char - SIGTINT */ 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 43 /* local state */ 44 #define LSBKSL 01 /* state bit for lowercase backslash work */ 45 #define LSQUOT 02 /* last character input was \ */ 46 #define LSERASE 04 /* within a \.../ for LPRTRUB */ 47 #define LSLNCH 010 /* next character is literal */ 48 #define LSTYPEN 020 /* retyping suspended input (LPENDIN) */ 49 #define LSCNTTB 040 /* counting width of tab; leave LFLUSHO alone */ 50 51 /* 52 * tty ioctl commands 53 */ 54 #define TIOCGETD (('t'<<8)|0) /* get line discipline */ 55 #define TIOCSETD (('t'<<8)|1) /* set line discipline */ 56 #define TIOCHPCL (('t'<<8)|2) /* set hangup line on close bit */ 57 #define TIOCMODG (('t'<<8)|3) /* modem bits get (???) */ 58 #define TIOCMODS (('t'<<8)|4) /* modem bits set (???) */ 59 #define TIOCGETP (('t'<<8)|8) /* get parameters - like old gtty */ 60 #define TIOCSETP (('t'<<8)|9) /* set parameters - like old stty */ 61 #define TIOCSETN (('t'<<8)|10) /* set params w/o flushing buffers */ 62 #define TIOCEXCL (('t'<<8)|13) /* set exclusive use of tty */ 63 #define TIOCNXCL (('t'<<8)|14) /* reset exclusive use of tty */ 64 #define TIOCFLUSH (('t'<<8)|16) /* flush buffers */ 65 #define TIOCSETC (('t'<<8)|17) /* set special characters */ 66 #define TIOCGETC (('t'<<8)|18) /* get special characters */ 67 #define TIOCIOANS (('t'<<8)|20) 68 #define TIOCSIGNAL (('t'<<8)|21) 69 #define TIOCUTTY (('t'<<8)|22) 70 /* locals, from 127 down */ 71 #define TIOCLBIS (('t'<<8)|127) /* bis local mode bits */ 72 #define TIOCLBIC (('t'<<8)|126) /* bic local mode bits */ 73 #define TIOCLSET (('t'<<8)|125) /* set entire local mode word */ 74 #define TIOCLGET (('t'<<8)|124) /* get local modes */ 75 #define TIOCSBRK (('t'<<8)|123) /* set break bit */ 76 #define TIOCCBRK (('t'<<8)|122) /* clear break bit */ 77 #define TIOCSDTR (('t'<<8)|121) /* set data terminal ready */ 78 #define TIOCCDTR (('t'<<8)|120) /* clear data terminal ready */ 79 #define TIOCGPGRP (('t'<<8)|119) /* get pgrp of tty */ 80 #define TIOCSPGRP (('t'<<8)|118) /* set pgrp of tty */ 81 #define TIOCSLTC (('t'<<8)|117) /* set local special characters */ 82 #define TIOCGLTC (('t'<<8)|116) /* get local special characters */ 83 #define TIOCOUTQ (('t'<<8)|115) /* number of chars in output queue */ 84 #define TIOCSTI (('t'<<8)|114) /* simulate a terminal in character */ 85 86 #define OTTYDISC 0 /* old, v7 std tty driver */ 87 #define NETLDISC 1 /* line discip for berk net */ 88 #define NTTYDISC 2 /* new tty discipline */ 89 90 #define FIOCLEX (('f'<<8)|1) 91 #define FIONCLEX (('f'<<8)|2) 92 /* another local */ 93 #define FIONREAD (('f'<<8)|127) /* get # bytes to read */ 94 #endif 95