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 uniqe ('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 FIONCLEX        0x5450  /* these numbers need to be adjusted. */
  47 #define FIOCLEX         0x5451
  48 #define FIOASYNC        0x5452
  49 #define TIOCSERCONFIG   0x5453
  50 #define TIOCSERGWILD    0x5454
  51 #define TIOCSERSWILD    0x5455
  52 #define TIOCGLCKTRMIOS  0x5456
  53 #define TIOCSLCKTRMIOS  0x5457
  54 
  55 /* Used for packet mode */
  56 #define TIOCPKT_DATA             0
  57 #define TIOCPKT_FLUSHREAD        1
  58 #define TIOCPKT_FLUSHWRITE       2
  59 #define TIOCPKT_STOP             4
  60 #define TIOCPKT_START            8
  61 #define TIOCPKT_NOSTOP          16
  62 #define TIOCPKT_DOSTOP          32
  63 
  64 struct winsize {
  65         unsigned short ws_row;
  66         unsigned short ws_col;
  67         unsigned short ws_xpixel;
  68         unsigned short ws_ypixel;
  69 };
  70 
  71 #define NCC 8
  72 struct termio {
  73         unsigned short c_iflag;         /* input mode flags */
  74         unsigned short c_oflag;         /* output mode flags */
  75         unsigned short c_cflag;         /* control mode flags */
  76         unsigned short c_lflag;         /* local mode flags */
  77         unsigned char c_line;           /* line discipline */
  78         unsigned char c_cc[NCC];        /* control characters */
  79 };
  80 
  81 #define NCCS 19
  82 struct termios {
  83         tcflag_t c_iflag;               /* input mode flags */
  84         tcflag_t c_oflag;               /* output mode flags */
  85         tcflag_t c_cflag;               /* control mode flags */
  86         tcflag_t c_lflag;               /* local mode flags */
  87         cc_t c_line;                    /* line discipline */
  88         cc_t c_cc[NCCS];                /* control characters */
  89 };
  90 
  91 /* c_cc characters */
  92 #define VINTR 0
  93 #define VQUIT 1
  94 #define VERASE 2
  95 #define VKILL 3
  96 #define VEOF 4
  97 #define VTIME 5
  98 #define VMIN 6
  99 #define VSWTC 7
 100 #define VSTART 8
 101 #define VSTOP 9
 102 #define VSUSP 10
 103 #define VEOL 11
 104 #define VREPRINT 12
 105 #define VDISCARD 13
 106 #define VWERASE 14
 107 #define VLNEXT 15
 108 #define VEOL2 16
 109 
 110 /* c_iflag bits */
 111 #define IGNBRK  0000001
 112 #define BRKINT  0000002
 113 #define IGNPAR  0000004
 114 #define PARMRK  0000010
 115 #define INPCK   0000020
 116 #define ISTRIP  0000040
 117 #define INLCR   0000100
 118 #define IGNCR   0000200
 119 #define ICRNL   0000400
 120 #define IUCLC   0001000
 121 #define IXON    0002000
 122 #define IXANY   0004000
 123 #define IXOFF   0010000
 124 #define IMAXBEL 0020000
 125 
 126 /* c_oflag bits */
 127 #define OPOST   0000001
 128 #define OLCUC   0000002
 129 #define ONLCR   0000004
 130 #define OCRNL   0000010
 131 #define ONOCR   0000020
 132 #define ONLRET  0000040
 133 #define OFILL   0000100
 134 #define OFDEL   0000200
 135 #define NLDLY   0000400
 136 #define   NL0   0000000
 137 #define   NL1   0000400
 138 #define CRDLY   0003000
 139 #define   CR0   0000000
 140 #define   CR1   0001000
 141 #define   CR2   0002000
 142 #define   CR3   0003000
 143 #define TABDLY  0014000
 144 #define   TAB0  0000000
 145 #define   TAB1  0004000
 146 #define   TAB2  0010000
 147 #define   TAB3  0014000
 148 #define   XTABS 0014000
 149 #define BSDLY   0020000
 150 #define   BS0   0000000
 151 #define   BS1   0020000
 152 #define VTDLY   0040000
 153 #define   VT0   0000000
 154 #define   VT1   0040000
 155 #define FFDLY   0100000
 156 #define   FF0   0000000
 157 #define   FF1   0100000
 158 
 159 /* c_cflag bit meaning */
 160 #define CBAUD   0000017
 161 #define  B0     0000000         /* hang up */
 162 #define  B50    0000001
 163 #define  B75    0000002
 164 #define  B110   0000003
 165 #define  B134   0000004
 166 #define  B150   0000005
 167 #define  B200   0000006
 168 #define  B300   0000007
 169 #define  B600   0000010
 170 #define  B1200  0000011
 171 #define  B1800  0000012
 172 #define  B2400  0000013
 173 #define  B4800  0000014
 174 #define  B9600  0000015
 175 #define  B19200 0000016
 176 #define  B38400 0000017
 177 #define EXTA B19200
 178 #define EXTB B38400
 179 #define CSIZE   0000060
 180 #define   CS5   0000000
 181 #define   CS6   0000020
 182 #define   CS7   0000040
 183 #define   CS8   0000060
 184 #define CSTOPB  0000100
 185 #define CREAD   0000200
 186 #define PARENB  0000400
 187 #define PARODD  0001000
 188 #define HUPCL   0002000
 189 #define CLOCAL  0004000
 190 #define CIBAUD  03600000                /* input baud rate (not used) */
 191 #define CRTSCTS   020000000000          /* flow control */
 192 
 193 /* c_lflag bits */
 194 #define ISIG    0000001
 195 #define ICANON  0000002
 196 #define XCASE   0000004
 197 #define ECHO    0000010
 198 #define ECHOE   0000020
 199 #define ECHOK   0000040
 200 #define ECHONL  0000100
 201 #define NOFLSH  0000200
 202 #define TOSTOP  0000400
 203 #define ECHOCTL 0001000
 204 #define ECHOPRT 0002000
 205 #define ECHOKE  0004000
 206 #define FLUSHO  0010000
 207 #define PENDIN  0040000
 208 #define IEXTEN  0100000
 209 
 210 /* modem lines */
 211 #define TIOCM_LE        0x001
 212 #define TIOCM_DTR       0x002
 213 #define TIOCM_RTS       0x004
 214 #define TIOCM_ST        0x008
 215 #define TIOCM_SR        0x010
 216 #define TIOCM_CTS       0x020
 217 #define TIOCM_CAR       0x040
 218 #define TIOCM_RNG       0x080
 219 #define TIOCM_DSR       0x100
 220 #define TIOCM_CD        TIOCM_CAR
 221 #define TIOCM_RI        TIOCM_RNG
 222 
 223 /* tcflow() and TCXONC use these */
 224 #define TCOOFF          0
 225 #define TCOON           1
 226 #define TCIOFF          2
 227 #define TCION           3
 228 
 229 /* tcflush() and TCFLSH use these */
 230 #define TCIFLUSH        0
 231 #define TCOFLUSH        1
 232 #define TCIOFLUSH       2
 233 
 234 /* tcsetattr uses these */
 235 #define TCSANOW         0
 236 #define TCSADRAIN       1
 237 #define TCSAFLUSH       2
 238 
 239 /* line disciplines */
 240 #define N_TTY           0
 241 #define N_SLIP          1
 242 #define N_MOUSE         2
 243 #define N_PPP           3
 244 
 245 #endif

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