Allow IPv6 address entry in tools>ping - Loosens valid character check
[tomato/davidwu.git] / release / src / router / dropbear / termcodes.c
blobd59505cfbacbf5f361d3f7a3b7a120c673651b73
1 /*
2 * Dropbear - a SSH2 server
3 *
4 * Copyright (c) 2002,2003 Matt Johnston
5 * All rights reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE. */
25 #include "includes.h"
26 #include "termcodes.h"
28 const struct TermCode termcodes[MAX_TERMCODE+1] = {
30 {0, 0}, /* TTY_OP_END */
31 {VINTR, TERMCODE_CONTROLCHAR}, /* control character codes */
32 {VQUIT, TERMCODE_CONTROLCHAR},
33 {VERASE, TERMCODE_CONTROLCHAR},
34 {VKILL, TERMCODE_CONTROLCHAR},
35 {VEOF, TERMCODE_CONTROLCHAR},
36 {VEOL, TERMCODE_CONTROLCHAR},
37 {VEOL2, TERMCODE_CONTROLCHAR},
38 {VSTART, TERMCODE_CONTROLCHAR},
39 {VSTOP, TERMCODE_CONTROLCHAR},
40 {VSUSP, TERMCODE_CONTROLCHAR},
41 #ifdef VDSUSP
42 {VDSUSP, TERMCODE_CONTROLCHAR},
43 #else
44 {0, 0},
45 #endif
46 #ifdef VREPRINT
47 {VREPRINT, TERMCODE_CONTROLCHAR},
48 #else
49 {0, 0},
50 #endif
51 #ifdef AIX
52 {CERASE, TERMCODE_CONTROLCHAR},
53 #else
54 {VWERASE, TERMCODE_CONTROLCHAR},
55 #endif
56 {VLNEXT, TERMCODE_CONTROLCHAR},
57 #ifdef VFLUSH
58 {VFLUSH, TERMCODE_CONTROLCHAR},
59 #else
60 {0, 0},
61 #endif
62 #ifdef VSWTCH
63 {VSWTCH, TERMCODE_CONTROLCHAR},
64 #else
65 {0, 0},
66 #endif
67 #ifdef VSTATUS
68 {VSTATUS, TERMCODE_CONTROLCHAR},
69 #else
70 {0, 0},
71 #endif
72 #ifdef AIX
73 {CKILL, TERMCODE_CONTROLCHAR},
74 #elif defined(VDISCARD)
75 {VDISCARD, TERMCODE_CONTROLCHAR},
76 #else
77 {0, 0},
78 #endif
79 {0, 0}, /* 19 */
80 {0, 0},
81 {0, 0},
82 {0, 0},
83 {0, 0},
84 {0, 0},
85 {0, 0},
86 {0, 0},
87 {0, 0},
88 {0, 0},
89 {0, 0}, /* 29 */
90 {IGNPAR, TERMCODE_INPUT}, /* input flags */
91 {PARMRK, TERMCODE_INPUT},
92 {INPCK, TERMCODE_INPUT},
93 {ISTRIP, TERMCODE_INPUT},
94 {INLCR, TERMCODE_INPUT},
95 {IGNCR, TERMCODE_INPUT},
96 {ICRNL, TERMCODE_INPUT},
97 #ifdef IUCLC
98 {IUCLC, TERMCODE_INPUT},
99 #else
100 {0, 0},
101 #endif
102 {IXON, TERMCODE_INPUT},
103 {IXANY, TERMCODE_INPUT},
104 {IXOFF, TERMCODE_INPUT},
105 #ifdef IMAXBEL
106 {IMAXBEL, TERMCODE_INPUT},
107 #else
108 {0, 0},
109 #endif
110 {0, 0}, /* 42 */
111 {0, 0},
112 {0, 0},
113 {0, 0},
114 {0, 0},
115 {0, 0},
116 {0, 0},
117 {0, 0}, /* 49 */
118 {ISIG, TERMCODE_LOCAL}, /* local flags */
119 {ICANON, TERMCODE_LOCAL},
120 #ifdef XCASE
121 {XCASE, TERMCODE_LOCAL},
122 #else
123 {0, 0},
124 #endif
125 {ECHO, TERMCODE_LOCAL},
126 {ECHOE, TERMCODE_LOCAL},
127 {ECHOK, TERMCODE_LOCAL},
128 {ECHONL, TERMCODE_LOCAL},
129 {NOFLSH, TERMCODE_LOCAL},
130 {TOSTOP, TERMCODE_LOCAL},
131 {IEXTEN, TERMCODE_LOCAL},
132 {ECHOCTL, TERMCODE_LOCAL},
133 {ECHOKE, TERMCODE_LOCAL},
134 #ifdef PENDIN
135 {PENDIN, TERMCODE_LOCAL},
136 #else
137 {0, 0},
138 #endif
139 {0, 0}, /* 63 */
140 {0, 0},
141 {0, 0},
142 {0, 0},
143 {0, 0},
144 {0, 0},
145 {0, 0}, /* 69 */
146 {OPOST, TERMCODE_OUTPUT}, /* output flags */
147 #ifdef OLCUC
148 {OLCUC, TERMCODE_OUTPUT},
149 #else
150 {0, 0},
151 #endif
152 {ONLCR, TERMCODE_OUTPUT},
153 #ifdef OCRNL
154 {OCRNL, TERMCODE_OUTPUT},
155 #else
156 {0, 0},
157 #endif
158 #ifdef ONOCR
159 {ONOCR, TERMCODE_OUTPUT},
160 #else
161 {0, 0},
162 #endif
163 #ifdef ONLRET
164 {ONLRET, TERMCODE_OUTPUT},
165 #else
166 {0, 0},
167 #endif
168 {0, 0}, /* 76 */
169 {0, 0},
170 {0, 0},
171 {0, 0},
172 {0, 0},
173 {0, 0},
174 {0, 0},
175 {0, 0},
176 {0, 0},
177 {0, 0},
178 {0, 0},
179 {0, 0},
180 {0, 0},
181 {0, 0}, /* 89 */
182 {CS7, TERMCODE_CONTROL},
183 {CS8, TERMCODE_CONTROL},
184 {PARENB, TERMCODE_CONTROL},
185 {PARODD, TERMCODE_CONTROL}
186 /* 94 */