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

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