tty: reading input from a tty is now handled by the line discipline
This commit is contained in:
113
include/socks/termios.h
Normal file
113
include/socks/termios.h
Normal file
@@ -0,0 +1,113 @@
|
||||
#ifndef SOCKS_TERMIOS_H_
|
||||
#define SOCKS_TERMIOS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define NCCS 32
|
||||
|
||||
#define BRKINT 00000001
|
||||
#define ICRNL 00000002
|
||||
#define IGNBRK 00000004
|
||||
#define IGNCR 00000010
|
||||
#define IGNPAR 00000020
|
||||
#define INLCR 00000040
|
||||
#define INPCK 00000100
|
||||
#define ISTRIP 00000200
|
||||
#define IUCLC 00000400
|
||||
#define IXANY 00001000
|
||||
#define IXOFF 00002000
|
||||
#define IXON 00004000
|
||||
#define PARMRK 00010000
|
||||
|
||||
#define OPOST 00000001
|
||||
#define OLCUC 00000002
|
||||
#define ONLCR 00000004
|
||||
#define OCRNL 00000010
|
||||
#define ONOCR 00000020
|
||||
#define ONLRET 00000040
|
||||
#define NLDLY 00000100
|
||||
#define NL0 00000000
|
||||
#define NL1 00000100
|
||||
#define OFILL 00000200
|
||||
#define CRDLY 00003400
|
||||
#define CR0 00000000
|
||||
#define CR1 00000400
|
||||
#define CR2 00001000
|
||||
#define CR3 00002000
|
||||
#define TABDLY 00034000
|
||||
#define TAB0 00000000
|
||||
#define TAB1 00004000
|
||||
#define TAB2 00010000
|
||||
#define TAB3 00020000
|
||||
#define BSDLY 00040000
|
||||
#define BS0 00000000
|
||||
#define BS1 00040000
|
||||
#define VTDLY 00100000
|
||||
#define VT0 00000000
|
||||
#define VT1 00100000
|
||||
#define FFDLY 00200000
|
||||
#define FF0 00000000
|
||||
#define FF1 00200000
|
||||
|
||||
#define B0 0
|
||||
#define B50 50
|
||||
#define B75 75
|
||||
#define B110 110
|
||||
#define B134 134
|
||||
#define B150 150
|
||||
#define B200 200
|
||||
#define B300 300
|
||||
#define B600 600
|
||||
#define B1200 1200
|
||||
#define B1800 1800
|
||||
#define B2400 2400
|
||||
#define B4800 4800
|
||||
#define B9600 9600
|
||||
#define B19200 19200
|
||||
#define B38400 38400
|
||||
|
||||
#define CSIZE 00000007
|
||||
#define CS5 00000000
|
||||
#define CS6 00000001
|
||||
#define CS7 00000002
|
||||
#define CS8 00000004
|
||||
#define CSTOPB 00000010
|
||||
#define CREAD 00000020
|
||||
#define PARENB 00000040
|
||||
#define PARODD 00000100
|
||||
#define HUPCL 00000200
|
||||
#define CLOCAL 00000400
|
||||
|
||||
#define ECHO 00000001
|
||||
#define ECHOE 00000002
|
||||
#define ECHOK 00000004
|
||||
#define ECHONL 00000010
|
||||
#define ICANON 00000020
|
||||
#define IEXTEN 00000040
|
||||
#define ISIG 00000100
|
||||
#define NOFLSH 00000200
|
||||
#define TOSTOP 00000400
|
||||
#define XCASE 00001000
|
||||
|
||||
#define TCSANOW 1
|
||||
#define TCSADRAIN 2
|
||||
#define TCSAFLUSH 3
|
||||
|
||||
#define TCIFLUSH 1
|
||||
#define TCOFLUSH 2
|
||||
#define TCIOFLUSH (TCIFLUSH | TCOFLUSH)
|
||||
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
typedef unsigned char cc_t;
|
||||
|
||||
struct termios {
|
||||
tcflag_t c_iflag;
|
||||
tcflag_t c_oflag;
|
||||
tcflag_t c_cflag;
|
||||
tcflag_t c_lflag;
|
||||
cc_t c_line;
|
||||
cc_t c_cc[NCCS];
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user