root/include/linux/termios.h

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

INCLUDED FROM


   1 #ifndef _LINUX_TERMIOS_H
   2 #define _LINUX_TERMIOS_H
   3 
   4 #include <linux/types.h>
   5 
   6 /* 0x54 is just a magic number to make these relatively unique ('T') */
   7 
   8 #define TCGETS          0x5401
   9 #define TCSETS          0x5402
  10 #define TCSETSW         0x5403
  11 #define TCSETSF         0x5404
  12 #define TCGETA          0x5405
  13 #define TCSETA          0x5406
  14 #define TCSETAW         0x5407
  15 #define TCSETAF         0x5408
  16 #define TCSBRK          0x5409
  17 #define TCXONC          0x540A
  18 #define TCFLSH          0x540B
  19 #define TIOCEXCL        0x540C
  20 #define TIOCNXCL        0x540D
  21 #define TIOCSCTTY       0x540E
  22 #define TIOCGPGRP       0x540F
  23 #define TIOCSPGRP       0x5410
  24 #define TIOCOUTQ        0x5411
  25 #define TIOCSTI         0x5412
  26 #define TIOCGWINSZ      0x5413
  27 #define TIOCSWINSZ      0x5414
  28 #define TIOCMGET        0x5415
  29 #define TIOCMBIS        0x5416
  30 #define TIOCMBIC        0x5417
  31 #define TIOCMSET        0x5418
  32 #define TIOCGSOFTCAR    0x5419
  33 #define TIOCSSOFTCAR    0x541A
  34 #define FIONREAD        0x541B
  35 #define TIOCINQ         FIONREAD
  36 #define TIOCLINUX       0x541C
  37 #define TIOCCONS        0x541D
  38 #define TIOCGSERIAL     0x541E
  39 #define TIOCSSERIAL     0x541F
  40 #define TIOCPKT         0x5420
  41 #define FIONBIO         0x5421
  42 #define TIOCNOTTY       0x5422
  43 #define TIOCSETD        0x5423
  44 #define TIOCGETD        0x5424
  45 #define TCSBRKP         0x5425  /* Needed for POSIX tcsendbreak() */
  46 #define TIOCTTYGSTRUCT  0x5426  /* For debugging only */
  47 #define FIONCLEX        0x5450  /* these numbers need to be adjusted. */
  48 #define FIOCLEX         0x5451
  49 #define FIOASYNC        0x5452
  50 #define TIOCSERCONFIG   0x5453
  51 #define TIOCSERGWILD    0x5454
  52 #define TIOCSERSWILD    0x5455
  53 #define TIOCGLCKTRMIOS  0x5456
  54 #define TIOCSLCKTRMIOS  0x5457
  55 #define TIOCSERGSTRUCT  0x5458 /* For debugging only */
  56 #define TIOCSERGETLSR   0x5459 /* Get line status register */
  57 
  58 /* Used for packet mode */
  59 #define TIOCPKT_DATA             0
  60 #define TIOCPKT_FLUSHREAD        1
  61 #define TIOCPKT_FLUSHWRITE       2
  62 #define TIOCPKT_STOP             4
  63 #define TIOCPKT_START            8
  64 #define TIOCPKT_NOSTOP          16
  65 #define TIOCPKT_DOSTOP          32
  66 
  67 struct winsize {
  68         unsigned short ws_row;
  69         unsigned short ws_col;
  70         unsigned short ws_xpixel;
  71         unsigned short ws_ypixel;
  72 };
  73 
  74 #define NCC 8
  75 struct termio {
  76         unsigned short c_iflag;         /* input mode flags */
  77         unsigned short c_oflag;         /* output mode flags */
  78         unsigned short c_cflag;         /* control mode flags */
  79         unsigned short c_lflag;         /* local mode flags */
  80         unsigned char c_line;           /* line discipline */
  81         unsigned char c_cc[NCC];        /* control characters */
  82 };
  83 
  84 #define NCCS 19
  85 struct termios {
  86         tcflag_t c_iflag;               /* input mode flags */
  87         tcflag_t c_oflag;               /* output mode flags */
  88         tcflag_t c_cflag;               /* control mode flags */
  89         tcflag_t c_lflag;               /* local mode flags */
  90         cc_t c_line;                    /* line discipline */
  91         cc_t c_cc[NCCS];                /* control characters */
  92 };
  93 
  94 /* c_cc characters */
  95 #define VINTR 0
  96 #define VQUIT 1
  97 #define VERASE 2
  98 #define VKILL 3
  99 #define VEOF 4
 100 #define VTIME 5
 101 #define VMIN 6
 102 #define VSWTC 7
 103 #define VSTART 8
 104 #define VSTOP 9
 105 #define VSUSP 10
 106 #define VEOL 11
 107 #define VREPRINT 12
 108 #define VDISCARD 13
 109 #define VWERASE 14
 110 #define VLNEXT 15
 111 #define VEOL2 16
 112 
 113 /* c_iflag bits */
 114 #define IGNBRK  0000001
 115 #define BRKINT  0000002
 116 #define IGNPAR  0000004
 117 #define PARMRK  0000010
 118 #define INPCK   0000020
 119 #define ISTRIP  0000040
 120 #define INLCR   0000100
 121 #define IGNCR   0000200
 122 #define ICRNL   0000400
 123 #define IUCLC   0001000
 124 #define IXON    0002000
 125 #define IXANY   0004000
 126 #define IXOFF   0010000
 127 #define IMAXBEL 0020000
 128 
 129 /* c_oflag bits */
 130 #define OPOST   0000001
 131 #define OLCUC   0000002
 132 #define ONLCR   0000004
 133 #define OCRNL   0000010
 134 #define ONOCR   0000020
 135 #define ONLRET  0000040
 136 #define OFILL   0000100
 137 #define OFDEL   0000200
 138 #define NLDLY   0000400
 139 #define   NL0   0000000
 140 #define   NL1   0000400
 141 #define CRDLY   0003000
 142 #define   CR0   0000000
 143 #define   CR1   0001000
 144 #define   CR2   0002000
 145 #define   CR3   0003000
 146 #define TABDLY  0014000
 147 #define   TAB0  0000000
 148 #define   TAB1  0004000
 149 #define   TAB2  0010000
 150 #define   TAB3  0014000
 151 #define   XTABS 0014000
 152 #define BSDLY   0020000
 153 #define   BS0   0000000
 154 #define   BS1   0020000
 155 #define VTDLY   0040000
 156 #define   VT0   0000000
 157 #define   VT1   0040000
 158 #define FFDLY   0100000
 159 #define   FF0   0000000
 160 #define   FF1   0100000
 161 
 162 /* c_cflag bit meaning */
 163 #define CBAUD   0010017
 164 #define  B0     0000000         /* hang up */
 165 #define  B50    0000001
 166 #define  B75    0000002
 167 #define  B110   0000003
 168 #define  B134   0000004
 169 #define  B150   0000005
 170 #define  B200   0000006
 171 #define  B300   0000007
 172 #define  B600   0000010
 173 #define  B1200  0000011
 174 #define  B1800  0000012
 175 #define  B2400  0000013
 176 #define  B4800  0000014
 177 #define  B9600  0000015
 178 #define  B19200 0000016
 179 #define  B38400 0000017
 180 #define EXTA B19200
 181 #define EXTB B38400
 182 #define CSIZE   0000060
 183 #define   CS5   0000000
 184 #define   CS6   0000020
 185 #define   CS7   0000040
 186 #define   CS8   0000060
 187 #define CSTOPB  0000100
 188 #define CREAD   0000200
 189 #define PARENB  0000400
 190 #define PARODD  0001000
 191 #define HUPCL   0002000
 192 #define CLOCAL  0004000
 193 #define CBAUDEX 0010000
 194 #define  B57600  0010001
 195 #define  B115200 0010002
 196 #define CIBAUD    002003600000  /* input baud rate (not used) */
 197 #define CRTSCTS   020000000000          /* flow control */
 198 
 199 /* c_lflag bits */
 200 #define ISIG    0000001
 201 #define ICANON  0000002
 202 #define XCASE   0000004
 203 #define ECHO    0000010
 204 #define ECHOE   0000020
 205 #define ECHOK   0000040
 206 #define ECHONL  0000100
 207 #define NOFLSH  0000200
 208 #define TOSTOP  0000400
 209 #define ECHOCTL 0001000
 210 #define ECHOPRT 0002000
 211 #define ECHOKE  0004000
 212 #define FLUSHO  0010000
 213 #define PENDIN  0040000
 214 #define IEXTEN  0100000
 215 
 216 /* modem lines */
 217 #define TIOCM_LE        0x001
 218 #define TIOCM_DTR       0x002
 219 #define TIOCM_RTS       0x004
 220 #define TIOCM_ST        0x008
 221 #define TIOCM_SR        0x010
 222 #define TIOCM_CTS       0x020
 223 #define TIOCM_CAR       0x040
 224 #define TIOCM_RNG       0x080
 225 #define TIOCM_DSR       0x100
 226 #define TIOCM_CD        TIOCM_CAR
 227 #define TIOCM_RI        TIOCM_RNG
 228 
 229 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 230 #define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
 231 
 232 
 233 /* tcflow() and TCXONC use these */
 234 #define TCOOFF          0
 235 #define TCOON           1
 236 #define TCIOFF          2
 237 #define TCION           3
 238 
 239 /* tcflush() and TCFLSH use these */
 240 #define TCIFLUSH        0
 241 #define TCOFLUSH        1
 242 #define TCIOFLUSH       2
 243 
 244 /* tcsetattr uses these */
 245 #define TCSANOW         0
 246 #define TCSADRAIN       1
 247 #define TCSAFLUSH       2
 248 
 249 /* line disciplines */
 250 #define N_TTY           0
 251 #define N_SLIP          1
 252 #define N_MOUSE         2
 253 #define N_PPP           3
 254 
 255 #endif

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