/* from asm/termbits.h */#defineTARGET_NCCS23structtarget_termios{unsignedintc_iflag;/* input mode flags */unsignedintc_oflag;/* output mode flags */unsignedintc_cflag;/* control mode flags */unsignedintc_lflag;/* local mode flags */unsignedcharc_line;/* line discipline */unsignedcharc_cc[TARGET_NCCS];/* control characters */};/* c_iflag bits */#defineTARGET_IGNBRK0000001#defineTARGET_BRKINT0000002#defineTARGET_IGNPAR0000004#defineTARGET_PARMRK0000010#defineTARGET_INPCK0000020#defineTARGET_ISTRIP0000040#defineTARGET_INLCR0000100#defineTARGET_IGNCR0000200#defineTARGET_ICRNL0000400#defineTARGET_IUCLC0001000#defineTARGET_IXON0002000#defineTARGET_IXANY0004000#defineTARGET_IXOFF0010000#defineTARGET_IMAXBEL0020000#defineTARGET_IUTF80040000/* c_oflag bits */#defineTARGET_OPOST0000001#defineTARGET_OLCUC0000002#defineTARGET_ONLCR0000004#defineTARGET_OCRNL0000010#defineTARGET_ONOCR0000020#defineTARGET_ONLRET0000040#defineTARGET_OFILL0000100#defineTARGET_OFDEL0000200#defineTARGET_NLDLY0000400#defineTARGET_NL00000000#defineTARGET_NL10000400#defineTARGET_CRDLY0003000#defineTARGET_CR00000000#defineTARGET_CR10001000#defineTARGET_CR20002000#defineTARGET_CR30003000#defineTARGET_TABDLY0014000#defineTARGET_TAB00000000#defineTARGET_TAB10004000#defineTARGET_TAB20010000#defineTARGET_TAB30014000#defineTARGET_XTABS0014000#defineTARGET_BSDLY0020000#defineTARGET_BS00000000#defineTARGET_BS10020000#defineTARGET_VTDLY0040000#defineTARGET_VT00000000#defineTARGET_VT10040000#defineTARGET_FFDLY0100000#defineTARGET_FF00000000#defineTARGET_FF10100000/* c_cflag bit meaning */#defineTARGET_CBAUD0010017#defineTARGET_B00000000/* hang up */#defineTARGET_B500000001#defineTARGET_B750000002#defineTARGET_B1100000003#defineTARGET_B1340000004#defineTARGET_B1500000005#defineTARGET_B2000000006#defineTARGET_B3000000007#defineTARGET_B6000000010#defineTARGET_B12000000011#defineTARGET_B18000000012#defineTARGET_B24000000013#defineTARGET_B48000000014#defineTARGET_B96000000015#defineTARGET_B192000000016#defineTARGET_B384000000017#defineTARGET_EXTAB19200#defineTARGET_EXTBB38400#defineTARGET_CSIZE0000060#defineTARGET_CS50000000#defineTARGET_CS60000020#defineTARGET_CS70000040#defineTARGET_CS80000060#defineTARGET_CSTOPB0000100#defineTARGET_CREAD0000200#defineTARGET_PARENB0000400#defineTARGET_PARODD0001000#defineTARGET_HUPCL0002000#defineTARGET_CLOCAL0004000#defineTARGET_CBAUDEX0010000#defineTARGET_BOTHER0010000#defineTARGET_B576000010001#defineTARGET_B1152000010002#defineTARGET_B2304000010003#defineTARGET_B4608000010004#defineTARGET_B5000000010005#defineTARGET_B5760000010006#defineTARGET_B9216000010007#defineTARGET_B10000000010010#defineTARGET_B11520000010011#defineTARGET_B15000000010012#defineTARGET_B20000000010013#defineTARGET_B25000000010014#defineTARGET_B30000000010015#defineTARGET_B35000000010016#defineTARGET_B40000000010017#defineTARGET_CIBAUD002003600000/* input baud rate (not used) */#defineTARGET_CMSPAR010000000000/* mark or space (stick) parity */#defineTARGET_CRTSCTS020000000000/* flow control *//* c_lflag bits */#defineTARGET_ISIG0000001#defineTARGET_ICANON0000002#defineTARGET_XCASE0000004#defineTARGET_ECHO0000010#defineTARGET_ECHOE0000020#defineTARGET_ECHOK0000040#defineTARGET_ECHONL0000100#defineTARGET_NOFLSH0000200#defineTARGET_IEXTEN0000400#defineTARGET_ECHOCTL0001000#defineTARGET_ECHOPRT0002000#defineTARGET_ECHOKE0004000#defineTARGET_FLUSHO0010000#defineTARGET_PENDIN0040000#defineTARGET_TOSTOP0100000#defineTARGET_ITOSTOPTARGET_TOSTOP/* c_cc character offsets */#defineTARGET_VINTR0#defineTARGET_VQUIT1#defineTARGET_VERASE2#defineTARGET_VKILL3#defineTARGET_VMIN4#defineTARGET_VTIME5#defineTARGET_VEOL26#defineTARGET_VSWTC7#defineTARGET_VSTART8#defineTARGET_VSTOP9#defineTARGET_VSUSP10/* VDSUSP not supported */#defineTARGET_VREPRINT12#defineTARGET_VDISCARD13#defineTARGET_VWERASE14#defineTARGET_VLNEXT15#defineTARGET_VEOF16#defineTARGET_VEOL17/* ioctls */#defineTARGET_TCGETA0x5401#defineTARGET_TCSETA0x5402/* Clashes with SNDCTL_TMR_START sound ioctl */#defineTARGET_TCSETAW0x5403#defineTARGET_TCSETAF0x5404#defineTARGET_TCSBRK0x5405#defineTARGET_TCXONC0x5406#defineTARGET_TCFLSH0x5407#defineTARGET_TCGETS0x540d#defineTARGET_TCSETS0x540e#defineTARGET_TCSETSW0x540f#defineTARGET_TCSETSF0x5410#defineTARGET_TIOCEXCL0x740d/* set exclusive use of tty */#defineTARGET_TIOCNXCL0x740e/* reset exclusive use of tty */#defineTARGET_TIOCOUTQ0x7472/* output queue size */#defineTARGET_TIOCSTI0x5472/* simulate terminal input */#defineTARGET_TIOCMGET0x741d/* get all modem bits */#defineTARGET_TIOCMBIS0x741b/* bis modem bits */#defineTARGET_TIOCMBIC0x741c/* bic modem bits */#defineTARGET_TIOCMSET0x741a/* set all modem bits */#defineTARGET_TIOCPKT0x5470/* pty: set/clear packet mode */#defineTARGET_TIOCPKT_DATA0x00/* data packet */#defineTARGET_TIOCPKT_FLUSHREAD0x01/* flush packet */#defineTARGET_TIOCPKT_FLUSHWRITE0x02/* flush packet */#defineTARGET_TIOCPKT_STOP0x04/* stop output */#defineTARGET_TIOCPKT_START0x08/* start output */#defineTARGET_TIOCPKT_NOSTOP0x10/* no more ^S, ^Q */#defineTARGET_TIOCPKT_DOSTOP0x20/* now do ^S ^Q *//* #define TIOCPKT_IOCTL 0x40 state change of pty driver */#defineTARGET_TIOCSWINSZTARGET_IOW('t',103,structwinsize)/* set window size */#defineTARGET_TIOCGWINSZTARGET_IOR('t',104,structwinsize)/* get window size */#defineTARGET_TIOCNOTTY0x5471/* void tty association */#defineTARGET_TIOCSETD0x7401#defineTARGET_TIOCGETD0x7400#defineTARGET_FIOCLEX0x6601#defineTARGET_FIONCLEX0x6602#defineTARGET_FIOASYNC0x667d#defineTARGET_FIONBIO0x667e#defineTARGET_FIOQSIZE0x667f#defineTARGET_TIOCGLTC0x7474/* get special local chars */#defineTARGET_TIOCSLTC0x7475/* set special local chars */#defineTARGET_TIOCSPGRPTARGET_IOW('t',118,int)/* set pgrp of tty */#defineTARGET_TIOCGPGRPTARGET_IOR('t',119,int)/* get pgrp of tty */#defineTARGET_TIOCCONSTARGET_IOW('t',120,int)/* become virtual console */#defineTARGET_FIONREAD0x467f#defineTARGET_TIOCINQTARGET_FIONREAD#defineTARGET_TIOCGETP0x7408#defineTARGET_TIOCSETP0x7409#defineTARGET_TIOCSETN0x740a/* TIOCSETP wo flush *//* #define TARGET_TIOCSETA TARGET_IOW('t', 20, struct termios) set termios struct *//* #define TARGET_TIOCSETAW TARGET_IOW('t', 21, struct termios) drain output, set *//* #define TARGET_TIOCSETAF TARGET_IOW('t', 22, struct termios) drn out, fls in, set *//* #define TARGET_TIOCGETD TARGET_IOR('t', 26, int) get line discipline *//* #define TARGET_TIOCSETD TARGET_IOW('t', 27, int) set line discipline *//* 127-124 compat */#defineTARGET_TIOCSBRK0x5427/* BSD compatibility */#defineTARGET_TIOCCBRK0x5428/* BSD compatibility */#defineTARGET_TIOCGSID0x7416/* Return the session ID of FD */#defineTARGET_TIOCGPTNTARGET_IOR('T',0x30,unsignedint)/* Get Pty Number (of pty-mux device) */#defineTARGET_TIOCSPTLCKTARGET_IOW('T',0x31,int)/* Lock/unlock Pty *//* I hope the range from 0x5480 on is free ... */#defineTARGET_TIOCSCTTY0x5480/* become controlling tty */#defineTARGET_TIOCGSOFTCAR0x5481#defineTARGET_TIOCSSOFTCAR0x5482#defineTARGET_TIOCLINUX0x5483#defineTARGET_TIOCGSERIAL0x5484#defineTARGET_TIOCSSERIAL0x5485#defineTARGET_TCSBRKP0x5486/* Needed for POSIX tcsendbreak() */#defineTARGET_TIOCSERCONFIG0x5488#defineTARGET_TIOCSERGWILD0x5489#defineTARGET_TIOCSERSWILD0x548a#defineTARGET_TIOCGLCKTRMIOS0x548b#defineTARGET_TIOCSLCKTRMIOS0x548c#defineTARGET_TIOCSERGSTRUCT0x548d/* For debugging only */#defineTARGET_TIOCSERGETLSR0x548e/* Get line status register */#defineTARGET_TIOCSERGETMULTI0x548f/* Get multiport config */#defineTARGET_TIOCSERSETMULTI0x5490/* Set multiport config */#defineTARGET_TIOCMIWAIT0x5491/* wait for a change on serial input line(s) */#defineTARGET_TIOCGICOUNT0x5492/* read serial port inline interrupt counts */#defineTARGET_TIOCGHAYESESP0x5493/* Get Hayes ESP configuration */#defineTARGET_TIOCSHAYESESP0x5494/* Set Hayes ESP configuration */