Commit | Line | Data |
---|---|---|
a8fd2d0d KM |
1 | /* |
2 | * Copyright (c) 1988 University of Utah. | |
3 | * Copyright (c) 1990 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley by | |
7 | * the Systems Programming Group of the University of Utah Computer | |
8 | * Science Department. | |
9 | * | |
10 | * %sccs.include.redist.c% | |
11 | * | |
fbdf09dd | 12 | * from: Utah $Hdr: hpux_termio.h 1.1 90/07/09$ |
a8fd2d0d | 13 | * |
c34072bf | 14 | * @(#)hpux_termio.h 7.4 (Berkeley) %G% |
a8fd2d0d KM |
15 | */ |
16 | ||
17 | /* HP-UX termio stuff */ | |
18 | ||
19 | #define HPUXNCC 8 | |
20 | ||
21 | /* control characters */ | |
22 | #define HPUXVINTR 0 | |
23 | #define HPUXVQUIT 1 | |
24 | #define HPUXVERASE 2 | |
25 | #define HPUXVKILL 3 | |
26 | #define HPUXVEOF 4 | |
27 | #define HPUXVEOL 5 | |
28 | #define HPUXVMIN 4 | |
29 | #define HPUXVTIME 5 | |
c34072bf MH |
30 | #define HPUXVEOL2 6 |
31 | #define HPUXVSWTCH 7 | |
a8fd2d0d KM |
32 | |
33 | /* input modes */ | |
83ed508e MH |
34 | #define TIO_IGNBRK 0x00000001 /* 0000001 */ |
35 | #define TIO_BRKINT 0x00000002 /* 0000002 */ | |
36 | #define TIO_IGNPAR 0x00000004 /* 0000004 */ | |
37 | #define TIO_PARMRK 0x00000008 /* 0000010 */ | |
38 | #define TIO_INPCK 0x00000010 /* 0000020 */ | |
39 | #define TIO_ISTRIP 0x00000020 /* 0000040 */ | |
40 | #define TIO_INLCR 0x00000040 /* 0000100 */ | |
41 | #define TIO_IGNCR 0x00000080 /* 0000200 */ | |
42 | #define TIO_ICRNL 0x00000100 /* 0000400 */ | |
43 | #define TIO_IUCLC 0x00000200 /* 0001000 */ | |
44 | #define TIO_IXON 0x00000400 /* 0002000 */ | |
45 | #define TIO_IXANY 0x00000800 /* 0004000 */ | |
46 | #define TIO_IXOFF 0x00001000 /* 0010000 */ | |
47 | #define TIO_IENQAK 0x00002000 /* 0020000 */ | |
a8fd2d0d KM |
48 | |
49 | /* output modes */ | |
83ed508e MH |
50 | #define TIO_OPOST 0x00000001 /* 0000001 */ |
51 | #define TIO_OLCUC 0x00000002 /* 0000002 */ | |
52 | #define TIO_ONLCR 0x00000004 /* 0000004 */ | |
53 | #define TIO_OCRNL 0x00000008 /* 0000010 */ | |
54 | #define TIO_ONOCR 0x00000010 /* 0000020 */ | |
55 | #define TIO_ONLRET 0x00000020 /* 0000040 */ | |
56 | #define TIO_OFILL 0x00000040 /* 0000100 */ | |
57 | #define TIO_OFDEL 0x00000080 /* 0000200 */ | |
58 | #define TIO_NLDLY 0x00000100 /* 0000400 */ | |
a8fd2d0d | 59 | #define TIO_NL0 0 |
83ed508e MH |
60 | #define TIO_NL1 0x00000100 /* 0000400 */ |
61 | #define TIO_CRDLY 0x00000600 /* 0003000 */ | |
a8fd2d0d | 62 | #define TIO_CR0 0 |
83ed508e MH |
63 | #define TIO_CR1 0x00000200 /* 0001000 */ |
64 | #define TIO_CR2 0x00000400 /* 0002000 */ | |
65 | #define TIO_CR3 0x00000600 /* 0003000 */ | |
66 | #define TIO_TABDLY 0x00001800 /* 0014000 */ | |
a8fd2d0d | 67 | #define TIO_TAB0 0 |
83ed508e MH |
68 | #define TIO_TAB1 0x00000800 /* 0004000 */ |
69 | #define TIO_TAB2 0x00001000 /* 0010000 */ | |
70 | #define TIO_TAB3 0x00001800 /* 0014000 */ | |
71 | #define TIO_BSDLY 0x00002000 /* 0020000 */ | |
a8fd2d0d | 72 | #define TIO_BS0 0 |
83ed508e MH |
73 | #define TIO_BS1 0x00002000 /* 0020000 */ |
74 | #define TIO_VTDLY 0x00004000 /* 0040000 */ | |
a8fd2d0d | 75 | #define TIO_VT0 0 |
83ed508e MH |
76 | #define TIO_VT1 0x00004000 /* 0040000 */ |
77 | #define TIO_FFDLY 0x00008000 /* 0100000 */ | |
a8fd2d0d | 78 | #define TIO_FF0 0 |
83ed508e | 79 | #define TIO_FF1 0x00008000 /* 0100000 */ |
a8fd2d0d KM |
80 | |
81 | /* control modes */ | |
83ed508e | 82 | #define TIO_CBAUD 0x0000001f /* 0000037 */ |
a8fd2d0d | 83 | #define TIO_B0 0 |
83ed508e MH |
84 | #define TIO_B50 0x00000001 /* 0000001 */ |
85 | #define TIO_B75 0x00000002 /* 0000002 */ | |
86 | #define TIO_B110 0x00000003 /* 0000003 */ | |
87 | #define TIO_B134 0x00000004 /* 0000004 */ | |
88 | #define TIO_B150 0x00000005 /* 0000005 */ | |
89 | #define TIO_B200 0x00000006 /* 0000006 */ | |
90 | #define TIO_B300 0x00000007 /* 0000007 */ | |
91 | #define TIO_B600 0x00000008 /* 0000010 */ | |
92 | #define TIO_B900 0x00000009 /* 0000011 */ | |
93 | #define TIO_B1200 0x0000000a /* 0000012 */ | |
94 | #define TIO_B1800 0x0000000b /* 0000013 */ | |
95 | #define TIO_B2400 0x0000000c /* 0000014 */ | |
96 | #define TIO_B3600 0x0000000d /* 0000015 */ | |
97 | #define TIO_B4800 0x0000000e /* 0000016 */ | |
98 | #define TIO_B7200 0x0000000f /* 0000017 */ | |
99 | #define TIO_B9600 0x00000010 /* 0000020 */ | |
100 | #define TIO_B19200 0x00000011 /* 0000021 */ | |
101 | #define TIO_B38400 0x00000012 /* 0000022 */ | |
102 | #define TIO_EXTA 0x0000001e /* 0000036 */ | |
103 | #define TIO_EXTB 0x0000001f /* 0000037 */ | |
104 | #define TIO_CSIZE 0x00000060 /* 0000140 */ | |
a8fd2d0d | 105 | #define TIO_CS5 0 |
83ed508e MH |
106 | #define TIO_CS6 0x00000020 /* 0000040 */ |
107 | #define TIO_CS7 0x00000040 /* 0000100 */ | |
108 | #define TIO_CS8 0x00000060 /* 0000140 */ | |
109 | #define TIO_CSTOPB 0x00000080 /* 0000200 */ | |
110 | #define TIO_CREAD 0x00000100 /* 0000400 */ | |
111 | #define TIO_PARENB 0x00000200 /* 0001000 */ | |
112 | #define TIO_PARODD 0x00000400 /* 0002000 */ | |
113 | #define TIO_HUPCL 0x00000800 /* 0004000 */ | |
114 | #define TIO_CLOCAL 0x00001000 /* 0010000 */ | |
115 | #define TIO_CRTS 0x00002000 /* 0020000 */ /* Obsolete */ | |
a8fd2d0d KM |
116 | |
117 | /* line discipline 0 modes */ | |
83ed508e MH |
118 | #define TIO_ISIG 0x00000001 /* 0000001 */ |
119 | #define TIO_ICANON 0x00000002 /* 0000002 */ | |
120 | #define TIO_XCASE 0x00000004 /* 0000004 */ | |
121 | #define TIO_ECHO 0x00000008 /* 0000010 */ | |
122 | #define TIO_ECHOE 0x00000010 /* 0000020 */ | |
123 | #define TIO_ECHOK 0x00000020 /* 0000040 */ | |
124 | #define TIO_ECHONL 0x00000040 /* 0000100 */ | |
125 | #define TIO_NOFLSH 0x00000080 /* 0000200 */ | |
a8fd2d0d KM |
126 | |
127 | struct hpuxtermio { | |
128 | u_short c_iflag; /* input modes */ | |
129 | u_short c_oflag; /* output modes */ | |
130 | u_short c_cflag; /* control modes */ | |
131 | u_short c_lflag; /* line discipline modes */ | |
132 | char c_line; /* line discipline */ | |
133 | u_char c_cc[HPUXNCC]; /* control chars */ | |
134 | }; | |
135 | ||
136 | #define HPUXTCGETA _IOR('T', 1, struct hpuxtermio) | |
137 | #define HPUXTCSETA _IOW('T', 2, struct hpuxtermio) | |
138 | #define HPUXTCSETAW _IOW('T', 3, struct hpuxtermio) | |
139 | #define HPUXTCSETAF _IOW('T', 4, struct hpuxtermio) | |
c34072bf MH |
140 | |
141 | /* HP-UX termios stuff */ | |
142 | ||
143 | #define HPUXNCCS 16 | |
144 | ||
145 | /* control characters */ | |
146 | #define HPUXVMINS 11 /* different than termio */ | |
147 | #define HPUXVTIMES 12 /* different than termio */ | |
148 | #define HPUXVSUSP 13 | |
149 | #define HPUXVSTART 14 | |
150 | #define HPUXVSTOP 15 | |
151 | ||
152 | struct hpuxtermios { | |
153 | u_int c_iflag; /* input modes */ | |
154 | u_int c_oflag; /* output modes */ | |
155 | u_int c_cflag; /* control modes */ | |
156 | u_int c_lflag; /* line discipline modes */ | |
157 | u_int c_reserved; /* future use */ | |
158 | u_char c_cc[HPUXNCCS]; /* control chars */ | |
159 | }; | |
160 | ||
161 | #define HPUXTCGETATTR _IOR('T', 16, struct hpuxtermios) | |
162 | #define HPUXTCSETATTR _IOW('T', 17, struct hpuxtermios) | |
163 | #define HPUXTCSETATTRD _IOW('T', 18, struct hpuxtermios) | |
164 | #define HPUXTCSETATTRF _IOW('T', 19, struct hpuxtermios) |