1e69b4065Sths /* from asm/termbits.h */ 2e69b4065Sths 3e69b4065Sths #define TARGET_NCCS 19 4e69b4065Sths 5e69b4065Sths struct target_termios { 6e69b4065Sths unsigned int c_iflag; /* input mode flags */ 7e69b4065Sths unsigned int c_oflag; /* output mode flags */ 8e69b4065Sths unsigned int c_cflag; /* control mode flags */ 9e69b4065Sths unsigned int c_lflag; /* local mode flags */ 10e69b4065Sths unsigned char c_line; /* line discipline */ 11e69b4065Sths unsigned char c_cc[TARGET_NCCS]; /* control characters */ 12e69b4065Sths }; 13e69b4065Sths 14e69b4065Sths /* c_iflag bits */ 15e69b4065Sths #define TARGET_IGNBRK 0000001 16e69b4065Sths #define TARGET_BRKINT 0000002 17e69b4065Sths #define TARGET_IGNPAR 0000004 18e69b4065Sths #define TARGET_PARMRK 0000010 19e69b4065Sths #define TARGET_INPCK 0000020 20e69b4065Sths #define TARGET_ISTRIP 0000040 21e69b4065Sths #define TARGET_INLCR 0000100 22e69b4065Sths #define TARGET_IGNCR 0000200 23e69b4065Sths #define TARGET_ICRNL 0000400 24e69b4065Sths #define TARGET_IUCLC 0001000 25e69b4065Sths #define TARGET_IXON 0002000 26e69b4065Sths #define TARGET_IXANY 0004000 27e69b4065Sths #define TARGET_IXOFF 0010000 28e69b4065Sths #define TARGET_IMAXBEL 0020000 29e69b4065Sths 30e69b4065Sths /* c_oflag bits */ 31e69b4065Sths #define TARGET_OPOST 0000001 32e69b4065Sths #define TARGET_OLCUC 0000002 33e69b4065Sths #define TARGET_ONLCR 0000004 34e69b4065Sths #define TARGET_OCRNL 0000010 35e69b4065Sths #define TARGET_ONOCR 0000020 36e69b4065Sths #define TARGET_ONLRET 0000040 37e69b4065Sths #define TARGET_OFILL 0000100 38e69b4065Sths #define TARGET_OFDEL 0000200 39e69b4065Sths #define TARGET_NLDLY 0000400 40e69b4065Sths #define TARGET_NL0 0000000 41e69b4065Sths #define TARGET_NL1 0000400 42e69b4065Sths #define TARGET_CRDLY 0003000 43e69b4065Sths #define TARGET_CR0 0000000 44e69b4065Sths #define TARGET_CR1 0001000 45e69b4065Sths #define TARGET_CR2 0002000 46e69b4065Sths #define TARGET_CR3 0003000 47e69b4065Sths #define TARGET_TABDLY 0014000 48e69b4065Sths #define TARGET_TAB0 0000000 49e69b4065Sths #define TARGET_TAB1 0004000 50e69b4065Sths #define TARGET_TAB2 0010000 51e69b4065Sths #define TARGET_TAB3 0014000 52e69b4065Sths #define TARGET_XTABS 0014000 53e69b4065Sths #define TARGET_BSDLY 0020000 54e69b4065Sths #define TARGET_BS0 0000000 55e69b4065Sths #define TARGET_BS1 0020000 56e69b4065Sths #define TARGET_VTDLY 0040000 57e69b4065Sths #define TARGET_VT0 0000000 58e69b4065Sths #define TARGET_VT1 0040000 59e69b4065Sths #define TARGET_FFDLY 0100000 60e69b4065Sths #define TARGET_FF0 0000000 61e69b4065Sths #define TARGET_FF1 0100000 62e69b4065Sths 63e69b4065Sths /* c_cflag bit meaning */ 64e69b4065Sths #define TARGET_CBAUD 0010017 65e69b4065Sths #define TARGET_B0 0000000 /* hang up */ 66e69b4065Sths #define TARGET_B50 0000001 67e69b4065Sths #define TARGET_B75 0000002 68e69b4065Sths #define TARGET_B110 0000003 69e69b4065Sths #define TARGET_B134 0000004 70e69b4065Sths #define TARGET_B150 0000005 71e69b4065Sths #define TARGET_B200 0000006 72e69b4065Sths #define TARGET_B300 0000007 73e69b4065Sths #define TARGET_B600 0000010 74e69b4065Sths #define TARGET_B1200 0000011 75e69b4065Sths #define TARGET_B1800 0000012 76e69b4065Sths #define TARGET_B2400 0000013 77e69b4065Sths #define TARGET_B4800 0000014 78e69b4065Sths #define TARGET_B9600 0000015 79e69b4065Sths #define TARGET_B19200 0000016 80e69b4065Sths #define TARGET_B38400 0000017 81e69b4065Sths #define TARGET_EXTA B19200 82e69b4065Sths #define TARGET_EXTB B38400 83e69b4065Sths #define TARGET_CSIZE 0000060 84e69b4065Sths #define TARGET_CS5 0000000 85e69b4065Sths #define TARGET_CS6 0000020 86e69b4065Sths #define TARGET_CS7 0000040 87e69b4065Sths #define TARGET_CS8 0000060 88e69b4065Sths #define TARGET_CSTOPB 0000100 89e69b4065Sths #define TARGET_CREAD 0000200 90e69b4065Sths #define TARGET_PARENB 0000400 91e69b4065Sths #define TARGET_PARODD 0001000 92e69b4065Sths #define TARGET_HUPCL 0002000 93e69b4065Sths #define TARGET_CLOCAL 0004000 94e69b4065Sths #define TARGET_CBAUDEX 0010000 95e69b4065Sths #define TARGET_B57600 0010001 96e69b4065Sths #define TARGET_B115200 0010002 97e69b4065Sths #define TARGET_B230400 0010003 98e69b4065Sths #define TARGET_B460800 0010004 99e69b4065Sths #define TARGET_CIBAUD 002003600000 /* input baud rate (not used) */ 100e69b4065Sths #define TARGET_CRTSCTS 020000000000 /* flow control */ 101e69b4065Sths 102e69b4065Sths /* c_lflag bits */ 103e69b4065Sths #define TARGET_ISIG 0000001 104e69b4065Sths #define TARGET_ICANON 0000002 105e69b4065Sths #define TARGET_XCASE 0000004 106e69b4065Sths #define TARGET_ECHO 0000010 107e69b4065Sths #define TARGET_ECHOE 0000020 108e69b4065Sths #define TARGET_ECHOK 0000040 109e69b4065Sths #define TARGET_ECHONL 0000100 110e69b4065Sths #define TARGET_NOFLSH 0000200 111e69b4065Sths #define TARGET_TOSTOP 0000400 112e69b4065Sths #define TARGET_ECHOCTL 0001000 113e69b4065Sths #define TARGET_ECHOPRT 0002000 114e69b4065Sths #define TARGET_ECHOKE 0004000 115e69b4065Sths #define TARGET_FLUSHO 0010000 116e69b4065Sths #define TARGET_PENDIN 0040000 117e69b4065Sths #define TARGET_IEXTEN 0100000 118e69b4065Sths 119e69b4065Sths /* c_cc character offsets */ 120e69b4065Sths #define TARGET_VINTR 0 121e69b4065Sths #define TARGET_VQUIT 1 122e69b4065Sths #define TARGET_VERASE 2 123e69b4065Sths #define TARGET_VKILL 3 124e69b4065Sths #define TARGET_VEOF 4 125e69b4065Sths #define TARGET_VTIME 5 126e69b4065Sths #define TARGET_VMIN 6 127e69b4065Sths #define TARGET_VSWTC 7 128e69b4065Sths #define TARGET_VSTART 8 129e69b4065Sths #define TARGET_VSTOP 9 130e69b4065Sths #define TARGET_VSUSP 10 131e69b4065Sths #define TARGET_VEOL 11 132e69b4065Sths #define TARGET_VREPRINT 12 133e69b4065Sths #define TARGET_VDISCARD 13 134e69b4065Sths #define TARGET_VWERASE 14 135e69b4065Sths #define TARGET_VLNEXT 15 136e69b4065Sths #define TARGET_VEOL2 16 137e69b4065Sths 138e69b4065Sths /* ioctls */ 139e69b4065Sths 140e69b4065Sths #define TARGET_TCGETS 0x5401 141e69b4065Sths #define TARGET_TCSETS 0x5402 142e69b4065Sths #define TARGET_TCSETSW 0x5403 143e69b4065Sths #define TARGET_TCSETSF 0x5404 144e69b4065Sths #define TARGET_TCGETA 0x5405 145e69b4065Sths #define TARGET_TCSETA 0x5406 146e69b4065Sths #define TARGET_TCSETAW 0x5407 147e69b4065Sths #define TARGET_TCSETAF 0x5408 148e69b4065Sths #define TARGET_TCSBRK 0x5409 149e69b4065Sths #define TARGET_TCXONC 0x540A 150e69b4065Sths #define TARGET_TCFLSH 0x540B 151e69b4065Sths 152e69b4065Sths #define TARGET_TIOCEXCL 0x540C 153e69b4065Sths #define TARGET_TIOCNXCL 0x540D 154e69b4065Sths #define TARGET_TIOCSCTTY 0x540E 155e69b4065Sths #define TARGET_TIOCGPGRP 0x540F 156e69b4065Sths #define TARGET_TIOCSPGRP 0x5410 157e69b4065Sths #define TARGET_TIOCOUTQ 0x5411 158e69b4065Sths #define TARGET_TIOCSTI 0x5412 159e69b4065Sths #define TARGET_TIOCGWINSZ 0x5413 160e69b4065Sths #define TARGET_TIOCSWINSZ 0x5414 161e69b4065Sths #define TARGET_TIOCMGET 0x5415 162e69b4065Sths #define TARGET_TIOCMBIS 0x5416 163e69b4065Sths #define TARGET_TIOCMBIC 0x5417 164e69b4065Sths #define TARGET_TIOCMSET 0x5418 165e69b4065Sths #define TARGET_TIOCGSOFTCAR 0x5419 166e69b4065Sths #define TARGET_TIOCSSOFTCAR 0x541A 167e69b4065Sths #define TARGET_FIONREAD 0x541B 168e69b4065Sths #define TARGET_TIOCINQ TARGET_FIONREAD 169e69b4065Sths #define TARGET_TIOCLINUX 0x541C 170e69b4065Sths #define TARGET_TIOCCONS 0x541D 171e69b4065Sths #define TARGET_TIOCGSERIAL 0x541E 172e69b4065Sths #define TARGET_TIOCSSERIAL 0x541F 173e69b4065Sths #define TARGET_TIOCPKT 0x5420 174e69b4065Sths #define TARGET_FIONBIO 0x5421 175e69b4065Sths #define TARGET_TIOCNOTTY 0x5422 176e69b4065Sths #define TARGET_TIOCSETD 0x5423 177e69b4065Sths #define TARGET_TIOCGETD 0x5424 178e69b4065Sths #define TARGET_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 179e69b4065Sths #define TARGET_TIOCTTYGSTRUCT 0x5426 /* For debugging only */ 180e69b4065Sths #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ 181e69b4065Sths #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ 182e69b4065Sths #define TARGET_TIOCGSID 0x5429 /* Return the session ID of FD */ 183e69b4065Sths #define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 184e69b4065Sths #define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ 185*2b74f621SAndreas Schwab #define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) /* Safely open the slave */ 186e69b4065Sths 187e69b4065Sths #define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ 188e69b4065Sths #define TARGET_FIOCLEX 0x5451 189e69b4065Sths #define TARGET_FIOASYNC 0x5452 190e69b4065Sths #define TARGET_TIOCSERCONFIG 0x5453 191e69b4065Sths #define TARGET_TIOCSERGWILD 0x5454 192e69b4065Sths #define TARGET_TIOCSERSWILD 0x5455 193e69b4065Sths #define TARGET_TIOCGLCKTRMIOS 0x5456 194e69b4065Sths #define TARGET_TIOCSLCKTRMIOS 0x5457 195e69b4065Sths #define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ 196e69b4065Sths #define TARGET_TIOCSERGETLSR 0x5459 /* Get line status register */ 197e69b4065Sths #define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config */ 198e69b4065Sths #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ 199e69b4065Sths 200e69b4065Sths #define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ 201e69b4065Sths #define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ 202e69b4065Sths #define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ 203e69b4065Sths #define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ 204e69b4065Sths 205e69b4065Sths /* Used for packet mode */ 206e69b4065Sths #define TARGET_TIOCPKT_DATA 0 207e69b4065Sths #define TARGET_TIOCPKT_FLUSHREAD 1 208e69b4065Sths #define TARGET_TIOCPKT_FLUSHWRITE 2 209e69b4065Sths #define TARGET_TIOCPKT_STOP 4 210e69b4065Sths #define TARGET_TIOCPKT_START 8 211e69b4065Sths #define TARGET_TIOCPKT_NOSTOP 16 212e69b4065Sths #define TARGET_TIOCPKT_DOSTOP 32 213e69b4065Sths 214e69b4065Sths #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 215