1 /* $OpenBSD: tables.c,v 1.11 2005/07/16 16:31:46 henning Exp $ */
2 /* $DragonFly: src/sbin/dhclient/tables.c,v 1.1 2008/08/30 16:07:58 hasso Exp $ */
4 /* Tables of information... */
7 * Copyright (c) 1995, 1996 The Internet Software Consortium.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of The Internet Software Consortium nor the names
20 * of its contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
24 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
31 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
34 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * This software has been written for the Internet Software Consortium
38 * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
39 * Enterprises. To learn more about the Internet Software Consortium,
40 * see ``http://www.vix.com/isc''. To learn more about Vixie
41 * Enterprises, see ``http://www.vix.com''.
47 * DHCP Option names, formats and codes, from RFC1533.
53 * l - 32-bit signed integer
54 * L - 32-bit unsigned integer
55 * s - 16-bit signed integer
56 * S - 16-bit unsigned integer
57 * b - 8-bit signed integer
58 * B - 8-bit unsigned integer
60 * f - flag (true or false)
61 * A - array of whatever precedes (e.g., IA means array of IP addresses)
64 const struct option dhcp_options
[256] = {
65 /* 0 */ { "pad", "" },
66 /* 1 */ { "subnet-mask", "I" },
67 /* 2 */ { "time-offset", "l" },
68 /* 3 */ { "routers", "IA" },
69 /* 4 */ { "time-servers", "IA" },
70 /* 5 */ { "ien116-name-servers", "IA" },
71 /* 6 */ { "domain-name-servers", "IA" },
72 /* 7 */ { "log-servers", "IA" },
73 /* 8 */ { "cookie-servers", "IA" },
74 /* 9 */ { "lpr-servers", "IA" },
75 /* 10 */ { "impress-servers", "IA" },
76 /* 11 */ { "resource-location-servers", "IA" },
77 /* 12 */ { "host-name", "t" },
78 /* 13 */ { "boot-size", "S" },
79 /* 14 */ { "merit-dump", "t" },
80 /* 15 */ { "domain-name", "t" },
81 /* 16 */ { "swap-server", "I" },
82 /* 17 */ { "root-path", "t" },
83 /* 18 */ { "extensions-path", "t" },
84 /* 19 */ { "ip-forwarding", "f" },
85 /* 20 */ { "non-local-source-routing", "f" },
86 /* 21 */ { "policy-filter", "IIA" },
87 /* 22 */ { "max-dgram-reassembly", "S" },
88 /* 23 */ { "default-ip-ttl", "B" },
89 /* 24 */ { "path-mtu-aging-timeout", "L" },
90 /* 25 */ { "path-mtu-plateau-table", "SA" },
91 /* 26 */ { "interface-mtu", "S" },
92 /* 27 */ { "all-subnets-local", "f" },
93 /* 28 */ { "broadcast-address", "I" },
94 /* 29 */ { "perform-mask-discovery", "f" },
95 /* 30 */ { "mask-supplier", "f" },
96 /* 31 */ { "router-discovery", "f" },
97 /* 32 */ { "router-solicitation-address", "I" },
98 /* 33 */ { "static-routes", "IIA" },
99 /* 34 */ { "trailer-encapsulation", "f" },
100 /* 35 */ { "arp-cache-timeout", "L" },
101 /* 36 */ { "ieee802-3-encapsulation", "f" },
102 /* 37 */ { "default-tcp-ttl", "B" },
103 /* 38 */ { "tcp-keepalive-interval", "L" },
104 /* 39 */ { "tcp-keepalive-garbage", "f" },
105 /* 40 */ { "nis-domain", "t" },
106 /* 41 */ { "nis-servers", "IA" },
107 /* 42 */ { "ntp-servers", "IA" },
108 /* 43 */ { "vendor-encapsulated-options", "X" },
109 /* 44 */ { "netbios-name-servers", "IA" },
110 /* 45 */ { "netbios-dd-server", "IA" },
111 /* 46 */ { "netbios-node-type", "B" },
112 /* 47 */ { "netbios-scope", "t" },
113 /* 48 */ { "font-servers", "IA" },
114 /* 49 */ { "x-display-manager", "IA" },
115 /* 50 */ { "dhcp-requested-address", "I" },
116 /* 51 */ { "dhcp-lease-time", "L" },
117 /* 52 */ { "dhcp-option-overload", "B" },
118 /* 53 */ { "dhcp-message-type", "B" },
119 /* 54 */ { "dhcp-server-identifier", "I" },
120 /* 55 */ { "dhcp-parameter-request-list", "BA" },
121 /* 56 */ { "dhcp-message", "t" },
122 /* 57 */ { "dhcp-max-message-size", "S" },
123 /* 58 */ { "dhcp-renewal-time", "L" },
124 /* 59 */ { "dhcp-rebinding-time", "L" },
125 /* 60 */ { "dhcp-class-identifier", "t" },
126 /* 61 */ { "dhcp-client-identifier", "X" },
127 /* 62 */ { "option-62", "X" },
128 /* 63 */ { "option-63", "X" },
129 /* 64 */ { "nisplus-domain", "t" },
130 /* 65 */ { "nisplus-servers", "IA" },
131 /* 66 */ { "tftp-server-name", "t" },
132 /* 67 */ { "bootfile-name", "t" },
133 /* 68 */ { "mobile-ip-home-agent", "IA" },
134 /* 69 */ { "smtp-server", "IA" },
135 /* 70 */ { "pop-server", "IA" },
136 /* 71 */ { "nntp-server", "IA" },
137 /* 72 */ { "www-server", "IA" },
138 /* 73 */ { "finger-server", "IA" },
139 /* 74 */ { "irc-server", "IA" },
140 /* 75 */ { "streettalk-server", "IA" },
141 /* 76 */ { "streettalk-directory-assistance-server", "IA" },
142 /* 77 */ { "user-class", "t" },
143 /* 78 */ { "option-78", "X" },
144 /* 79 */ { "option-79", "X" },
145 /* 80 */ { "option-80", "X" },
146 /* 81 */ { "option-81", "X" },
147 /* 82 */ { "option-82", "X" },
148 /* 83 */ { "option-83", "X" },
149 /* 84 */ { "option-84", "X" },
150 /* 85 */ { "nds-servers", "IA" },
151 /* 86 */ { "nds-tree-name", "X" },
152 /* 87 */ { "nds-context", "X" },
153 /* 88 */ { "option-88", "X" },
154 /* 89 */ { "option-89", "X" },
155 /* 90 */ { "option-90", "X" },
156 /* 91 */ { "option-91", "X" },
157 /* 92 */ { "option-92", "X" },
158 /* 93 */ { "option-93", "X" },
159 /* 94 */ { "option-94", "X" },
160 /* 95 */ { "option-95", "X" },
161 /* 96 */ { "option-96", "X" },
162 /* 97 */ { "option-97", "X" },
163 /* 98 */ { "option-98", "X" },
164 /* 99 */ { "option-99", "X" },
165 /* 100 */ { "option-100", "X" },
166 /* 101 */ { "option-101", "X" },
167 /* 102 */ { "option-102", "X" },
168 /* 103 */ { "option-103", "X" },
169 /* 104 */ { "option-104", "X" },
170 /* 105 */ { "option-105", "X" },
171 /* 106 */ { "option-106", "X" },
172 /* 107 */ { "option-107", "X" },
173 /* 108 */ { "option-108", "X" },
174 /* 109 */ { "option-109", "X" },
175 /* 110 */ { "option-110", "X" },
176 /* 111 */ { "option-111", "X" },
177 /* 112 */ { "option-112", "X" },
178 /* 113 */ { "option-113", "X" },
179 /* 114 */ { "option-114", "X" },
180 /* 115 */ { "option-115", "X" },
181 /* 116 */ { "option-116", "X" },
182 /* 117 */ { "option-117", "X" },
183 /* 118 */ { "option-118", "X" },
184 /* 119 */ { "option-119", "X" },
185 /* 120 */ { "option-120", "X" },
186 /* 121 */ { "option-121", "X" },
187 /* 122 */ { "option-122", "X" },
188 /* 123 */ { "option-123", "X" },
189 /* 124 */ { "option-124", "X" },
190 /* 125 */ { "option-125", "X" },
191 /* 126 */ { "option-126", "X" },
192 /* 127 */ { "option-127", "X" },
193 /* 128 */ { "option-128", "X" },
194 /* 129 */ { "option-129", "X" },
195 /* 130 */ { "option-130", "X" },
196 /* 131 */ { "option-131", "X" },
197 /* 132 */ { "option-132", "X" },
198 /* 133 */ { "option-133", "X" },
199 /* 134 */ { "option-134", "X" },
200 /* 135 */ { "option-135", "X" },
201 /* 136 */ { "option-136", "X" },
202 /* 137 */ { "option-137", "X" },
203 /* 138 */ { "option-138", "X" },
204 /* 139 */ { "option-139", "X" },
205 /* 140 */ { "option-140", "X" },
206 /* 141 */ { "option-141", "X" },
207 /* 142 */ { "option-142", "X" },
208 /* 143 */ { "option-143", "X" },
209 /* 144 */ { "option-144", "X" },
210 /* 145 */ { "option-145", "X" },
211 /* 146 */ { "option-146", "X" },
212 /* 147 */ { "option-147", "X" },
213 /* 148 */ { "option-148", "X" },
214 /* 149 */ { "option-149", "X" },
215 /* 150 */ { "option-150", "X" },
216 /* 151 */ { "option-151", "X" },
217 /* 152 */ { "option-152", "X" },
218 /* 153 */ { "option-153", "X" },
219 /* 154 */ { "option-154", "X" },
220 /* 155 */ { "option-155", "X" },
221 /* 156 */ { "option-156", "X" },
222 /* 157 */ { "option-157", "X" },
223 /* 158 */ { "option-158", "X" },
224 /* 159 */ { "option-159", "X" },
225 /* 160 */ { "option-160", "X" },
226 /* 161 */ { "option-161", "X" },
227 /* 162 */ { "option-162", "X" },
228 /* 163 */ { "option-163", "X" },
229 /* 164 */ { "option-164", "X" },
230 /* 165 */ { "option-165", "X" },
231 /* 166 */ { "option-166", "X" },
232 /* 167 */ { "option-167", "X" },
233 /* 168 */ { "option-168", "X" },
234 /* 169 */ { "option-169", "X" },
235 /* 170 */ { "option-170", "X" },
236 /* 171 */ { "option-171", "X" },
237 /* 172 */ { "option-172", "X" },
238 /* 173 */ { "option-173", "X" },
239 /* 174 */ { "option-174", "X" },
240 /* 175 */ { "option-175", "X" },
241 /* 176 */ { "option-176", "X" },
242 /* 177 */ { "option-177", "X" },
243 /* 178 */ { "option-178", "X" },
244 /* 179 */ { "option-179", "X" },
245 /* 180 */ { "option-180", "X" },
246 /* 181 */ { "option-181", "X" },
247 /* 182 */ { "option-182", "X" },
248 /* 183 */ { "option-183", "X" },
249 /* 184 */ { "option-184", "X" },
250 /* 185 */ { "option-185", "X" },
251 /* 186 */ { "option-186", "X" },
252 /* 187 */ { "option-187", "X" },
253 /* 188 */ { "option-188", "X" },
254 /* 189 */ { "option-189", "X" },
255 /* 190 */ { "option-190", "X" },
256 /* 191 */ { "option-191", "X" },
257 /* 192 */ { "option-192", "X" },
258 /* 193 */ { "option-193", "X" },
259 /* 194 */ { "option-194", "X" },
260 /* 195 */ { "option-195", "X" },
261 /* 196 */ { "option-196", "X" },
262 /* 197 */ { "option-197", "X" },
263 /* 198 */ { "option-198", "X" },
264 /* 199 */ { "option-199", "X" },
265 /* 200 */ { "option-200", "X" },
266 /* 201 */ { "option-201", "X" },
267 /* 202 */ { "option-202", "X" },
268 /* 203 */ { "option-203", "X" },
269 /* 204 */ { "option-204", "X" },
270 /* 205 */ { "option-205", "X" },
271 /* 206 */ { "option-206", "X" },
272 /* 207 */ { "option-207", "X" },
273 /* 208 */ { "option-208", "X" },
274 /* 209 */ { "option-209", "X" },
275 /* 210 */ { "option-210", "X" },
276 /* 211 */ { "option-211", "X" },
277 /* 212 */ { "option-212", "X" },
278 /* 213 */ { "option-213", "X" },
279 /* 214 */ { "option-214", "X" },
280 /* 215 */ { "option-215", "X" },
281 /* 216 */ { "option-216", "X" },
282 /* 217 */ { "option-217", "X" },
283 /* 218 */ { "option-218", "X" },
284 /* 219 */ { "option-219", "X" },
285 /* 220 */ { "option-220", "X" },
286 /* 221 */ { "option-221", "X" },
287 /* 222 */ { "option-222", "X" },
288 /* 223 */ { "option-223", "X" },
289 /* 224 */ { "option-224", "X" },
290 /* 225 */ { "option-225", "X" },
291 /* 226 */ { "option-226", "X" },
292 /* 227 */ { "option-227", "X" },
293 /* 228 */ { "option-228", "X" },
294 /* 229 */ { "option-229", "X" },
295 /* 230 */ { "option-230", "X" },
296 /* 231 */ { "option-231", "X" },
297 /* 232 */ { "option-232", "X" },
298 /* 233 */ { "option-233", "X" },
299 /* 234 */ { "option-234", "X" },
300 /* 235 */ { "option-235", "X" },
301 /* 236 */ { "option-236", "X" },
302 /* 237 */ { "option-237", "X" },
303 /* 238 */ { "option-238", "X" },
304 /* 239 */ { "option-239", "X" },
305 /* 240 */ { "option-240", "X" },
306 /* 241 */ { "option-241", "X" },
307 /* 242 */ { "option-242", "X" },
308 /* 243 */ { "option-243", "X" },
309 /* 244 */ { "option-244", "X" },
310 /* 245 */ { "option-245", "X" },
311 /* 246 */ { "option-246", "X" },
312 /* 247 */ { "option-247", "X" },
313 /* 248 */ { "option-248", "X" },
314 /* 249 */ { "option-249", "X" },
315 /* 250 */ { "option-250", "X" },
316 /* 251 */ { "option-251", "X" },
317 /* 252 */ { "option-252", "X" },
318 /* 253 */ { "option-253", "X" },
319 /* 254 */ { "option-254", "X" },
320 /* 255 */ { "option-end", "e" },