1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 #define HPUXNCC 8
45
46
47 #define HPUXVINTR 0
48 #define HPUXVQUIT 1
49 #define HPUXVERASE 2
50 #define HPUXVKILL 3
51 #define HPUXVEOF 4
52 #define HPUXVEOL 5
53 #define HPUXVMIN 4
54 #define HPUXVTIME 5
55 #define HPUXVEOL2 6
56 #define HPUXVSWTCH 7
57
58
59 #define TIO_IGNBRK 0x00000001
60 #define TIO_BRKINT 0x00000002
61 #define TIO_IGNPAR 0x00000004
62 #define TIO_PARMRK 0x00000008
63 #define TIO_INPCK 0x00000010
64 #define TIO_ISTRIP 0x00000020
65 #define TIO_INLCR 0x00000040
66 #define TIO_IGNCR 0x00000080
67 #define TIO_ICRNL 0x00000100
68 #define TIO_IUCLC 0x00000200
69 #define TIO_IXON 0x00000400
70 #define TIO_IXANY 0x00000800
71 #define TIO_IXOFF 0x00001000
72 #define TIO_IENQAK 0x00002000
73
74
75 #define TIO_OPOST 0x00000001
76 #define TIO_OLCUC 0x00000002
77 #define TIO_ONLCR 0x00000004
78 #define TIO_OCRNL 0x00000008
79 #define TIO_ONOCR 0x00000010
80 #define TIO_ONLRET 0x00000020
81 #define TIO_OFILL 0x00000040
82 #define TIO_OFDEL 0x00000080
83 #define TIO_NLDLY 0x00000100
84 #define TIO_NL0 0
85 #define TIO_NL1 0x00000100
86 #define TIO_CRDLY 0x00000600
87 #define TIO_CR0 0
88 #define TIO_CR1 0x00000200
89 #define TIO_CR2 0x00000400
90 #define TIO_CR3 0x00000600
91 #define TIO_TABDLY 0x00001800
92 #define TIO_TAB0 0
93 #define TIO_TAB1 0x00000800
94 #define TIO_TAB2 0x00001000
95 #define TIO_TAB3 0x00001800
96 #define TIO_BSDLY 0x00002000
97 #define TIO_BS0 0
98 #define TIO_BS1 0x00002000
99 #define TIO_VTDLY 0x00004000
100 #define TIO_VT0 0
101 #define TIO_VT1 0x00004000
102 #define TIO_FFDLY 0x00008000
103 #define TIO_FF0 0
104 #define TIO_FF1 0x00008000
105
106
107 #define TIO_CBAUD 0x0000001f
108 #define TIO_B0 0
109 #define TIO_B50 0x00000001
110 #define TIO_B75 0x00000002
111 #define TIO_B110 0x00000003
112 #define TIO_B134 0x00000004
113 #define TIO_B150 0x00000005
114 #define TIO_B200 0x00000006
115 #define TIO_B300 0x00000007
116 #define TIO_B600 0x00000008
117 #define TIO_B900 0x00000009
118 #define TIO_B1200 0x0000000a
119 #define TIO_B1800 0x0000000b
120 #define TIO_B2400 0x0000000c
121 #define TIO_B3600 0x0000000d
122 #define TIO_B4800 0x0000000e
123 #define TIO_B7200 0x0000000f
124 #define TIO_B9600 0x00000010
125 #define TIO_B19200 0x00000011
126 #define TIO_B38400 0x00000012
127 #define TIO_EXTA 0x0000001e
128 #define TIO_EXTB 0x0000001f
129 #define TIO_CSIZE 0x00000060
130 #define TIO_CS5 0
131 #define TIO_CS6 0x00000020
132 #define TIO_CS7 0x00000040
133 #define TIO_CS8 0x00000060
134 #define TIO_CSTOPB 0x00000080
135 #define TIO_CREAD 0x00000100
136 #define TIO_PARENB 0x00000200
137 #define TIO_PARODD 0x00000400
138 #define TIO_HUPCL 0x00000800
139 #define TIO_CLOCAL 0x00001000
140 #define TIO_CRTS 0x00002000
141
142
143 #define TIO_ISIG 0x00000001
144 #define TIO_ICANON 0x00000002
145 #define TIO_XCASE 0x00000004
146 #define TIO_ECHO 0x00000008
147 #define TIO_ECHOE 0x00000010
148 #define TIO_ECHOK 0x00000020
149 #define TIO_ECHONL 0x00000040
150 #define TIO_NOFLSH 0x00000080
151
152 struct hpux_termio {
153 u_short c_iflag;
154 u_short c_oflag;
155 u_short c_cflag;
156 u_short c_lflag;
157 char c_line;
158 u_char c_cc[HPUXNCC];
159 };
160
161 #define HPUXTCGETA _IOR('T', 1, struct hpux_termio)
162 #define HPUXTCSETA _IOW('T', 2, struct hpux_termio)
163 #define HPUXTCSETAW _IOW('T', 3, struct hpux_termio)
164 #define HPUXTCSETAF _IOW('T', 4, struct hpux_termio)
165
166
167
168 #define HPUXNCCS 16
169
170
171 #define HPUXVMINS 11
172 #define HPUXVTIMES 12
173 #define HPUXVSUSP 13
174 #define HPUXVSTART 14
175 #define HPUXVSTOP 15
176
177 struct hpux_termios {
178 u_int c_iflag;
179 u_int c_oflag;
180 u_int c_cflag;
181 u_int c_lflag;
182 u_int c_reserved;
183 u_char c_cc[HPUXNCCS];
184 };
185
186 #define HPUXTCGETATTR _IOR('T', 16, struct hpux_termios)
187 #define HPUXTCSETATTR _IOW('T', 17, struct hpux_termios)
188 #define HPUXTCSETATTRD _IOW('T', 18, struct hpux_termios)
189 #define HPUXTCSETATTRF _IOW('T', 19, struct hpux_termios)
190
191 #ifdef _KERNEL
192 struct termio;
193 struct termios;
194
195 int hpux_termio(int, int, caddr_t, struct proc *);
196 void termiototermios(struct hpux_termio *, struct hpux_termios *,
197 struct termios *);
198 void termiostotermio(struct hpux_termios *, struct hpux_termio *);
199 int bsdtohpuxbaud(long);
200 int hpuxtobsdbaud(int);
201 int getsettty(struct proc *, int, int, caddr_t);
202 #endif