From d59a898cf3e85ad88aa34ab5aabb9c24ca665693 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 9 Jul 2005 01:06:01 +0000 Subject: Since we never add more than the default dhcp_universe, expunge the code to handle mulitple 'vendor' universes. Don't bother with a specific error message about 'vendor'. An unsupported option is an unsupported option, and a '.' in an option name is a syntax error. ok henning@ --- sbin/dhclient/clparse.c | 51 +---- sbin/dhclient/dhcpd.h | 5 +- sbin/dhclient/tables.c | 522 ++++++++++++++++++++++++------------------------ sbin/dhclient/tree.h | 3 +- 4 files changed, 265 insertions(+), 316 deletions(-) (limited to 'sbin') diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index 2777902c776..4f9aef22521 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.18 2004/09/15 18:15:18 henning Exp $ */ +/* $OpenBSD: clparse.c,v 1.19 2005/07/09 01:06:00 krw Exp $ */ /* Parser for dhclient config and lease files... */ @@ -66,7 +66,7 @@ read_client_conf(void) new_parse(path_dhclient_conf); /* Set up the initial dhcp option universe. */ - initialize_universes(); + initialize_dhcp_universe(); /* Initialize the top level client configuration. */ memset(&top_level_config, 0, sizeof(top_level_config)); @@ -670,9 +670,7 @@ parse_option_decl(FILE *cfile, struct option_data *options) u_int8_t buf[4]; u_int8_t hunkbuf[1024]; int hunkix = 0; - char *vendor; char *fmt; - struct universe *universe; struct option *option; struct iaddr ip_addr; u_int8_t *dp; @@ -686,59 +684,18 @@ parse_option_decl(FILE *cfile, struct option_data *options) skip_to_semi(cfile); return (NULL); } - if ((vendor = strdup(val)) == NULL) - error("no memory for vendor information."); - - token = peek_token(&val, cfile); - if (token == DOT) { - /* Go ahead and take the DOT token... */ - token = next_token(&val, cfile); - - /* The next token should be an identifier... */ - token = next_token(&val, cfile); - if (!is_identifier(token)) { - parse_warn("expecting identifier after '.'"); - if (token != SEMI) - skip_to_semi(cfile); - return (NULL); - } - - /* Look up the option name hash table for the specified - vendor. */ - universe = ((struct universe *)hash_lookup(&universe_hash, - (unsigned char *)vendor, 0)); - /* If it's not there, we can't parse the rest of the - declaration. */ - if (!universe) { - parse_warn("no vendor named %s.", vendor); - skip_to_semi(cfile); - return (NULL); - } - } else { - /* Use the default hash table, which contains all the - standard dhcp option names. */ - val = vendor; - universe = &dhcp_universe; - } /* Look up the actual option info... */ - option = (struct option *)hash_lookup(universe->hash, + option = (struct option *)hash_lookup(dhcp_universe.hash, (unsigned char *)val, 0); /* If we didn't get an option structure, it's an undefined option. */ if (!option) { - if (val == vendor) - parse_warn("no option named %s", val); - else - parse_warn("no option named %s for vendor %s", - val, vendor); + parse_warn("no option named %s", val); skip_to_semi(cfile); return (NULL); } - /* Free the initial identifier token. */ - free(vendor); - /* Parse the option data... */ do { for (fmt = option->format; *fmt; fmt++) { diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 66b913af195..9fdf6390f06 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.37 2005/07/08 14:15:23 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.38 2005/07/09 01:06:00 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer @@ -318,9 +318,8 @@ unsigned char *hash_lookup(struct hash_table *, unsigned char *, int); /* tables.c */ extern struct option dhcp_options[256]; extern unsigned char dhcp_option_default_priority_list[256]; -extern struct hash_table universe_hash; extern struct universe dhcp_universe; -void initialize_universes(void); +void initialize_dhcp_universe(void); /* convert.c */ u_int32_t getULong(unsigned char *); diff --git a/sbin/dhclient/tables.c b/sbin/dhclient/tables.c index bed7907ed63..66a46f94e1f 100644 --- a/sbin/dhclient/tables.c +++ b/sbin/dhclient/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.5 2005/07/08 14:15:23 krw Exp $ */ +/* $OpenBSD: tables.c,v 1.6 2005/07/09 01:06:00 krw Exp $ */ /* Tables of information... */ @@ -62,262 +62,262 @@ struct universe dhcp_universe; struct option dhcp_options[256] = { - { "pad", "", &dhcp_universe, 0 }, - { "subnet-mask", "I", &dhcp_universe, 1 }, - { "time-offset", "l", &dhcp_universe, 2 }, - { "routers", "IA", &dhcp_universe, 3 }, - { "time-servers", "IA", &dhcp_universe, 4 }, - { "ien116-name-servers", "IA", &dhcp_universe, 5 }, - { "domain-name-servers", "IA", &dhcp_universe, 6 }, - { "log-servers", "IA", &dhcp_universe, 7 }, - { "cookie-servers", "IA", &dhcp_universe, 8 }, - { "lpr-servers", "IA", &dhcp_universe, 9 }, - { "impress-servers", "IA", &dhcp_universe, 10 }, - { "resource-location-servers", "IA", &dhcp_universe, 11 }, - { "host-name", "X", &dhcp_universe, 12 }, - { "boot-size", "S", &dhcp_universe, 13 }, - { "merit-dump", "t", &dhcp_universe, 14 }, - { "domain-name", "t", &dhcp_universe, 15 }, - { "swap-server", "I", &dhcp_universe, 16 }, - { "root-path", "t", &dhcp_universe, 17 }, - { "extensions-path", "t", &dhcp_universe, 18 }, - { "ip-forwarding", "f", &dhcp_universe, 19 }, - { "non-local-source-routing", "f", &dhcp_universe, 20 }, - { "policy-filter", "IIA", &dhcp_universe, 21 }, - { "max-dgram-reassembly", "S", &dhcp_universe, 22 }, - { "default-ip-ttl", "B", &dhcp_universe, 23 }, - { "path-mtu-aging-timeout", "L", &dhcp_universe, 24 }, - { "path-mtu-plateau-table", "SA", &dhcp_universe, 25 }, - { "interface-mtu", "S", &dhcp_universe, 26 }, - { "all-subnets-local", "f", &dhcp_universe, 27 }, - { "broadcast-address", "I", &dhcp_universe, 28 }, - { "perform-mask-discovery", "f", &dhcp_universe, 29 }, - { "mask-supplier", "f", &dhcp_universe, 30 }, - { "router-discovery", "f", &dhcp_universe, 31 }, - { "router-solicitation-address", "I", &dhcp_universe, 32 }, - { "static-routes", "IIA", &dhcp_universe, 33 }, - { "trailer-encapsulation", "f", &dhcp_universe, 34 }, - { "arp-cache-timeout", "L", &dhcp_universe, 35 }, - { "ieee802-3-encapsulation", "f", &dhcp_universe, 36 }, - { "default-tcp-ttl", "B", &dhcp_universe, 37 }, - { "tcp-keepalive-interval", "L", &dhcp_universe, 38 }, - { "tcp-keepalive-garbage", "f", &dhcp_universe, 39 }, - { "nis-domain", "t", &dhcp_universe, 40 }, - { "nis-servers", "IA", &dhcp_universe, 41 }, - { "ntp-servers", "IA", &dhcp_universe, 42 }, - { "vendor-encapsulated-options", "X", &dhcp_universe, 43 }, - { "netbios-name-servers", "IA", &dhcp_universe, 44 }, - { "netbios-dd-server", "IA", &dhcp_universe, 45 }, - { "netbios-node-type", "B", &dhcp_universe, 46 }, - { "netbios-scope", "t", &dhcp_universe, 47 }, - { "font-servers", "IA", &dhcp_universe, 48 }, - { "x-display-manager", "IA", &dhcp_universe, 49 }, - { "dhcp-requested-address", "I", &dhcp_universe, 50 }, - { "dhcp-lease-time", "L", &dhcp_universe, 51 }, - { "dhcp-option-overload", "B", &dhcp_universe, 52 }, - { "dhcp-message-type", "B", &dhcp_universe, 53 }, - { "dhcp-server-identifier", "I", &dhcp_universe, 54 }, - { "dhcp-parameter-request-list", "BA", &dhcp_universe, 55 }, - { "dhcp-message", "t", &dhcp_universe, 56 }, - { "dhcp-max-message-size", "S", &dhcp_universe, 57 }, - { "dhcp-renewal-time", "L", &dhcp_universe, 58 }, - { "dhcp-rebinding-time", "L", &dhcp_universe, 59 }, - { "dhcp-class-identifier", "t", &dhcp_universe, 60 }, - { "dhcp-client-identifier", "X", &dhcp_universe, 61 }, - { "option-62", "X", &dhcp_universe, 62 }, - { "option-63", "X", &dhcp_universe, 63 }, - { "nisplus-domain", "t", &dhcp_universe, 64 }, - { "nisplus-servers", "IA", &dhcp_universe, 65 }, - { "tftp-server-name", "t", &dhcp_universe, 66 }, - { "bootfile-name", "t", &dhcp_universe, 67 }, - { "mobile-ip-home-agent", "IA", &dhcp_universe, 68 }, - { "smtp-server", "IA", &dhcp_universe, 69 }, - { "pop-server", "IA", &dhcp_universe, 70 }, - { "nntp-server", "IA", &dhcp_universe, 71 }, - { "www-server", "IA", &dhcp_universe, 72 }, - { "finger-server", "IA", &dhcp_universe, 73 }, - { "irc-server", "IA", &dhcp_universe, 74 }, - { "streettalk-server", "IA", &dhcp_universe, 75 }, - { "streettalk-directory-assistance-server", "IA", &dhcp_universe, 76 }, - { "user-class", "t", &dhcp_universe, 77 }, - { "option-78", "X", &dhcp_universe, 78 }, - { "option-79", "X", &dhcp_universe, 79 }, - { "option-80", "X", &dhcp_universe, 80 }, - { "option-81", "X", &dhcp_universe, 81 }, - { "option-82", "X", &dhcp_universe, 82 }, - { "option-83", "X", &dhcp_universe, 83 }, - { "option-84", "X", &dhcp_universe, 84 }, - { "nds-servers", "IA", &dhcp_universe, 85 }, - { "nds-tree-name", "X", &dhcp_universe, 86 }, - { "nds-context", "X", &dhcp_universe, 87 }, - { "option-88", "X", &dhcp_universe, 88 }, - { "option-89", "X", &dhcp_universe, 89 }, - { "option-90", "X", &dhcp_universe, 90 }, - { "option-91", "X", &dhcp_universe, 91 }, - { "option-92", "X", &dhcp_universe, 92 }, - { "option-93", "X", &dhcp_universe, 93 }, - { "option-94", "X", &dhcp_universe, 94 }, - { "option-95", "X", &dhcp_universe, 95 }, - { "option-96", "X", &dhcp_universe, 96 }, - { "option-97", "X", &dhcp_universe, 97 }, - { "option-98", "X", &dhcp_universe, 98 }, - { "option-99", "X", &dhcp_universe, 99 }, - { "option-100", "X", &dhcp_universe, 100 }, - { "option-101", "X", &dhcp_universe, 101 }, - { "option-102", "X", &dhcp_universe, 102 }, - { "option-103", "X", &dhcp_universe, 103 }, - { "option-104", "X", &dhcp_universe, 104 }, - { "option-105", "X", &dhcp_universe, 105 }, - { "option-106", "X", &dhcp_universe, 106 }, - { "option-107", "X", &dhcp_universe, 107 }, - { "option-108", "X", &dhcp_universe, 108 }, - { "option-109", "X", &dhcp_universe, 109 }, - { "option-110", "X", &dhcp_universe, 110 }, - { "option-111", "X", &dhcp_universe, 111 }, - { "option-112", "X", &dhcp_universe, 112 }, - { "option-113", "X", &dhcp_universe, 113 }, - { "option-114", "X", &dhcp_universe, 114 }, - { "option-115", "X", &dhcp_universe, 115 }, - { "option-116", "X", &dhcp_universe, 116 }, - { "option-117", "X", &dhcp_universe, 117 }, - { "option-118", "X", &dhcp_universe, 118 }, - { "option-119", "X", &dhcp_universe, 119 }, - { "option-120", "X", &dhcp_universe, 120 }, - { "option-121", "X", &dhcp_universe, 121 }, - { "option-122", "X", &dhcp_universe, 122 }, - { "option-123", "X", &dhcp_universe, 123 }, - { "option-124", "X", &dhcp_universe, 124 }, - { "option-125", "X", &dhcp_universe, 125 }, - { "option-126", "X", &dhcp_universe, 126 }, - { "option-127", "X", &dhcp_universe, 127 }, - { "option-128", "X", &dhcp_universe, 128 }, - { "option-129", "X", &dhcp_universe, 129 }, - { "option-130", "X", &dhcp_universe, 130 }, - { "option-131", "X", &dhcp_universe, 131 }, - { "option-132", "X", &dhcp_universe, 132 }, - { "option-133", "X", &dhcp_universe, 133 }, - { "option-134", "X", &dhcp_universe, 134 }, - { "option-135", "X", &dhcp_universe, 135 }, - { "option-136", "X", &dhcp_universe, 136 }, - { "option-137", "X", &dhcp_universe, 137 }, - { "option-138", "X", &dhcp_universe, 138 }, - { "option-139", "X", &dhcp_universe, 139 }, - { "option-140", "X", &dhcp_universe, 140 }, - { "option-141", "X", &dhcp_universe, 141 }, - { "option-142", "X", &dhcp_universe, 142 }, - { "option-143", "X", &dhcp_universe, 143 }, - { "option-144", "X", &dhcp_universe, 144 }, - { "option-145", "X", &dhcp_universe, 145 }, - { "option-146", "X", &dhcp_universe, 146 }, - { "option-147", "X", &dhcp_universe, 147 }, - { "option-148", "X", &dhcp_universe, 148 }, - { "option-149", "X", &dhcp_universe, 149 }, - { "option-150", "X", &dhcp_universe, 150 }, - { "option-151", "X", &dhcp_universe, 151 }, - { "option-152", "X", &dhcp_universe, 152 }, - { "option-153", "X", &dhcp_universe, 153 }, - { "option-154", "X", &dhcp_universe, 154 }, - { "option-155", "X", &dhcp_universe, 155 }, - { "option-156", "X", &dhcp_universe, 156 }, - { "option-157", "X", &dhcp_universe, 157 }, - { "option-158", "X", &dhcp_universe, 158 }, - { "option-159", "X", &dhcp_universe, 159 }, - { "option-160", "X", &dhcp_universe, 160 }, - { "option-161", "X", &dhcp_universe, 161 }, - { "option-162", "X", &dhcp_universe, 162 }, - { "option-163", "X", &dhcp_universe, 163 }, - { "option-164", "X", &dhcp_universe, 164 }, - { "option-165", "X", &dhcp_universe, 165 }, - { "option-166", "X", &dhcp_universe, 166 }, - { "option-167", "X", &dhcp_universe, 167 }, - { "option-168", "X", &dhcp_universe, 168 }, - { "option-169", "X", &dhcp_universe, 169 }, - { "option-170", "X", &dhcp_universe, 170 }, - { "option-171", "X", &dhcp_universe, 171 }, - { "option-172", "X", &dhcp_universe, 172 }, - { "option-173", "X", &dhcp_universe, 173 }, - { "option-174", "X", &dhcp_universe, 174 }, - { "option-175", "X", &dhcp_universe, 175 }, - { "option-176", "X", &dhcp_universe, 176 }, - { "option-177", "X", &dhcp_universe, 177 }, - { "option-178", "X", &dhcp_universe, 178 }, - { "option-179", "X", &dhcp_universe, 179 }, - { "option-180", "X", &dhcp_universe, 180 }, - { "option-181", "X", &dhcp_universe, 181 }, - { "option-182", "X", &dhcp_universe, 182 }, - { "option-183", "X", &dhcp_universe, 183 }, - { "option-184", "X", &dhcp_universe, 184 }, - { "option-185", "X", &dhcp_universe, 185 }, - { "option-186", "X", &dhcp_universe, 186 }, - { "option-187", "X", &dhcp_universe, 187 }, - { "option-188", "X", &dhcp_universe, 188 }, - { "option-189", "X", &dhcp_universe, 189 }, - { "option-190", "X", &dhcp_universe, 190 }, - { "option-191", "X", &dhcp_universe, 191 }, - { "option-192", "X", &dhcp_universe, 192 }, - { "option-193", "X", &dhcp_universe, 193 }, - { "option-194", "X", &dhcp_universe, 194 }, - { "option-195", "X", &dhcp_universe, 195 }, - { "option-196", "X", &dhcp_universe, 196 }, - { "option-197", "X", &dhcp_universe, 197 }, - { "option-198", "X", &dhcp_universe, 198 }, - { "option-199", "X", &dhcp_universe, 199 }, - { "option-200", "X", &dhcp_universe, 200 }, - { "option-201", "X", &dhcp_universe, 201 }, - { "option-202", "X", &dhcp_universe, 202 }, - { "option-203", "X", &dhcp_universe, 203 }, - { "option-204", "X", &dhcp_universe, 204 }, - { "option-205", "X", &dhcp_universe, 205 }, - { "option-206", "X", &dhcp_universe, 206 }, - { "option-207", "X", &dhcp_universe, 207 }, - { "option-208", "X", &dhcp_universe, 208 }, - { "option-209", "X", &dhcp_universe, 209 }, - { "option-210", "X", &dhcp_universe, 210 }, - { "option-211", "X", &dhcp_universe, 211 }, - { "option-212", "X", &dhcp_universe, 212 }, - { "option-213", "X", &dhcp_universe, 213 }, - { "option-214", "X", &dhcp_universe, 214 }, - { "option-215", "X", &dhcp_universe, 215 }, - { "option-216", "X", &dhcp_universe, 216 }, - { "option-217", "X", &dhcp_universe, 217 }, - { "option-218", "X", &dhcp_universe, 218 }, - { "option-219", "X", &dhcp_universe, 219 }, - { "option-220", "X", &dhcp_universe, 220 }, - { "option-221", "X", &dhcp_universe, 221 }, - { "option-222", "X", &dhcp_universe, 222 }, - { "option-223", "X", &dhcp_universe, 223 }, - { "option-224", "X", &dhcp_universe, 224 }, - { "option-225", "X", &dhcp_universe, 225 }, - { "option-226", "X", &dhcp_universe, 226 }, - { "option-227", "X", &dhcp_universe, 227 }, - { "option-228", "X", &dhcp_universe, 228 }, - { "option-229", "X", &dhcp_universe, 229 }, - { "option-230", "X", &dhcp_universe, 230 }, - { "option-231", "X", &dhcp_universe, 231 }, - { "option-232", "X", &dhcp_universe, 232 }, - { "option-233", "X", &dhcp_universe, 233 }, - { "option-234", "X", &dhcp_universe, 234 }, - { "option-235", "X", &dhcp_universe, 235 }, - { "option-236", "X", &dhcp_universe, 236 }, - { "option-237", "X", &dhcp_universe, 237 }, - { "option-238", "X", &dhcp_universe, 238 }, - { "option-239", "X", &dhcp_universe, 239 }, - { "option-240", "X", &dhcp_universe, 240 }, - { "option-241", "X", &dhcp_universe, 241 }, - { "option-242", "X", &dhcp_universe, 242 }, - { "option-243", "X", &dhcp_universe, 243 }, - { "option-244", "X", &dhcp_universe, 244 }, - { "option-245", "X", &dhcp_universe, 245 }, - { "option-246", "X", &dhcp_universe, 246 }, - { "option-247", "X", &dhcp_universe, 247 }, - { "option-248", "X", &dhcp_universe, 248 }, - { "option-249", "X", &dhcp_universe, 249 }, - { "option-250", "X", &dhcp_universe, 250 }, - { "option-251", "X", &dhcp_universe, 251 }, - { "option-252", "X", &dhcp_universe, 252 }, - { "option-253", "X", &dhcp_universe, 253 }, - { "option-254", "X", &dhcp_universe, 254 }, - { "option-end", "e", &dhcp_universe, 255 }, + { "pad", "", 0 }, + { "subnet-mask", "I", 1 }, + { "time-offset", "l", 2 }, + { "routers", "IA", 3 }, + { "time-servers", "IA", 4 }, + { "ien116-name-servers", "IA", 5 }, + { "domain-name-servers", "IA", 6 }, + { "log-servers", "IA", 7 }, + { "cookie-servers", "IA", 8 }, + { "lpr-servers", "IA", 9 }, + { "impress-servers", "IA", 10 }, + { "resource-location-servers", "IA", 11 }, + { "host-name", "X", 12 }, + { "boot-size", "S", 13 }, + { "merit-dump", "t", 14 }, + { "domain-name", "t", 15 }, + { "swap-server", "I", 16 }, + { "root-path", "t", 17 }, + { "extensions-path", "t", 18 }, + { "ip-forwarding", "f", 19 }, + { "non-local-source-routing", "f", 20 }, + { "policy-filter", "IIA", 21 }, + { "max-dgram-reassembly", "S", 22 }, + { "default-ip-ttl", "B", 23 }, + { "path-mtu-aging-timeout", "L", 24 }, + { "path-mtu-plateau-table", "SA", 25 }, + { "interface-mtu", "S", 26 }, + { "all-subnets-local", "f", 27 }, + { "broadcast-address", "I", 28 }, + { "perform-mask-discovery", "f", 29 }, + { "mask-supplier", "f", 30 }, + { "router-discovery", "f", 31 }, + { "router-solicitation-address", "I", 32 }, + { "static-routes", "IIA", 33 }, + { "trailer-encapsulation", "f", 34 }, + { "arp-cache-timeout", "L", 35 }, + { "ieee802-3-encapsulation", "f", 36 }, + { "default-tcp-ttl", "B", 37 }, + { "tcp-keepalive-interval", "L", 38 }, + { "tcp-keepalive-garbage", "f", 39 }, + { "nis-domain", "t", 40 }, + { "nis-servers", "IA", 41 }, + { "ntp-servers", "IA", 42 }, + { "vendor-encapsulated-options", "X", 43 }, + { "netbios-name-servers", "IA", 44 }, + { "netbios-dd-server", "IA", 45 }, + { "netbios-node-type", "B", 46 }, + { "netbios-scope", "t", 47 }, + { "font-servers", "IA", 48 }, + { "x-display-manager", "IA", 49 }, + { "dhcp-requested-address", "I", 50 }, + { "dhcp-lease-time", "L", 51 }, + { "dhcp-option-overload", "B", 52 }, + { "dhcp-message-type", "B", 53 }, + { "dhcp-server-identifier", "I", 54 }, + { "dhcp-parameter-request-list", "BA", 55 }, + { "dhcp-message", "t", 56 }, + { "dhcp-max-message-size", "S", 57 }, + { "dhcp-renewal-time", "L", 58 }, + { "dhcp-rebinding-time", "L", 59 }, + { "dhcp-class-identifier", "t", 60 }, + { "dhcp-client-identifier", "X", 61 }, + { "option-62", "X", 62 }, + { "option-63", "X", 63 }, + { "nisplus-domain", "t", 64 }, + { "nisplus-servers", "IA", 65 }, + { "tftp-server-name", "t", 66 }, + { "bootfile-name", "t", 67 }, + { "mobile-ip-home-agent", "IA", 68 }, + { "smtp-server", "IA", 69 }, + { "pop-server", "IA", 70 }, + { "nntp-server", "IA", 71 }, + { "www-server", "IA", 72 }, + { "finger-server", "IA", 73 }, + { "irc-server", "IA", 74 }, + { "streettalk-server", "IA", 75 }, + { "streettalk-directory-assistance-server", "IA", 76 }, + { "user-class", "t", 77 }, + { "option-78", "X", 78 }, + { "option-79", "X", 79 }, + { "option-80", "X", 80 }, + { "option-81", "X", 81 }, + { "option-82", "X", 82 }, + { "option-83", "X", 83 }, + { "option-84", "X", 84 }, + { "nds-servers", "IA", 85 }, + { "nds-tree-name", "X", 86 }, + { "nds-context", "X", 87 }, + { "option-88", "X", 88 }, + { "option-89", "X", 89 }, + { "option-90", "X", 90 }, + { "option-91", "X", 91 }, + { "option-92", "X", 92 }, + { "option-93", "X", 93 }, + { "option-94", "X", 94 }, + { "option-95", "X", 95 }, + { "option-96", "X", 96 }, + { "option-97", "X", 97 }, + { "option-98", "X", 98 }, + { "option-99", "X", 99 }, + { "option-100", "X", 100 }, + { "option-101", "X", 101 }, + { "option-102", "X", 102 }, + { "option-103", "X", 103 }, + { "option-104", "X", 104 }, + { "option-105", "X", 105 }, + { "option-106", "X", 106 }, + { "option-107", "X", 107 }, + { "option-108", "X", 108 }, + { "option-109", "X", 109 }, + { "option-110", "X", 110 }, + { "option-111", "X", 111 }, + { "option-112", "X", 112 }, + { "option-113", "X", 113 }, + { "option-114", "X", 114 }, + { "option-115", "X", 115 }, + { "option-116", "X", 116 }, + { "option-117", "X", 117 }, + { "option-118", "X", 118 }, + { "option-119", "X", 119 }, + { "option-120", "X", 120 }, + { "option-121", "X", 121 }, + { "option-122", "X", 122 }, + { "option-123", "X", 123 }, + { "option-124", "X", 124 }, + { "option-125", "X", 125 }, + { "option-126", "X", 126 }, + { "option-127", "X", 127 }, + { "option-128", "X", 128 }, + { "option-129", "X", 129 }, + { "option-130", "X", 130 }, + { "option-131", "X", 131 }, + { "option-132", "X", 132 }, + { "option-133", "X", 133 }, + { "option-134", "X", 134 }, + { "option-135", "X", 135 }, + { "option-136", "X", 136 }, + { "option-137", "X", 137 }, + { "option-138", "X", 138 }, + { "option-139", "X", 139 }, + { "option-140", "X", 140 }, + { "option-141", "X", 141 }, + { "option-142", "X", 142 }, + { "option-143", "X", 143 }, + { "option-144", "X", 144 }, + { "option-145", "X", 145 }, + { "option-146", "X", 146 }, + { "option-147", "X", 147 }, + { "option-148", "X", 148 }, + { "option-149", "X", 149 }, + { "option-150", "X", 150 }, + { "option-151", "X", 151 }, + { "option-152", "X", 152 }, + { "option-153", "X", 153 }, + { "option-154", "X", 154 }, + { "option-155", "X", 155 }, + { "option-156", "X", 156 }, + { "option-157", "X", 157 }, + { "option-158", "X", 158 }, + { "option-159", "X", 159 }, + { "option-160", "X", 160 }, + { "option-161", "X", 161 }, + { "option-162", "X", 162 }, + { "option-163", "X", 163 }, + { "option-164", "X", 164 }, + { "option-165", "X", 165 }, + { "option-166", "X", 166 }, + { "option-167", "X", 167 }, + { "option-168", "X", 168 }, + { "option-169", "X", 169 }, + { "option-170", "X", 170 }, + { "option-171", "X", 171 }, + { "option-172", "X", 172 }, + { "option-173", "X", 173 }, + { "option-174", "X", 174 }, + { "option-175", "X", 175 }, + { "option-176", "X", 176 }, + { "option-177", "X", 177 }, + { "option-178", "X", 178 }, + { "option-179", "X", 179 }, + { "option-180", "X", 180 }, + { "option-181", "X", 181 }, + { "option-182", "X", 182 }, + { "option-183", "X", 183 }, + { "option-184", "X", 184 }, + { "option-185", "X", 185 }, + { "option-186", "X", 186 }, + { "option-187", "X", 187 }, + { "option-188", "X", 188 }, + { "option-189", "X", 189 }, + { "option-190", "X", 190 }, + { "option-191", "X", 191 }, + { "option-192", "X", 192 }, + { "option-193", "X", 193 }, + { "option-194", "X", 194 }, + { "option-195", "X", 195 }, + { "option-196", "X", 196 }, + { "option-197", "X", 197 }, + { "option-198", "X", 198 }, + { "option-199", "X", 199 }, + { "option-200", "X", 200 }, + { "option-201", "X", 201 }, + { "option-202", "X", 202 }, + { "option-203", "X", 203 }, + { "option-204", "X", 204 }, + { "option-205", "X", 205 }, + { "option-206", "X", 206 }, + { "option-207", "X", 207 }, + { "option-208", "X", 208 }, + { "option-209", "X", 209 }, + { "option-210", "X", 210 }, + { "option-211", "X", 211 }, + { "option-212", "X", 212 }, + { "option-213", "X", 213 }, + { "option-214", "X", 214 }, + { "option-215", "X", 215 }, + { "option-216", "X", 216 }, + { "option-217", "X", 217 }, + { "option-218", "X", 218 }, + { "option-219", "X", 219 }, + { "option-220", "X", 220 }, + { "option-221", "X", 221 }, + { "option-222", "X", 222 }, + { "option-223", "X", 223 }, + { "option-224", "X", 224 }, + { "option-225", "X", 225 }, + { "option-226", "X", 226 }, + { "option-227", "X", 227 }, + { "option-228", "X", 228 }, + { "option-229", "X", 229 }, + { "option-230", "X", 230 }, + { "option-231", "X", 231 }, + { "option-232", "X", 232 }, + { "option-233", "X", 233 }, + { "option-234", "X", 234 }, + { "option-235", "X", 235 }, + { "option-236", "X", 236 }, + { "option-237", "X", 237 }, + { "option-238", "X", 238 }, + { "option-239", "X", 239 }, + { "option-240", "X", 240 }, + { "option-241", "X", 241 }, + { "option-242", "X", 242 }, + { "option-243", "X", 243 }, + { "option-244", "X", 244 }, + { "option-245", "X", 245 }, + { "option-246", "X", 246 }, + { "option-247", "X", 247 }, + { "option-248", "X", 248 }, + { "option-249", "X", 249 }, + { "option-250", "X", 250 }, + { "option-251", "X", 251 }, + { "option-252", "X", 252 }, + { "option-253", "X", 253 }, + { "option-254", "X", 254 }, + { "option-end", "e", 255 }, }; /* @@ -407,10 +407,8 @@ unsigned char dhcp_option_default_priority_list[256] = { 251, 252, 253, 254, }; -struct hash_table universe_hash; - void -initialize_universes(void) +initialize_dhcp_universe(void) { int i; @@ -424,8 +422,4 @@ initialize_universes(void) (unsigned char *)dhcp_options[i].name, 0, (unsigned char *)&dhcp_options[i]); } - universe_hash.hash_count = DEFAULT_HASH_SIZE; - add_hash(&universe_hash, - (unsigned char *)dhcp_universe.name, 0, - (unsigned char *)&dhcp_universe); } diff --git a/sbin/dhclient/tree.h b/sbin/dhclient/tree.h index a4f17e1a5ba..24cf676764c 100644 --- a/sbin/dhclient/tree.h +++ b/sbin/dhclient/tree.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.h,v 1.7 2005/07/07 16:24:24 krw Exp $ */ +/* $OpenBSD: tree.h,v 1.8 2005/07/09 01:06:00 krw Exp $ */ /* Definitions for address trees... */ @@ -54,6 +54,5 @@ struct universe { struct option { char *name; char *format; - struct universe *universe; unsigned char code; }; -- cgit v1.2.3