root/include/asm-mips/ioctls.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef __ASM_MIPS_IOCTLS_H
   2 #define __ASM_MIPS_IOCTLS_H
   3 
   4 #include <asm/ioctl.h>
   5 
   6 #define TCGETA          0x5401
   7 #define TCSETA          0x5402
   8 #define TCSETAW         0x5403
   9 #define TCSETAF         0x5404
  10 
  11 #define TCSBRK          0x5405
  12 #define TCXONC          0x5406
  13 #define TCFLSH          0x5407
  14 
  15 #define TCGETS          0x540d
  16 #define TCSETS          0x540e
  17 #define TCSETSW         0x540f
  18 #define TCSETSF         0x5410
  19 
  20 #define TIOCEXCL        0x740d          /* set exclusive use of tty */
  21 #define TIOCNXCL        0x740e          /* reset exclusive use of tty */
  22 #define TIOCOUTQ        0x7472          /* output queue size */
  23 #define TIOCSTI         0x5472          /* simulate terminal input */
  24 #define TIOCMGET        0x741d          /* get all modem bits */
  25 #define TIOCMBIS        0x741b          /* bis modem bits */
  26 #define TIOCMBIC        0x741c          /* bic modem bits */
  27 #define TIOCMSET        0x741a          /* set all modem bits */
  28 #define TIOCPKT         0x5470          /* pty: set/clear packet mode */
  29 #define         TIOCPKT_DATA            0x00    /* data packet */
  30 #define         TIOCPKT_FLUSHREAD       0x01    /* flush packet */
  31 #define         TIOCPKT_FLUSHWRITE      0x02    /* flush packet */
  32 #define         TIOCPKT_STOP            0x04    /* stop output */
  33 #define         TIOCPKT_START           0x08    /* start output */
  34 #define         TIOCPKT_NOSTOP          0x10    /* no more ^S, ^Q */
  35 #define         TIOCPKT_DOSTOP          0x20    /* now do ^S ^Q */
  36 #if 0
  37 #define         TIOCPKT_IOCTL           0x40    /* state change of pty driver */
  38 #endif
  39 #define TIOCSWINSZ      _IOW('t', 103, struct winsize)  /* set window size */
  40 #define TIOCGWINSZ      _IOR('t', 104, struct winsize)  /* get window size */
  41 #define TIOCNOTTY       0x5471          /* void tty association */
  42 #define TIOCSETD        0x7401
  43 #define TIOCGETD        0x7400
  44 
  45 #define FIOCLEX         0x6601
  46 #define FIONCLEX        0x6602          /* these numbers need to be adjusted. */
  47 #define FIOASYNC        0x667d
  48 #define FIONBIO         0x667e
  49 
  50                                                 /* 116-117 compat */
  51 #define TIOCSPGRP       _IOW('t', 118, int)     /* set pgrp of tty */
  52 #define TIOCGPGRP       _IOR('t', 119, int)     /* get pgrp of tty */
  53 #define TIOCCONS        _IOW('t', 120, int)     /* become virtual console */
  54 
  55 #define FIONREAD        0x467f
  56 #define TIOCINQ         FIONREAD
  57 
  58 #if 0
  59 #define TIOCSETA        _IOW('t', 20, struct termios) /* set termios struct */
  60 #define TIOCSETAW       _IOW('t', 21, struct termios) /* drain output, set */
  61 #define TIOCSETAF       _IOW('t', 22, struct termios) /* drn out, fls in, set */
  62 #define TIOCGETD        _IOR('t', 26, int)      /* get line discipline */
  63 #define TIOCSETD        _IOW('t', 27, int)      /* set line discipline */
  64                                                 /* 127-124 compat */
  65 #endif
  66 
  67 /* I hope the range from 0x5480 on is free ... */
  68 #define TIOCSCTTY       0x5480          /* become controlling tty */
  69 #define TIOCGSOFTCAR    0x5481
  70 #define TIOCSSOFTCAR    0x5482
  71 #define TIOCLINUX       0x5483
  72 #define TIOCGSERIAL     0x5484
  73 #define TIOCSSERIAL     0x5485
  74 
  75 #define TCSBRKP         0x5486  /* Needed for POSIX tcsendbreak() */
  76 #define TIOCTTYGSTRUCT  0x5487  /* For debugging only */
  77 
  78 #define TIOCSERCONFIG   0x5488
  79 #define TIOCSERGWILD    0x5489
  80 #define TIOCSERSWILD    0x548a
  81 #define TIOCGLCKTRMIOS  0x548b
  82 #define TIOCSLCKTRMIOS  0x548c
  83 #define TIOCSERGSTRUCT  0x548d /* For debugging only */
  84 #define TIOCSERGETLSR   0x548e /* Get line status register */
  85 #define TIOCSERGETMULTI 0x548f /* Get multiport config  */
  86 #define TIOCSERSETMULTI 0x5490 /* Set multiport config */
  87 
  88 /* ----------------------------------------------------------------------- */
  89 
  90 /* c_cc characters */
  91 #define VINTR            0              /* Interrupt character [ISIG].  */
  92 #define VQUIT            1              /* Quit character [ISIG].  */
  93 #define VERASE           2              /* Erase character [ICANON].  */
  94 #define VKILL            3              /* Kill-line character [ICANON].  */
  95 #define VEOF             4              /* End-of-file character [ICANON].  */
  96 #define VMIN            VEOF            /* Minimum number of bytes read at once [!ICANON].  */
  97 #define VEOL             5              /* End-of-line character [ICANON].  */
  98 #define VTIME           VEOL            /* Time-out value (tenths of a second) [!ICANON].  */
  99 #if defined (__USE_BSD) || defined (__KERNEL__)
 100 #define VEOL2            6              /* Second EOL character [ICANON].  */
 101 /* The next two are guesses ... */
 102 #define VSWTC            7              /* ??? */
 103 #endif
 104 #define VSWTCH          VSWTC
 105 #define VSTART           8              /* Start (X-ON) character [IXON, IXOFF].  */
 106 #define VSTOP            9              /* Stop (X-OFF) character [IXON, IXOFF].  */
 107 #define VSUSP           10              /* Suspend character [ISIG].  */
 108 #if 0
 109 /*
 110  * VDSUSP is not supported
 111  */
 112 #if defined (__USE_BSD) || defined (__KERNEL__)
 113 #define VDSUSP          11              /* Delayed suspend character [ISIG].  */
 114 #endif
 115 #endif
 116 #if defined (__USE_BSD) || defined (__KERNEL__)
 117 #define VREPRINT        12              /* Reprint-line character [ICANON].  */
 118 #endif
 119 #if defined (__USE_BSD) || defined (__KERNEL__)
 120 #define VDISCARD        13              /* Discard character [IEXTEN].  */
 121 #define VWERASE         14              /* Word-erase character [ICANON].  */
 122 #define VLNEXT          15              /* Literal-next character [IEXTEN].  */
 123 #endif
 124 /*
 125  * 17 - 19 are reserved
 126  */
 127 
 128 #ifdef __KERNEL__
 129 /*
 130  *      intr=^C         quit=^|         erase=del       kill=^U
 131  *      eof=^D          eol=time=\0     eol2=\0         swtc=\0
 132  *      start=^Q        stop=^S         susp=^Z         vdsusp=
 133  *      reprint=^R      discard=^U      werase=^W       lnext=^V
 134  */
 135 #define INIT_C_CC "\003\034\177\025\004\0\0\0\021\023\032\0\022\017\027\026"
 136 #endif
 137 
 138 /* c_iflag bits */
 139 #define IGNBRK  0000001         /* Ignore break condition.  */
 140 #define BRKINT  0000002         /* Signal interrupt on break.  */
 141 #define IGNPAR  0000004         /* Ignore characters with parity errors.  */
 142 #define PARMRK  0000010         /* Mark parity and framing errors.  */
 143 #define INPCK   0000020         /* Enable input parity check.  */
 144 #define ISTRIP  0000040         /* Strip 8th bit off characters.  */
 145 #define INLCR   0000100         /* Map NL to CR on input.  */
 146 #define IGNCR   0000200         /* Ignore CR.  */
 147 #define ICRNL   0000400         /* Map CR to NL on input.  */
 148 #if defined (__USE_BSD) || defined (__KERNEL__)
 149 #define IUCLC   0001000         /* Map upper case to lower case on input.  */
 150 #endif
 151 #define IXON    0002000         /* Enable start/stop output control.  */
 152 #if defined (__USE_BSD) || defined (__KERNEL__)
 153 #define IXANY   0004000         /* Any character will restart after stop.  */
 154 #endif
 155 #define IXOFF   0010000         /* Enable start/stop input control.  */
 156 #if defined (__USE_BSD) || defined (__KERNEL__)
 157 #define IMAXBEL 0020000         /* Ring bell when input queue is full.  */
 158 #endif
 159 
 160 /* c_oflag bits */
 161 #define OPOST   0000001         /* Perform output processing.  */
 162 #if defined (__USE_BSD) || defined (__KERNEL__)
 163 #define OLCUC   0000002         /* Map lower case to upper case on output.  */
 164 #define ONLCR   0000004         /* Map NL to CR-NL on output.  */
 165 #define OCRNL   0000010
 166 #define ONOCR   0000020
 167 #define ONLRET  0000040
 168 #define OFILL   0000100
 169 #define OFDEL   0000200
 170 #define NLDLY   0000400
 171 #define   NL0   0000000
 172 #define   NL1   0000400
 173 #define CRDLY   0003000
 174 #define   CR0   0000000
 175 #define   CR1   0001000
 176 #define   CR2   0002000
 177 #define   CR3   0003000
 178 #define TABDLY  0014000
 179 #define   TAB0  0000000
 180 #define   TAB1  0004000
 181 #define   TAB2  0010000
 182 #define   TAB3  0014000
 183 #define   XTABS 0014000
 184 #define BSDLY   0020000
 185 #define   BS0   0000000
 186 #define   BS1   0020000
 187 #define VTDLY   0040000
 188 #define   VT0   0000000
 189 #define   VT1   0040000
 190 #define FFDLY   0100000
 191 #define   FF0   0000000
 192 #define   FF1   0100000
 193 /*
 194 #define PAGEOUT ???
 195 #define WRAP    ???
 196  */
 197 #endif
 198 
 199 /* c_cflag bit meaning */
 200 #define CBAUD   0010017
 201 #define  B0     0000000         /* hang up */
 202 #define  B50    0000001
 203 #define  B75    0000002
 204 #define  B110   0000003
 205 #define  B134   0000004
 206 #define  B150   0000005
 207 #define  B200   0000006
 208 #define  B300   0000007
 209 #define  B600   0000010
 210 #define  B1200  0000011
 211 #define  B1800  0000012
 212 #define  B2400  0000013
 213 #define  B4800  0000014
 214 #define  B9600  0000015
 215 #define  B19200 0000016
 216 #define  B38400 0000017
 217 #define EXTA B19200
 218 #define EXTB B38400
 219 #define CSIZE   0000060         /* Number of bits per byte (mask).  */
 220 #define   CS5   0000000         /* 5 bits per byte.  */
 221 #define   CS6   0000020         /* 6 bits per byte.  */
 222 #define   CS7   0000040         /* 7 bits per byte.  */
 223 #define   CS8   0000060         /* 8 bits per byte.  */
 224 #define CSTOPB  0000100         /* Two stop bits instead of one.  */
 225 #define CREAD   0000200         /* Enable receiver.  */
 226 #define PARENB  0000400         /* Parity enable.  */
 227 #define PARODD  0001000         /* Odd parity instead of even.  */
 228 #define HUPCL   0002000         /* Hang up on last close.  */
 229 #define CLOCAL  0004000         /* Ignore modem status lines.  */
 230 #if defined (__USE_BSD) || defined (__KERNEL__)
 231 #define CBAUDEX 0010000
 232 #define  B57600  0010001
 233 #define  B115200 0010002
 234 #define  B230400 0010003
 235 #define CIBAUD    002003600000  /* input baud rate (not used) */
 236 #define CRTSCTS   020000000000          /* flow control */
 237 #endif
 238 
 239 /* c_lflag bits */
 240 #define ISIG    0000001         /* Enable signals.  */
 241 #define ICANON  0000002         /* Do erase and kill processing.  */
 242 #define XCASE   0000004
 243 #define ECHO    0000010         /* Enable echo.  */
 244 #define ECHOE   0000020         /* Visual erase for ERASE.  */
 245 #define ECHOK   0000040         /* Echo NL after KILL.  */
 246 #define ECHONL  0000100         /* Echo NL even if ECHO is off.  */
 247 #define NOFLSH  0000200         /* Disable flush after interrupt.  */
 248 #define IEXTEN  0000400         /* Enable DISCARD and LNEXT.  */
 249 #if defined (__USE_BSD) || defined (__KERNEL__)
 250 #define ECHOCTL 0001000         /* Echo control characters as ^X.  */
 251 #define ECHOPRT 0002000         /* Hardcopy visual erase.  */
 252 #define ECHOKE  0004000         /* Visual erase for KILL.  */
 253 #endif
 254 #define FLUSHO  0020000
 255 #if defined (__USE_BSD) || defined (__KERNEL__)
 256 #define PENDIN  0040000         /* Retype pending input (state).  */
 257 #endif
 258 #define TOSTOP  0100000         /* Send SIGTTOU for background output.  */
 259 #define ITOSTOP TOSTOP
 260 
 261 /* modem lines */
 262 #define TIOCM_LE        0x001           /* line enable */
 263 #define TIOCM_DTR       0x002           /* data terminal ready */
 264 #define TIOCM_RTS       0x004           /* request to send */
 265 #define TIOCM_ST        0x010           /* secondary transmit */
 266 #define TIOCM_SR        0x020           /* secondary receive */
 267 #define TIOCM_CTS       0x040           /* clear to send */
 268 #define TIOCM_CAR       0x100           /* carrier detect */
 269 #define TIOCM_CD        TIOCM_CAR
 270 #define TIOCM_RNG       0x200           /* ring */
 271 #define TIOCM_RI        TIOCM_RNG
 272 #define TIOCM_DSR       0x400           /* data set ready */
 273 
 274 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 275 #define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
 276 
 277 /* tcflow() and TCXONC use these */
 278 #define TCOOFF          0       /* Suspend output.  */
 279 #define TCOON           1       /* Restart suspended output.  */
 280 #define TCIOFF          2       /* Send a STOP character.  */
 281 #define TCION           3       /* Send a START character.  */
 282 
 283 /* tcflush() and TCFLSH use these */
 284 #define TCIFLUSH        0       /* Discard data received but not yet read.  */
 285 #define TCOFLUSH        1       /* Discard data written but not yet sent.  */
 286 #define TCIOFLUSH       2       /* Discard all pending data.  */
 287 
 288 /* tcsetattr uses these */
 289 #define TCSANOW         TCSETS  /* Change immediately.  */
 290 #define TCSADRAIN       TCSETSW /* Change when pending output is written.  */
 291 #define TCSAFLUSH       TCSETSF /* Flush pending input before changing.  */
 292 
 293 /* line disciplines */
 294 #define N_TTY           0
 295 #define N_SLIP          1
 296 #define N_MOUSE         2
 297 #define N_PPP           3
 298 
 299 #endif /* __ASM_MIPS_IOCTLS_H */

/* [previous][next][first][last][top][bottom][index][help] */