tables.c revision 148411
1/* $OpenBSD: tables.c,v 1.4 2004/05/04 20:28:40 deraadt Exp $ */ 2/* $FreeBSD: head/sbin/dhclient/tables.c 148411 2005-07-25 22:19:09Z brooks $ */ 3 4/* Tables of information... */ 5 6/* 7 * Copyright (c) 1995, 1996 The Internet Software Consortium. 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 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. 22 * 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 35 * SUCH DAMAGE. 36 * 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''. 42 */ 43 44#include "dhcpd.h" 45 46/* 47 * DHCP Option names, formats and codes, from RFC1533. 48 * 49 * Format codes: 50 * 51 * e - end of data 52 * I - IP address 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 59 * t - ASCII text 60 * f - flag (true or false) 61 * A - array of whatever precedes (e.g., IA means array of IP addresses) 62 */ 63 64struct universe dhcp_universe; 65struct option dhcp_options[256] = { 66 { "pad", "", &dhcp_universe, 0 }, 67 { "subnet-mask", "I", &dhcp_universe, 1 }, 68 { "time-offset", "l", &dhcp_universe, 2 }, 69 { "routers", "IA", &dhcp_universe, 3 }, 70 { "time-servers", "IA", &dhcp_universe, 4 }, 71 { "ien116-name-servers", "IA", &dhcp_universe, 5 }, 72 { "domain-name-servers", "IA", &dhcp_universe, 6 }, 73 { "log-servers", "IA", &dhcp_universe, 7 }, 74 { "cookie-servers", "IA", &dhcp_universe, 8 }, 75 { "lpr-servers", "IA", &dhcp_universe, 9 }, 76 { "impress-servers", "IA", &dhcp_universe, 10 }, 77 { "resource-location-servers", "IA", &dhcp_universe, 11 }, 78 { "host-name", "t", &dhcp_universe, 12 }, 79 { "boot-size", "S", &dhcp_universe, 13 }, 80 { "merit-dump", "t", &dhcp_universe, 14 }, 81 { "domain-name", "t", &dhcp_universe, 15 }, 82 { "swap-server", "I", &dhcp_universe, 16 }, 83 { "root-path", "t", &dhcp_universe, 17 }, 84 { "extensions-path", "t", &dhcp_universe, 18 }, 85 { "ip-forwarding", "f", &dhcp_universe, 19 }, 86 { "non-local-source-routing", "f", &dhcp_universe, 20 }, 87 { "policy-filter", "IIA", &dhcp_universe, 21 }, 88 { "max-dgram-reassembly", "S", &dhcp_universe, 22 }, 89 { "default-ip-ttl", "B", &dhcp_universe, 23 }, 90 { "path-mtu-aging-timeout", "L", &dhcp_universe, 24 }, 91 { "path-mtu-plateau-table", "SA", &dhcp_universe, 25 }, 92 { "interface-mtu", "S", &dhcp_universe, 26 }, 93 { "all-subnets-local", "f", &dhcp_universe, 27 }, 94 { "broadcast-address", "I", &dhcp_universe, 28 }, 95 { "perform-mask-discovery", "f", &dhcp_universe, 29 }, 96 { "mask-supplier", "f", &dhcp_universe, 30 }, 97 { "router-discovery", "f", &dhcp_universe, 31 }, 98 { "router-solicitation-address", "I", &dhcp_universe, 32 }, 99 { "static-routes", "IIA", &dhcp_universe, 33 }, 100 { "trailer-encapsulation", "f", &dhcp_universe, 34 }, 101 { "arp-cache-timeout", "L", &dhcp_universe, 35 }, 102 { "ieee802-3-encapsulation", "f", &dhcp_universe, 36 }, 103 { "default-tcp-ttl", "B", &dhcp_universe, 37 }, 104 { "tcp-keepalive-interval", "L", &dhcp_universe, 38 }, 105 { "tcp-keepalive-garbage", "f", &dhcp_universe, 39 }, 106 { "nis-domain", "t", &dhcp_universe, 40 }, 107 { "nis-servers", "IA", &dhcp_universe, 41 }, 108 { "ntp-servers", "IA", &dhcp_universe, 42 }, 109 { "vendor-encapsulated-options", "X", &dhcp_universe, 43 }, 110 { "netbios-name-servers", "IA", &dhcp_universe, 44 }, 111 { "netbios-dd-server", "IA", &dhcp_universe, 45 }, 112 { "netbios-node-type", "B", &dhcp_universe, 46 }, 113 { "netbios-scope", "t", &dhcp_universe, 47 }, 114 { "font-servers", "IA", &dhcp_universe, 48 }, 115 { "x-display-manager", "IA", &dhcp_universe, 49 }, 116 { "dhcp-requested-address", "I", &dhcp_universe, 50 }, 117 { "dhcp-lease-time", "L", &dhcp_universe, 51 }, 118 { "dhcp-option-overload", "B", &dhcp_universe, 52 }, 119 { "dhcp-message-type", "B", &dhcp_universe, 53 }, 120 { "dhcp-server-identifier", "I", &dhcp_universe, 54 }, 121 { "dhcp-parameter-request-list", "BA", &dhcp_universe, 55 }, 122 { "dhcp-message", "t", &dhcp_universe, 56 }, 123 { "dhcp-max-message-size", "S", &dhcp_universe, 57 }, 124 { "dhcp-renewal-time", "L", &dhcp_universe, 58 }, 125 { "dhcp-rebinding-time", "L", &dhcp_universe, 59 }, 126 { "dhcp-class-identifier", "t", &dhcp_universe, 60 }, 127 { "dhcp-client-identifier", "X", &dhcp_universe, 61 }, 128 { "option-62", "X", &dhcp_universe, 62 }, 129 { "option-63", "X", &dhcp_universe, 63 }, 130 { "nisplus-domain", "t", &dhcp_universe, 64 }, 131 { "nisplus-servers", "IA", &dhcp_universe, 65 }, 132 { "tftp-server-name", "t", &dhcp_universe, 66 }, 133 { "bootfile-name", "t", &dhcp_universe, 67 }, 134 { "mobile-ip-home-agent", "IA", &dhcp_universe, 68 }, 135 { "smtp-server", "IA", &dhcp_universe, 69 }, 136 { "pop-server", "IA", &dhcp_universe, 70 }, 137 { "nntp-server", "IA", &dhcp_universe, 71 }, 138 { "www-server", "IA", &dhcp_universe, 72 }, 139 { "finger-server", "IA", &dhcp_universe, 73 }, 140 { "irc-server", "IA", &dhcp_universe, 74 }, 141 { "streettalk-server", "IA", &dhcp_universe, 75 }, 142 { "streettalk-directory-assistance-server", "IA", &dhcp_universe, 76 }, 143 { "user-class", "t", &dhcp_universe, 77 }, 144 { "option-78", "X", &dhcp_universe, 78 }, 145 { "option-79", "X", &dhcp_universe, 79 }, 146 { "option-80", "X", &dhcp_universe, 80 }, 147 { "option-81", "X", &dhcp_universe, 81 }, 148 { "option-82", "X", &dhcp_universe, 82 }, 149 { "option-83", "X", &dhcp_universe, 83 }, 150 { "option-84", "X", &dhcp_universe, 84 }, 151 { "nds-servers", "IA", &dhcp_universe, 85 }, 152 { "nds-tree-name", "X", &dhcp_universe, 86 }, 153 { "nds-context", "X", &dhcp_universe, 87 }, 154 { "option-88", "X", &dhcp_universe, 88 }, 155 { "option-89", "X", &dhcp_universe, 89 }, 156 { "option-90", "X", &dhcp_universe, 90 }, 157 { "option-91", "X", &dhcp_universe, 91 }, 158 { "option-92", "X", &dhcp_universe, 92 }, 159 { "option-93", "X", &dhcp_universe, 93 }, 160 { "option-94", "X", &dhcp_universe, 94 }, 161 { "option-95", "X", &dhcp_universe, 95 }, 162 { "option-96", "X", &dhcp_universe, 96 }, 163 { "option-97", "X", &dhcp_universe, 97 }, 164 { "option-98", "X", &dhcp_universe, 98 }, 165 { "option-99", "X", &dhcp_universe, 99 }, 166 { "option-100", "X", &dhcp_universe, 100 }, 167 { "option-101", "X", &dhcp_universe, 101 }, 168 { "option-102", "X", &dhcp_universe, 102 }, 169 { "option-103", "X", &dhcp_universe, 103 }, 170 { "option-104", "X", &dhcp_universe, 104 }, 171 { "option-105", "X", &dhcp_universe, 105 }, 172 { "option-106", "X", &dhcp_universe, 106 }, 173 { "option-107", "X", &dhcp_universe, 107 }, 174 { "option-108", "X", &dhcp_universe, 108 }, 175 { "option-109", "X", &dhcp_universe, 109 }, 176 { "option-110", "X", &dhcp_universe, 110 }, 177 { "option-111", "X", &dhcp_universe, 111 }, 178 { "option-112", "X", &dhcp_universe, 112 }, 179 { "option-113", "X", &dhcp_universe, 113 }, 180 { "option-114", "X", &dhcp_universe, 114 }, 181 { "option-115", "X", &dhcp_universe, 115 }, 182 { "option-116", "X", &dhcp_universe, 116 }, 183 { "option-117", "X", &dhcp_universe, 117 }, 184 { "option-118", "X", &dhcp_universe, 118 }, 185 { "option-119", "X", &dhcp_universe, 119 }, 186 { "option-120", "X", &dhcp_universe, 120 }, 187 { "option-121", "X", &dhcp_universe, 121 }, 188 { "option-122", "X", &dhcp_universe, 122 }, 189 { "option-123", "X", &dhcp_universe, 123 }, 190 { "option-124", "X", &dhcp_universe, 124 }, 191 { "option-125", "X", &dhcp_universe, 125 }, 192 { "option-126", "X", &dhcp_universe, 126 }, 193 { "option-127", "X", &dhcp_universe, 127 }, 194 { "option-128", "X", &dhcp_universe, 128 }, 195 { "option-129", "X", &dhcp_universe, 129 }, 196 { "option-130", "X", &dhcp_universe, 130 }, 197 { "option-131", "X", &dhcp_universe, 131 }, 198 { "option-132", "X", &dhcp_universe, 132 }, 199 { "option-133", "X", &dhcp_universe, 133 }, 200 { "option-134", "X", &dhcp_universe, 134 }, 201 { "option-135", "X", &dhcp_universe, 135 }, 202 { "option-136", "X", &dhcp_universe, 136 }, 203 { "option-137", "X", &dhcp_universe, 137 }, 204 { "option-138", "X", &dhcp_universe, 138 }, 205 { "option-139", "X", &dhcp_universe, 139 }, 206 { "option-140", "X", &dhcp_universe, 140 }, 207 { "option-141", "X", &dhcp_universe, 141 }, 208 { "option-142", "X", &dhcp_universe, 142 }, 209 { "option-143", "X", &dhcp_universe, 143 }, 210 { "option-144", "X", &dhcp_universe, 144 }, 211 { "option-145", "X", &dhcp_universe, 145 }, 212 { "option-146", "X", &dhcp_universe, 146 }, 213 { "option-147", "X", &dhcp_universe, 147 }, 214 { "option-148", "X", &dhcp_universe, 148 }, 215 { "option-149", "X", &dhcp_universe, 149 }, 216 { "option-150", "X", &dhcp_universe, 150 }, 217 { "option-151", "X", &dhcp_universe, 151 }, 218 { "option-152", "X", &dhcp_universe, 152 }, 219 { "option-153", "X", &dhcp_universe, 153 }, 220 { "option-154", "X", &dhcp_universe, 154 }, 221 { "option-155", "X", &dhcp_universe, 155 }, 222 { "option-156", "X", &dhcp_universe, 156 }, 223 { "option-157", "X", &dhcp_universe, 157 }, 224 { "option-158", "X", &dhcp_universe, 158 }, 225 { "option-159", "X", &dhcp_universe, 159 }, 226 { "option-160", "X", &dhcp_universe, 160 }, 227 { "option-161", "X", &dhcp_universe, 161 }, 228 { "option-162", "X", &dhcp_universe, 162 }, 229 { "option-163", "X", &dhcp_universe, 163 }, 230 { "option-164", "X", &dhcp_universe, 164 }, 231 { "option-165", "X", &dhcp_universe, 165 }, 232 { "option-166", "X", &dhcp_universe, 166 }, 233 { "option-167", "X", &dhcp_universe, 167 }, 234 { "option-168", "X", &dhcp_universe, 168 }, 235 { "option-169", "X", &dhcp_universe, 169 }, 236 { "option-170", "X", &dhcp_universe, 170 }, 237 { "option-171", "X", &dhcp_universe, 171 }, 238 { "option-172", "X", &dhcp_universe, 172 }, 239 { "option-173", "X", &dhcp_universe, 173 }, 240 { "option-174", "X", &dhcp_universe, 174 }, 241 { "option-175", "X", &dhcp_universe, 175 }, 242 { "option-176", "X", &dhcp_universe, 176 }, 243 { "option-177", "X", &dhcp_universe, 177 }, 244 { "option-178", "X", &dhcp_universe, 178 }, 245 { "option-179", "X", &dhcp_universe, 179 }, 246 { "option-180", "X", &dhcp_universe, 180 }, 247 { "option-181", "X", &dhcp_universe, 181 }, 248 { "option-182", "X", &dhcp_universe, 182 }, 249 { "option-183", "X", &dhcp_universe, 183 }, 250 { "option-184", "X", &dhcp_universe, 184 }, 251 { "option-185", "X", &dhcp_universe, 185 }, 252 { "option-186", "X", &dhcp_universe, 186 }, 253 { "option-187", "X", &dhcp_universe, 187 }, 254 { "option-188", "X", &dhcp_universe, 188 }, 255 { "option-189", "X", &dhcp_universe, 189 }, 256 { "option-190", "X", &dhcp_universe, 190 }, 257 { "option-191", "X", &dhcp_universe, 191 }, 258 { "option-192", "X", &dhcp_universe, 192 }, 259 { "option-193", "X", &dhcp_universe, 193 }, 260 { "option-194", "X", &dhcp_universe, 194 }, 261 { "option-195", "X", &dhcp_universe, 195 }, 262 { "option-196", "X", &dhcp_universe, 196 }, 263 { "option-197", "X", &dhcp_universe, 197 }, 264 { "option-198", "X", &dhcp_universe, 198 }, 265 { "option-199", "X", &dhcp_universe, 199 }, 266 { "option-200", "X", &dhcp_universe, 200 }, 267 { "option-201", "X", &dhcp_universe, 201 }, 268 { "option-202", "X", &dhcp_universe, 202 }, 269 { "option-203", "X", &dhcp_universe, 203 }, 270 { "option-204", "X", &dhcp_universe, 204 }, 271 { "option-205", "X", &dhcp_universe, 205 }, 272 { "option-206", "X", &dhcp_universe, 206 }, 273 { "option-207", "X", &dhcp_universe, 207 }, 274 { "option-208", "X", &dhcp_universe, 208 }, 275 { "option-209", "X", &dhcp_universe, 209 }, 276 { "option-210", "X", &dhcp_universe, 210 }, 277 { "option-211", "X", &dhcp_universe, 211 }, 278 { "option-212", "X", &dhcp_universe, 212 }, 279 { "option-213", "X", &dhcp_universe, 213 }, 280 { "option-214", "X", &dhcp_universe, 214 }, 281 { "option-215", "X", &dhcp_universe, 215 }, 282 { "option-216", "X", &dhcp_universe, 216 }, 283 { "option-217", "X", &dhcp_universe, 217 }, 284 { "option-218", "X", &dhcp_universe, 218 }, 285 { "option-219", "X", &dhcp_universe, 219 }, 286 { "option-220", "X", &dhcp_universe, 220 }, 287 { "option-221", "X", &dhcp_universe, 221 }, 288 { "option-222", "X", &dhcp_universe, 222 }, 289 { "option-223", "X", &dhcp_universe, 223 }, 290 { "option-224", "X", &dhcp_universe, 224 }, 291 { "option-225", "X", &dhcp_universe, 225 }, 292 { "option-226", "X", &dhcp_universe, 226 }, 293 { "option-227", "X", &dhcp_universe, 227 }, 294 { "option-228", "X", &dhcp_universe, 228 }, 295 { "option-229", "X", &dhcp_universe, 229 }, 296 { "option-230", "X", &dhcp_universe, 230 }, 297 { "option-231", "X", &dhcp_universe, 231 }, 298 { "option-232", "X", &dhcp_universe, 232 }, 299 { "option-233", "X", &dhcp_universe, 233 }, 300 { "option-234", "X", &dhcp_universe, 234 }, 301 { "option-235", "X", &dhcp_universe, 235 }, 302 { "option-236", "X", &dhcp_universe, 236 }, 303 { "option-237", "X", &dhcp_universe, 237 }, 304 { "option-238", "X", &dhcp_universe, 238 }, 305 { "option-239", "X", &dhcp_universe, 239 }, 306 { "option-240", "X", &dhcp_universe, 240 }, 307 { "option-241", "X", &dhcp_universe, 241 }, 308 { "option-242", "X", &dhcp_universe, 242 }, 309 { "option-243", "X", &dhcp_universe, 243 }, 310 { "option-244", "X", &dhcp_universe, 244 }, 311 { "option-245", "X", &dhcp_universe, 245 }, 312 { "option-246", "X", &dhcp_universe, 246 }, 313 { "option-247", "X", &dhcp_universe, 247 }, 314 { "option-248", "X", &dhcp_universe, 248 }, 315 { "option-249", "X", &dhcp_universe, 249 }, 316 { "option-250", "X", &dhcp_universe, 250 }, 317 { "option-251", "X", &dhcp_universe, 251 }, 318 { "option-252", "X", &dhcp_universe, 252 }, 319 { "option-253", "X", &dhcp_universe, 253 }, 320 { "option-254", "X", &dhcp_universe, 254 }, 321 { "option-end", "e", &dhcp_universe, 255 }, 322}; 323 324/* 325 * Default dhcp option priority list (this is ad hoc and should not be 326 * mistaken for a carefully crafted and optimized list). 327 */ 328unsigned char dhcp_option_default_priority_list[] = { 329 DHO_DHCP_REQUESTED_ADDRESS, 330 DHO_DHCP_OPTION_OVERLOAD, 331 DHO_DHCP_MAX_MESSAGE_SIZE, 332 DHO_DHCP_RENEWAL_TIME, 333 DHO_DHCP_REBINDING_TIME, 334 DHO_DHCP_CLASS_IDENTIFIER, 335 DHO_DHCP_CLIENT_IDENTIFIER, 336 DHO_SUBNET_MASK, 337 DHO_TIME_OFFSET, 338 DHO_ROUTERS, 339 DHO_TIME_SERVERS, 340 DHO_NAME_SERVERS, 341 DHO_DOMAIN_NAME_SERVERS, 342 DHO_HOST_NAME, 343 DHO_LOG_SERVERS, 344 DHO_COOKIE_SERVERS, 345 DHO_LPR_SERVERS, 346 DHO_IMPRESS_SERVERS, 347 DHO_RESOURCE_LOCATION_SERVERS, 348 DHO_HOST_NAME, 349 DHO_BOOT_SIZE, 350 DHO_MERIT_DUMP, 351 DHO_DOMAIN_NAME, 352 DHO_SWAP_SERVER, 353 DHO_ROOT_PATH, 354 DHO_EXTENSIONS_PATH, 355 DHO_IP_FORWARDING, 356 DHO_NON_LOCAL_SOURCE_ROUTING, 357 DHO_POLICY_FILTER, 358 DHO_MAX_DGRAM_REASSEMBLY, 359 DHO_DEFAULT_IP_TTL, 360 DHO_PATH_MTU_AGING_TIMEOUT, 361 DHO_PATH_MTU_PLATEAU_TABLE, 362 DHO_INTERFACE_MTU, 363 DHO_ALL_SUBNETS_LOCAL, 364 DHO_BROADCAST_ADDRESS, 365 DHO_PERFORM_MASK_DISCOVERY, 366 DHO_MASK_SUPPLIER, 367 DHO_ROUTER_DISCOVERY, 368 DHO_ROUTER_SOLICITATION_ADDRESS, 369 DHO_STATIC_ROUTES, 370 DHO_TRAILER_ENCAPSULATION, 371 DHO_ARP_CACHE_TIMEOUT, 372 DHO_IEEE802_3_ENCAPSULATION, 373 DHO_DEFAULT_TCP_TTL, 374 DHO_TCP_KEEPALIVE_INTERVAL, 375 DHO_TCP_KEEPALIVE_GARBAGE, 376 DHO_NIS_DOMAIN, 377 DHO_NIS_SERVERS, 378 DHO_NTP_SERVERS, 379 DHO_VENDOR_ENCAPSULATED_OPTIONS, 380 DHO_NETBIOS_NAME_SERVERS, 381 DHO_NETBIOS_DD_SERVER, 382 DHO_NETBIOS_NODE_TYPE, 383 DHO_NETBIOS_SCOPE, 384 DHO_FONT_SERVERS, 385 DHO_X_DISPLAY_MANAGER, 386 DHO_DHCP_PARAMETER_REQUEST_LIST, 387 388 /* Presently-undefined options... */ 389 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 390 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 391 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 392 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 393 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 394 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 395 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 396 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 397 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 398 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 399 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 400 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 401 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 402 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 403 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 404 251, 252, 253, 254, 405}; 406 407int sizeof_dhcp_option_default_priority_list = 408 sizeof(dhcp_option_default_priority_list); 409 410struct hash_table universe_hash; 411 412void 413initialize_universes(void) 414{ 415 int i; 416 417 dhcp_universe.name = "dhcp"; 418 dhcp_universe.hash = new_hash(); 419 if (!dhcp_universe.hash) 420 error("Can't allocate dhcp option hash table."); 421 for (i = 0; i < 256; i++) { 422 dhcp_universe.options[i] = &dhcp_options[i]; 423 add_hash(dhcp_universe.hash, 424 (unsigned char *)dhcp_options[i].name, 0, 425 (unsigned char *)&dhcp_options[i]); 426 } 427 universe_hash.hash_count = DEFAULT_HASH_SIZE; 428 add_hash(&universe_hash, 429 (unsigned char *)dhcp_universe.name, 0, 430 (unsigned char *)&dhcp_universe); 431} 432