1 /* tables.c
2 
3    Tables of information... */
4 
5 /*
6  * Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
7  * Copyright (c) 1995-2003 by Internet Software Consortium
8  *
9  * This Source Code Form is subject to the terms of the Mozilla Public
10  * License, v. 2.0. If a copy of the MPL was not distributed with this
11  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
16  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  *
21  *   Internet Systems Consortium, Inc.
22  *   950 Charter Street
23  *   Redwood City, CA 94063
24  *   <info@isc.org>
25  *   https://www.isc.org/
26  *
27  */
28 
29 #include "dhcpd.h"
30 
31 /* XXXDPN: Moved here from hash.c, when it moved to libomapi.  Not sure
32    where these really belong. */
33 HASH_FUNCTIONS (group, const char *, struct group_object, group_hash_t,
34 		group_reference, group_dereference, do_string_hash)
35 HASH_FUNCTIONS (universe, const char *, struct universe, universe_hash_t, 0, 0,
36 		do_case_hash)
37 HASH_FUNCTIONS (option_name, const char *, struct option, option_name_hash_t,
38 		option_reference, option_dereference, do_case_hash)
39 HASH_FUNCTIONS (option_code, const unsigned *, struct option,
40 		option_code_hash_t, option_reference, option_dereference,
41 		do_number_hash)
42 
43 /* DHCP Option names, formats and codes, from RFC1533.
44 
45    Format codes:
46 
47    I - IPv4 address
48    6 - IPv6 address
49    l - 32-bit signed integer
50    L - 32-bit unsigned integer
51    s - 16-bit signed integer
52    S - 16-bit unsigned integer
53    b - 8-bit signed integer
54    B - 8-bit unsigned integer
55    t - ASCII text
56    T - Lease Time, 32-bit unsigned integer implying a number of seconds from
57        some event.  The special all-ones value means 'infinite'.  May either
58        be printed as a decimal, eg, "3600", or as this name, eg, "infinite".
59    f - flag (true or false)
60    A - array of all that precedes (e.g., fIA means array of records of
61        a flag and an IP address)
62    a - array of the preceding character (e.g., fIa means a single flag
63        followed by an array of IP addresses)
64    U - name of an option space (universe)
65    F - implicit flag - the presence of the option indicates that the
66        flag is true.
67    o - the preceding value is optional.
68    E - encapsulation, string or colon-separated hex list (the latter
69        two for parsing).   E is followed by a text string containing
70        the name of the option space to encapsulate, followed by a '.'.
71        If the E is immediately followed by '.', the applicable vendor
72        option space is used if one is defined.
73    e - If an encapsulation directive is not the first thing in the string,
74        the option scanner requires an efficient way to find the encapsulation.
75        This is done by placing a 'e' at the beginning of the option.   The
76        'e' has no other purpose, and is not required if 'E' is the first
77        thing in the option.
78    X - either an ASCII string or binary data.   On output, the string is
79        scanned to see if it's printable ASCII and, if so, output as a
80        quoted string.   If not, it's output as colon-separated hex.   On
81        input, the option can be specified either as a quoted string or as
82        a colon-separated hex list.
83    N - enumeration.   N is followed by a text string containing
84        the name of the set of enumeration values to parse or emit,
85        followed by a '.'.   The width of the data is specified in the
86        named enumeration.   Named enumerations are tracked in parse.c.
87    d - Domain name (e.g., FOO or FOO.BAR) no quotes,
88        on-wire format is RFC 1035.
89    D - Domain list (e.g., "example.com eng.example.com") quoted,
90        on-wire format is RFC 1035.
91    c - When following a 'D' atom, enables compression pointers.
92    Z - Zero-length option
93    k - Key name, unquoted string (e.g. mykey.com or some-text or abc123)
94        parsed with parse_host_name().
95 */
96 
97 struct universe dhcp_universe;
98 static struct option dhcp_options[] = {
99 	{ "subnet-mask", "I",			&dhcp_universe,   1, 1 },
100 	{ "time-offset", "l",			&dhcp_universe,   2, 1 },
101 	{ "routers", "IA",			&dhcp_universe,   3, 1 },
102 	{ "time-servers", "IA",			&dhcp_universe,   4, 1 },
103 	{ "ien116-name-servers", "IA",		&dhcp_universe,   5, 1 },
104 	{ "domain-name-servers", "IA",		&dhcp_universe,   6, 1 },
105 	{ "log-servers", "IA",			&dhcp_universe,   7, 1 },
106 	{ "cookie-servers", "IA",		&dhcp_universe,   8, 1 },
107 	{ "lpr-servers", "IA",			&dhcp_universe,   9, 1 },
108 	{ "impress-servers", "IA",		&dhcp_universe,  10, 1 },
109 	{ "resource-location-servers", "IA",	&dhcp_universe,  11, 1 },
110 	{ "host-name", "t",			&dhcp_universe,  12, 1 },
111 	{ "boot-size", "S",			&dhcp_universe,  13, 1 },
112 	{ "merit-dump", "t",			&dhcp_universe,  14, 1 },
113 	{ "domain-name", "t",			&dhcp_universe,  15, 1 },
114 	{ "swap-server", "I",			&dhcp_universe,  16, 1 },
115 	{ "root-path", "t",			&dhcp_universe,  17, 1 },
116 	{ "extensions-path", "t",		&dhcp_universe,  18, 1 },
117 	{ "ip-forwarding", "f",			&dhcp_universe,  19, 1 },
118 	{ "non-local-source-routing", "f",	&dhcp_universe,  20, 1 },
119 	{ "policy-filter", "IIA",		&dhcp_universe,  21, 1 },
120 	{ "max-dgram-reassembly", "S",		&dhcp_universe,  22, 1 },
121 	{ "default-ip-ttl", "B",		&dhcp_universe,  23, 1 },
122 	{ "path-mtu-aging-timeout", "L",	&dhcp_universe,  24, 1 },
123 	{ "path-mtu-plateau-table", "SA",	&dhcp_universe,  25, 1 },
124 	{ "interface-mtu", "S",			&dhcp_universe,  26, 1 },
125 	{ "all-subnets-local", "f",		&dhcp_universe,  27, 1 },
126 	{ "broadcast-address", "I",		&dhcp_universe,  28, 1 },
127 	{ "perform-mask-discovery", "f",	&dhcp_universe,  29, 1 },
128 	{ "mask-supplier", "f",			&dhcp_universe,  30, 1 },
129 	{ "router-discovery", "f",		&dhcp_universe,  31, 1 },
130 	{ "router-solicitation-address", "I",	&dhcp_universe,  32, 1 },
131 	{ "static-routes", "IIA",		&dhcp_universe,  33, 1 },
132 	{ "trailer-encapsulation", "f",		&dhcp_universe,  34, 1 },
133 	{ "arp-cache-timeout", "L",		&dhcp_universe,  35, 1 },
134 	{ "ieee802-3-encapsulation", "f",	&dhcp_universe,  36, 1 },
135 	{ "default-tcp-ttl", "B",		&dhcp_universe,  37, 1 },
136 	{ "tcp-keepalive-interval", "L",	&dhcp_universe,  38, 1 },
137 	{ "tcp-keepalive-garbage", "f",		&dhcp_universe,  39, 1 },
138 	{ "nis-domain", "t",			&dhcp_universe,  40, 1 },
139 	{ "nis-servers", "IA",			&dhcp_universe,  41, 1 },
140 	{ "ntp-servers", "IA",			&dhcp_universe,  42, 1 },
141 	{ "vendor-encapsulated-options", "E.",	&dhcp_universe,  43, 1 },
142 	{ "netbios-name-servers", "IA",		&dhcp_universe,  44, 1 },
143 	{ "netbios-dd-server", "IA",		&dhcp_universe,  45, 1 },
144 	{ "netbios-node-type", "B",		&dhcp_universe,  46, 1 },
145 	{ "netbios-scope", "t",			&dhcp_universe,  47, 1 },
146 	{ "font-servers", "IA",			&dhcp_universe,  48, 1 },
147 	{ "x-display-manager", "IA",		&dhcp_universe,  49, 1 },
148 	{ "dhcp-requested-address", "I",	&dhcp_universe,  50, 1 },
149 	{ "dhcp-lease-time", "L",		&dhcp_universe,  51, 1 },
150 	{ "dhcp-option-overload", "B",		&dhcp_universe,  52, 1 },
151 	{ "dhcp-message-type", "B",		&dhcp_universe,  53, 1 },
152 	{ "dhcp-server-identifier", "I",	&dhcp_universe,  54, 1 },
153 	{ "dhcp-parameter-request-list", "BA",	&dhcp_universe,  55, 1 },
154 	{ "dhcp-message", "t",			&dhcp_universe,  56, 1 },
155 	{ "dhcp-max-message-size", "S",		&dhcp_universe,  57, 1 },
156 	{ "dhcp-renewal-time", "L",		&dhcp_universe,  58, 1 },
157 	{ "dhcp-rebinding-time", "L",		&dhcp_universe,  59, 1 },
158 	{ "vendor-class-identifier", "X",	&dhcp_universe,  60, 1 },
159 	{ "dhcp-client-identifier", "X",	&dhcp_universe,  61, 1 },
160 	{ "nwip-domain", "t",			&dhcp_universe,  62, 1 },
161 	{ "nwip-suboptions", "Enwip.",		&dhcp_universe,  63, 1 },
162 	{ "nisplus-domain", "t",		&dhcp_universe,  64, 1 },
163 	{ "nisplus-servers", "IA",		&dhcp_universe,  65, 1 },
164 	{ "tftp-server-name", "t",		&dhcp_universe,  66, 1 },
165 	{ "bootfile-name", "t",			&dhcp_universe,  67, 1 },
166 	{ "mobile-ip-home-agent", "IA",		&dhcp_universe,  68, 1 },
167 	{ "smtp-server", "IA",			&dhcp_universe,  69, 1 },
168 	{ "pop-server", "IA",			&dhcp_universe,  70, 1 },
169 	{ "nntp-server", "IA",			&dhcp_universe,  71, 1 },
170 	{ "www-server", "IA",			&dhcp_universe,  72, 1 },
171 	{ "finger-server", "IA",		&dhcp_universe,  73, 1 },
172 	{ "irc-server", "IA",			&dhcp_universe,  74, 1 },
173 	{ "streettalk-server", "IA",		&dhcp_universe,  75, 1 },
174 	{ "streettalk-directory-assistance-server", "IA",
175 						&dhcp_universe,  76, 1 },
176 	{ "user-class", "t",			&dhcp_universe,  77, 1 },
177 	{ "slp-directory-agent", "fIa",		&dhcp_universe,  78, 1 },
178 	{ "slp-service-scope", "fto",		&dhcp_universe,  79, 1 },
179 	/* 80 is the zero-length rapid-commit (RFC 4039) */
180 	{ "fqdn", "Efqdn.",			&dhcp_universe,  81, 1 },
181 	{ "relay-agent-information", "Eagent.",	&dhcp_universe,  82, 1 },
182 	/* 83 is iSNS (RFC 4174) */
183 	/* 84 is unassigned */
184 	{ "nds-servers", "IA",			&dhcp_universe,  85, 1 },
185 	{ "nds-tree-name", "t",			&dhcp_universe,  86, 1 },
186 	{ "nds-context", "t",			&dhcp_universe,  87, 1 },
187 
188 	/* Note: RFC4280 fails to identify if the DHCPv4 option is to use
189 	 * compression pointers or not.  Assume not.
190 	 */
191 	{ "bcms-controller-names", "D",		&dhcp_universe,  88, 1 },
192 	{ "bcms-controller-address", "Ia",	&dhcp_universe,  89, 1 },
193 
194 	/* 90 is the authentication option (RFC 3118) */
195 
196 	{ "client-last-transaction-time", "L",  &dhcp_universe,  91, 1 },
197 	{ "associated-ip", "Ia",                &dhcp_universe,  92, 1 },
198 #if defined(RFC4578_OPTIONS)
199 	/* Defined by RFC 4578 */
200 	{ "pxe-system-type", "Sa",		&dhcp_universe,  93, 1 },
201 	{ "pxe-interface-id", "BBB",		&dhcp_universe,  94, 1 },
202 	{ "pxe-client-id", "BX",		&dhcp_universe,  97, 1 },
203 #endif
204 	{ "uap-servers", "t",			&dhcp_universe,  98, 1 },
205 #if defined(RFC4776_OPTIONS)
206         { "geoconf-civic", "X",                 &dhcp_universe, 99, 1 },
207 #endif
208 #if defined(RFC4833_OPTIONS)
209 	{ "pcode", "t",				&dhcp_universe, 100, 1 },
210 	{ "tcode", "t",				&dhcp_universe, 101, 1 },
211 #endif
212 	{ "netinfo-server-address", "Ia",	&dhcp_universe, 112, 1 },
213 	{ "netinfo-server-tag", "t",		&dhcp_universe, 113, 1 },
214 	{ "default-url", "t",			&dhcp_universe, 114, 1 },
215 #if defined(RFC2563_OPTIONS)
216 	{ "auto-config", "B",			&dhcp_universe, 116, 1 },
217 #endif
218 #if defined(RFC2937_OPTIONS)
219 	{ "name-service-search", "Sa",		&dhcp_universe, 117, 1 },
220 #endif
221 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
222 	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
223 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1 },
224 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1 },
225 #if 0
226 	/* Referenced by RFC 4578.
227 	 * DO NOT UNCOMMENT THESE DEFINITIONS: these names are placeholders
228 	 * and will not be used in future versions of the software.
229 	 */
230 	{ "pxe-undefined-1", "X",		&dhcp_universe, 128, 1 },
231 	{ "pxe-undefined-2", "X",		&dhcp_universe, 129, 1 },
232 	{ "pxe-undefined-3", "X",		&dhcp_universe, 130, 1 },
233 	{ "pxe-undefined-4", "X",		&dhcp_universe, 131, 1 },
234 	{ "pxe-undefined-5", "X",		&dhcp_universe, 132, 1 },
235 	{ "pxe-undefined-6", "X",		&dhcp_universe, 133, 1 },
236 	{ "pxe-undefined-7", "X",		&dhcp_universe, 134, 1 },
237 	{ "pxe-undefined-8", "X",		&dhcp_universe, 135, 1 },
238 #endif
239 #if defined(RFC5192_OPTIONS)
240 	{"pana-agent", "Ia",			&dhcp_universe, 136, 1 },
241 #endif
242 #if defined(RFC5223_OPTIONS)
243 	{"v4-lost", "d",			&dhcp_universe, 137, 1 },
244 #endif
245 #if defined(RFC5417_OPTIONS)
246 	{"capwap-ac-v4", "Ia",			&dhcp_universe, 138, 1 },
247 #endif
248 #if defined(RFC6011_OPTIONS)
249 	{ "sip-ua-cs-domains", "Dc",		&dhcp_universe, 141, 1 },
250 #endif
251 #if defined(RFC6153_OPTIONS)
252 	{ "ipv4-address-andsf", "IA",		&dhcp_universe, 142, 1 },
253 #endif
254 #if defined(RFC6731_OPTIONS)
255         { "rdnss-selection", "BIID",		&dhcp_universe, 146, 1 },
256 #endif
257 #if defined(RFC5859_OPTIONS)
258 	{ "tftp-server-address", "Ia",		&dhcp_universe, 150, 1 },
259 #endif
260 #if defined(RFC7618_OPTIONS)
261 	{ "v4-portparams", "BBS",		&dhcp_universe, 159, 1 },
262 #endif
263 #if defined(RFC7710_OPTIONS)
264 	{ "v4-captive-portal", "t",		&dhcp_universe, 160, 1 },
265 #endif
266 #if defined(RFC5071_OPTIONS)
267 #if  0
268 	/* Option 208 has been officially deprecated. Do NOT define it */
269 	{ "pxelinux-magic", "BBBB",		&dhcp_universe, 208, 1 },
270 #endif
271 	{ "loader-configfile", "t",		&dhcp_universe, 209, 1 },
272 	{ "loader-pathprefix", "t",		&dhcp_universe, 210, 1 },
273 	{ "loader-reboottime", "L",		&dhcp_universe, 211, 1 },
274 #endif
275 #if defined(RFC5969_OPTIONS)
276         { "option-6rd", "BB6Ia",		&dhcp_universe, 212, 1 },
277 #endif
278 #if defined(RFC5986_OPTIONS)
279 	{"v4-access-domain", "d",		&dhcp_universe, 213, 1 },
280 #endif
281 	{ NULL, NULL, NULL, 0, 0 }
282 };
283 
284 struct universe nwip_universe;
285 static struct option nwip_options[] = {
286 	{ "illegal-1", "",			&nwip_universe,   1, 1 },
287 	{ "illegal-2", "",			&nwip_universe,   2, 1 },
288 	{ "illegal-3", "",			&nwip_universe,   3, 1 },
289 	{ "illegal-4", "",			&nwip_universe,   4, 1 },
290 	{ "nsq-broadcast", "f",			&nwip_universe,   5, 1 },
291 	{ "preferred-dss", "IA",		&nwip_universe,   6, 1 },
292 	{ "nearest-nwip-server", "IA",		&nwip_universe,   7, 1 },
293 	{ "autoretries", "B",			&nwip_universe,   8, 1 },
294 	{ "autoretry-secs", "B",		&nwip_universe,   9, 1 },
295 	{ "nwip-1-1", "f",			&nwip_universe,  10, 1 },
296 	{ "primary-dss", "I",			&nwip_universe,  11, 1 },
297 	{ NULL, NULL, NULL, 0, 0 }
298 };
299 
300 /* Note that the "FQDN suboption space" does not reflect the FQDN option
301  * format - rather, this is a handy "virtualization" of a flat option
302  * which makes manual configuration and presentation of some of its
303  * contents easier (each of these suboptions is a fixed-space field within
304  * the fqdn contents - domain and host names are derived from a common field,
305  * and differ in the left and right hand side of the leftmost dot, fqdn is
306  * the combination of the two).
307  *
308  * Note further that the DHCPv6 and DHCPv4 'fqdn' options use the same
309  * virtualized option space to store their work.
310  */
311 
312 struct universe fqdn_universe;
313 struct universe fqdn6_universe;
314 static struct option fqdn_options[] = {
315 	{ "no-client-update", "f",		&fqdn_universe,   1, 1 },
316 	{ "server-update", "f",			&fqdn_universe,   2, 1 },
317 	{ "encoded", "f",			&fqdn_universe,   3, 1 },
318 	{ "rcode1", "B",			&fqdn_universe,   4, 1 },
319 	{ "rcode2", "B",			&fqdn_universe,   5, 1 },
320 	{ "hostname", "t",			&fqdn_universe,   6, 1 },
321 	{ "domainname", "t",			&fqdn_universe,   7, 1 },
322 	{ "fqdn", "t",				&fqdn_universe,   8, 1 },
323 	{ NULL, NULL, NULL, 0, 0 }
324 };
325 
326 struct universe vendor_class_universe;
327 static struct option vendor_class_options[] =  {
328 	{ "isc", "X",			&vendor_class_universe,      2495, 1 },
329 	{ NULL, NULL, NULL, 0, 0 }
330 };
331 
332 struct universe vendor_universe;
333 static struct option vendor_options[] = {
334 	{ "isc", "Eisc.",		&vendor_universe,            2495, 1 },
335 	{ NULL, NULL, NULL, 0, 0 }
336 };
337 
338 struct universe isc_universe;
339 static struct option isc_options [] = {
340 	{ "media", "t",				&isc_universe,   1, 1 },
341 	{ "update-assist", "X",			&isc_universe,   2, 1 },
342 	{ NULL,	NULL, NULL, 0, 0 }
343 };
344 
345 struct universe dhcpv6_universe;
346 static struct option dhcpv6_options[] = {
347 
348 				/* RFC3315 OPTIONS */
349 
350 	/* Client and server DUIDs are opaque fields, but marking them
351 	 * up somewhat makes configuration easier.
352 	 */
353 	{ "client-id", "X",			&dhcpv6_universe,  1, 1 },
354 	{ "server-id", "X",			&dhcpv6_universe,  2, 1 },
355 
356 	/* ia-* options actually have at their ends a space for options
357 	 * that are specific to this instance of the option.  We can not
358 	 * handle this yet at this stage of development, so the encoding
359 	 * of these options is unspecified ("X").
360 	 */
361 	{ "ia-na", "X",				&dhcpv6_universe,  3, 1 },
362 	{ "ia-ta", "X",				&dhcpv6_universe,  4, 1 },
363 	{ "ia-addr", "X",			&dhcpv6_universe,  5, 1 },
364 
365 	/* "oro" is DHCPv6 speak for "parameter-request-list" */
366 	{ "oro", "SA",				&dhcpv6_universe,  6, 1 },
367 
368 	{ "preference", "B",			&dhcpv6_universe,  7, 1 },
369 	{ "elapsed-time", "S",			&dhcpv6_universe,  8, 1 },
370 	{ "relay-msg", "X",			&dhcpv6_universe,  9, 1 },
371 
372 	/* Option code 10 is curiously unassigned. */
373 	/*
374 	 * In draft-ietf-dhc-dhcpv6-25 there were two OPTION_CLIENT_MSG and
375 	 * OPTION_SERVER_MSG options. They were eventually unified as
376 	 * OPTION_RELAY_MSG, hence no option with value of 10.
377 	 */
378 #if 0
379 	/* XXX: missing suitable atoms for the auth option.  We may want
380 	 * to 'virtually encapsulate' this option a la the fqdn option
381 	 * seeing as it is processed explicitly by the server and unlikely
382 	 * to be configured by hand by users as such.
383 	 */
384 	{ "auth", "Nauth-protocol.Nauth-algorithm.Nrdm-type.LLX",
385 						&dhcpv6_universe, 11, 1 },
386 #endif
387 	{ "unicast", "6",			&dhcpv6_universe, 12, 1 },
388 	{ "status-code", "Nstatus-codes.to",	&dhcpv6_universe, 13, 1 },
389 	{ "rapid-commit", "Z",			&dhcpv6_universe, 14, 1 },
390 #if 0
391 	/* XXX: user-class contents are of the form "StA" where the
392 	 * integer describes the length of the text field.  We don't have
393 	 * an atom for pre-determined-length octet strings yet, so we
394 	 * can't quite do these two.
395 	 */
396 	{ "user-class", "X",			&dhcpv6_universe, 15, 1 },
397 	{ "vendor-class", "X",			&dhcpv6_universe, 16, 1 },
398 #endif
399 	{ "vendor-opts", "Evsio.",		&dhcpv6_universe, 17, 1 },
400 	{ "interface-id", "X",			&dhcpv6_universe, 18, 1 },
401 	{ "reconf-msg", "Ndhcpv6-messages.",	&dhcpv6_universe, 19, 1 },
402 	{ "reconf-accept", "Z",			&dhcpv6_universe, 20, 1 },
403 
404 				/* RFC3319 OPTIONS */
405 
406 	/* Of course: we would HAVE to have a different atom for
407 	 * domain names without compression.  Typical.
408 	 */
409 	{ "sip-servers-names", "D",		&dhcpv6_universe, 21, 1 },
410 	{ "sip-servers-addresses", "6A",	&dhcpv6_universe, 22, 1 },
411 
412 				/* RFC3646 OPTIONS */
413 
414 	{ "name-servers", "6A",			&dhcpv6_universe, 23, 1 },
415 	{ "domain-search", "D",			&dhcpv6_universe, 24, 1 },
416 
417 				/* RFC3633 OPTIONS */
418 
419 	{ "ia-pd", "X",				&dhcpv6_universe, 25, 1 },
420 	{ "ia-prefix", "X",			&dhcpv6_universe, 26, 1 },
421 
422 				/* RFC3898 OPTIONS */
423 
424 	{ "nis-servers", "6A", 			&dhcpv6_universe, 27, 1 },
425 	{ "nisp-servers", "6A",			&dhcpv6_universe, 28, 1 },
426 	{ "nis-domain-name", "D",		&dhcpv6_universe, 29, 1 },
427 	{ "nisp-domain-name", "D",		&dhcpv6_universe, 30, 1 },
428 
429 				/* RFC4075 OPTIONS */
430 	{ "sntp-servers", "6A",			&dhcpv6_universe, 31, 1 },
431 
432 				/* RFC4242 OPTIONS */
433 
434 	{ "info-refresh-time", "T",		&dhcpv6_universe, 32, 1 },
435 
436 				/* RFC4280 OPTIONS */
437 
438 	{ "bcms-server-d", "D",			&dhcpv6_universe, 33, 1 },
439 	{ "bcms-server-a", "6A",		&dhcpv6_universe, 34, 1 },
440 
441 	/* Note that 35 is not assigned. */
442 
443 #if defined(RFC4776_OPTIONS)
444 			/* RFC4776 OPTIONS */
445 
446 	{ "geoconf-civic", "X",			&dhcpv6_universe, 36, 1 },
447 #endif
448 
449 				/* RFC4649 OPTIONS */
450 
451 	/* The remote-id option looks like the VSIO option, but for all
452 	 * intents and purposes we only need to treat the entire field
453 	 * like a globally unique identifier (and if we create such an
454 	 * option, ensure the first 4 bytes are our enterprise-id followed
455 	 * by a globally unique ID so long as you're within that enterprise
456 	 * id).  So we'll use "X" for now unless someone grumbles.
457 	 */
458 	{ "remote-id", "X",			&dhcpv6_universe, 37, 1 },
459 
460 				/* RFC4580 OPTIONS */
461 
462 	{ "subscriber-id", "X",			&dhcpv6_universe, 38, 1 },
463 
464 				/* RFC4704 OPTIONS */
465 
466 	/* The DHCPv6 FQDN option is...weird.
467 	 *
468 	 * We use the same "virtual" encapsulated space as DHCPv4's FQDN
469 	 * option, so it can all be configured in one place.  Since the
470 	 * options system does not support multiple inheritance, we use
471 	 * a 'shill' layer to perform the different protocol conversions,
472 	 * and to redirect any queries in the DHCPv4 FQDN's space.
473 	 */
474 	{ "fqdn", "Efqdn6-if-you-see-me-its-a-bug-bug-bug.",
475 						&dhcpv6_universe, 39, 1 },
476 
477 
478 			/* RFC5192 */
479 #if defined(RFC5192_OPTIONS)
480 	{ "pana-agent", "6A",			&dhcpv6_universe, 40, 1 },
481 #endif
482 
483 			/* RFC4833 OPTIONS */
484 #if defined(RFC4833_OPTIONS)
485 	{ "new-posix-timezone", "t",		&dhcpv6_universe, 41, 1 },
486 	{ "new-tzdb-timezone", "t",		&dhcpv6_universe, 42, 1 },
487 #endif
488 
489 			/* RFC4994 OPTIONS */
490 #if defined(RFC4994_OPTIONS)
491 	{ "ero", "SA",				&dhcpv6_universe, 43, 1 },
492 #endif
493 
494 			/* RFC5007 OPTIONS */
495 
496 	{ "lq-query", "X",			&dhcpv6_universe, 44, 1 },
497 	{ "client-data", "X",			&dhcpv6_universe, 45, 1 },
498 	{ "clt-time", "L",			&dhcpv6_universe, 46, 1 },
499 	{ "lq-relay-data", "6X",		&dhcpv6_universe, 47, 1 },
500 	{ "lq-client-link", "6A",		&dhcpv6_universe, 48, 1 },
501 
502 			/* RFC5223 OPTIONS */
503 #if defined(RFC5223_OPTIONS)
504 	{ "v6-lost", "d",			&dhcpv6_universe, 51, 1 },
505 #endif
506 
507 			/* RFC5417 OPTIONS */
508 #if defined(RFC5417_OPTIONS)
509 	{ "capwap-ac-v6", "6a",			&dhcpv6_universe, 52, 1 },
510 #endif
511 
512 			/* RFC5460 OPTIONS */
513 #if defined(RFC5460_OPTIONS)
514 	{ "relay-id", "X",			&dhcpv6_universe, 53, 1 },
515 #endif
516 
517 			/* RFC5986 OPTIONS */
518 #if defined(RFC5986_OPTIONS)
519 	{ "v6-access-domain", "d",		&dhcpv6_universe, 57, 1 },
520 #endif
521 
522 			/* RFC6011 OPTIONS */
523 #if defined(RFC6011_OPTIONS)
524 	{ "sip-ua-cs-list", "D",		&dhcpv6_universe, 58, 1 },
525 #endif
526 
527 			/* RFC5970 OPTIONS */
528 #if defined(RFC5970_OPTIONS)
529 	{ "bootfile-url", "t",			&dhcpv6_universe, 59, 1 },
530 	{ "bootfile-param", "X",		&dhcpv6_universe, 60, 1 },
531 	{ "client-arch-type", "SA",		&dhcpv6_universe, 61, 1 },
532 	{ "nii", "BBB",				&dhcpv6_universe, 62, 1 },
533 #endif
534 
535 			/* RFC6334 OPTIONS */
536 #if defined(RFC6334_OPTIONS)
537 	{ "aftr-name", "d",			&dhcpv6_universe, 64, 1 },
538 #endif
539 
540 			/* RFC6440 OPTIONS */
541 #if defined(RFC6440_OPTIONS)
542 	{ "erp-local-domain-name", "d",		&dhcpv6_universe, 65, 1 },
543 #endif
544 
545 			/* RFC6731 OPTIONS */
546 #if defined(RFC6731_OPTIONS)
547 	{ "rdnss-selection", "6BD",		&dhcpv6_universe, 74, 1 },
548 #endif
549 
550 			/* RFC6939 OPTIONS */
551 #if defined(RFC6939_OPTIONS)
552 	{ "client-linklayer-addr", "X",		&dhcpv6_universe, 79, 1 },
553 #endif
554 
555 			/* RFC6977 OPTIONS */
556 #if defined(RFC6977_OPTIONS)
557 	{ "link-address", "6",			&dhcpv6_universe, 80, 1 },
558 #endif
559 
560 			/* RFC7083 OPTIONS */
561 #if defined(RFC7083_OPTIONS)
562 	{ "solmax-rt", "L",			&dhcpv6_universe, 82, 1 },
563 	{ "inf-max-rt", "L",			&dhcpv6_universe, 83, 1 },
564 #endif
565 
566 			/* RFC7341 OPTIONS */
567 #if defined(RFC7341_OPTIONS)
568 	{ "dhcpv4-msg", "X",			&dhcpv6_universe, 87, 1 },
569 	{ "dhcp4-o-dhcp6-server", "6A",		&dhcpv6_universe, 88, 1 },
570 #endif
571 
572 #if defined(RFC7710_OPTIONS)
573 	{ "v6-captive-portal", "t",		&dhcpv6_universe, 103, 1 },
574 #endif
575 
576 	{ "relay-source-port", "S",		&dhcpv6_universe, 135, 1 },
577 
578 #if defined(RFC6153_OPTIONS)
579 	{ "ipv6-address-andsf", "6A",		&dhcpv6_universe, 143, 1 },
580 #endif
581 
582 	{ NULL, NULL, NULL, 0, 0 }
583 };
584 
585 struct enumeration_value dhcpv6_duid_type_values[] = {
586 	{ "duid-llt",	DUID_LLT },  /* Link-Local Plus Time */
587 	{ "duid-en",	DUID_EN },   /* DUID based upon enterprise-ID. */
588 	{ "duid-ll",	DUID_LL },   /* DUID from Link Local address only. */
589 	{ "duid-uuid",	DUID_UUID }, /* DUID based upon UUID */
590 	{ NULL, 0 }
591 };
592 
593 struct enumeration dhcpv6_duid_types = {
594 	NULL,
595 	"duid-types", 2,
596 	dhcpv6_duid_type_values
597 };
598 
599 struct enumeration_value dhcpv6_status_code_values[] = {
600 	{ "success",	  0 }, /* Success				*/
601 	{ "UnspecFail",	  1 }, /* Failure, for unspecified reasons.	*/
602 	{ "NoAddrsAvail", 2 }, /* Server has no addresses to assign.	*/
603 	{ "NoBinding",	  3 }, /* Client record (binding) unavailable.	*/
604 	{ "NotOnLink",	  4 }, /* Bad prefix for the link.		*/
605 	{ "UseMulticast", 5 }, /* Not just good advice.  It's the law.	*/
606 	{ "NoPrefixAvail", 6 }, /* Server has no prefixes to assign.	*/
607 	{ "UnknownQueryType", 7 }, /* Query-type unknown/unsupported.	*/
608 	{ "MalformedQuery", 8 }, /* Leasequery not valid.		*/
609 	{ "NotConfigured", 9 }, /* The target address is not in config.	*/
610 	{ "NotAllowed",  10 }, /* Server doesn't allow the leasequery.	*/
611 	{ "QueryTerminated", 11 }, /* Leasequery terminated.		*/
612 	{ NULL, 0 }
613 };
614 
615 struct enumeration dhcpv6_status_codes = {
616 	NULL,
617 	"status-codes", 2,
618 	dhcpv6_status_code_values
619 };
620 
621 struct enumeration_value lq6_query_type_values[] = {
622 	{ "query-by-address", 1 },
623 	{ "query-by-clientid", 2 },
624 	{ "query-by-relay-id", 3 },
625 	{ "query-by-link-address", 4 },
626 	{ "query-by-remote-id", 5 },
627 	{ NULL, 0 }
628 };
629 
630 struct enumeration lq6_query_types = {
631 	NULL,
632 	"query-types", 2,
633 	lq6_query_type_values
634 };
635 
636 struct enumeration_value dhcpv6_message_values[] = {
637 	{ "SOLICIT", 1 },
638 	{ "ADVERTISE", 2 },
639 	{ "REQUEST", 3 },
640 	{ "CONFIRM", 4 },
641 	{ "RENEW", 5 },
642 	{ "REBIND", 6 },
643 	{ "REPLY", 7 },
644 	{ "RELEASE", 8 },
645 	{ "DECLINE", 9 },
646 	{ "RECONFIGURE", 10 },
647 	{ "INFORMATION-REQUEST", 11 },
648 	{ "RELAY-FORW", 12 },
649 	{ "RELAY-REPL", 13 },
650 	{ "LEASEQUERY", 14 },
651 	{ "LEASEQUERY-REPLY", 15 },
652 	{ "LEASEQUERY-DONE", 16 },
653 	{ "LEASEQUERY-DATA", 17 },
654 	{ "RECONFIGURE-REQUEST", 18 },
655 	{ "RECONFIGURE-REPLY", 19 },
656 	{ "DHCPV4-QUERY", 20 },
657 	{ "DHCPV4-RESPONSE", 21 },
658 	{ NULL, 0 }
659 };
660 
661 /* Some code refers to a different table. */
662 const char *dhcpv6_type_names[] = {
663 	NULL,
664 	"Solicit",
665 	"Advertise",
666 	"Request",
667 	"Confirm",
668 	"Renew",
669 	"Rebind",
670 	"Reply",
671 	"Release",
672 	"Decline",
673 	"Reconfigure",
674 	"Information-request",
675 	"Relay-forward",
676 	"Relay-reply",
677 	"Leasequery",
678 	"Leasequery-reply",
679 	"Leasequery-done",
680 	"Leasequery-data",
681 	"Reconfigure-request",
682 	"Reconfigure-reply",
683 	"Dhcpv4-query",
684 	"Dhcpv4-response"
685 };
686 const int dhcpv6_type_name_max =
687 	(sizeof(dhcpv6_type_names) / sizeof(dhcpv6_type_names[0]));
688 
689 struct enumeration dhcpv6_messages = {
690 	NULL,
691 	"dhcpv6-messages", 1,
692 	dhcpv6_message_values
693 };
694 
695 struct universe vsio_universe;
696 static struct option vsio_options[] = {
697 	{ "isc", "Eisc6.",		&vsio_universe,		     2495, 1 },
698 	{ NULL, NULL, NULL, 0, 0 }
699 };
700 
701 struct universe isc6_universe;
702 static struct option isc6_options[] = {
703 	{ "media", "t",				&isc6_universe,     1, 1 },
704 	{ "update-assist", "X",			&isc6_universe,     2, 1 },
705 	{ "4o6-interface", "t",			&isc6_universe, 60000, 1 },
706 	{ "4o6-source-address", "6",		&isc6_universe, 60001, 1 },
707 	{ NULL, NULL, NULL, 0, 0 }
708 };
709 
710 const char *hardware_types [] = {
711 	"unknown-0",
712 	"ethernet",
713 	"unknown-2",
714 	"unknown-3",
715 	"unknown-4",
716 	"unknown-5",
717 	"token-ring",
718 	"unknown-7",
719 	"fddi",
720 	"unknown-9",
721 	"unknown-10",
722 	"unknown-11",
723 	"unknown-12",
724 	"unknown-13",
725 	"unknown-14",
726 	"unknown-15",
727 	"unknown-16",
728 	"unknown-17",
729 	"unknown-18",
730 	"unknown-19",
731 	"unknown-20",
732 	"unknown-21",
733 	"unknown-22",
734 	"unknown-23",
735 	"unknown-24",
736 	"unknown-25",
737 	"unknown-26",
738 	"unknown-27",
739 	"unknown-28",
740 	"unknown-29",
741 	"unknown-30",
742 	"unknown-31",
743 	"infiniband",
744 	"unknown-33",
745 	"unknown-34",
746 	"unknown-35",
747 	"unknown-36",
748 	"unknown-37",
749 	"unknown-38",
750 	"unknown-39",
751 	"unknown-40",
752 	"unknown-41",
753 	"unknown-42",
754 	"unknown-43",
755 	"unknown-44",
756 	"unknown-45",
757 	"unknown-46",
758 	"unknown-47",
759 	"unknown-48",
760 	"unknown-49",
761 	"unknown-50",
762 	"unknown-51",
763 	"unknown-52",
764 	"unknown-53",
765 	"unknown-54",
766 	"unknown-55",
767 	"unknown-56",
768 	"unknown-57",
769 	"unknown-58",
770 	"unknown-59",
771 	"unknown-60",
772 	"unknown-61",
773 	"unknown-62",
774 	"unknown-63",
775 	"unknown-64",
776 	"unknown-65",
777 	"unknown-66",
778 	"unknown-67",
779 	"unknown-68",
780 	"unknown-69",
781 	"unknown-70",
782 	"unknown-71",
783 	"unknown-72",
784 	"unknown-73",
785 	"unknown-74",
786 	"unknown-75",
787 	"unknown-76",
788 	"unknown-77",
789 	"unknown-78",
790 	"unknown-79",
791 	"unknown-80",
792 	"unknown-81",
793 	"unknown-82",
794 	"unknown-83",
795 	"unknown-84",
796 	"unknown-85",
797 	"unknown-86",
798 	"unknown-87",
799 	"unknown-88",
800 	"unknown-89",
801 	"unknown-90",
802 	"unknown-91",
803 	"unknown-92",
804 	"unknown-93",
805 	"unknown-94",
806 	"unknown-95",
807 	"unknown-96",
808 	"unknown-97",
809 	"unknown-98",
810 	"unknown-99",
811 	"unknown-100",
812 	"unknown-101",
813 	"unknown-102",
814 	"unknown-103",
815 	"unknown-104",
816 	"unknown-105",
817 	"unknown-106",
818 	"unknown-107",
819 	"unknown-108",
820 	"unknown-109",
821 	"unknown-110",
822 	"unknown-111",
823 	"unknown-112",
824 	"unknown-113",
825 	"unknown-114",
826 	"unknown-115",
827 	"unknown-116",
828 	"unknown-117",
829 	"unknown-118",
830 	"unknown-119",
831 	"unknown-120",
832 	"unknown-121",
833 	"unknown-122",
834 	"unknown-123",
835 	"unknown-124",
836 	"unknown-125",
837 	"unknown-126",
838 	"unknown-127",
839 	"unknown-128",
840 	"unknown-129",
841 	"unknown-130",
842 	"unknown-131",
843 	"unknown-132",
844 	"unknown-133",
845 	"unknown-134",
846 	"unknown-135",
847 	"unknown-136",
848 	"unknown-137",
849 	"unknown-138",
850 	"unknown-139",
851 	"unknown-140",
852 	"unknown-141",
853 	"unknown-142",
854 	"unknown-143",
855 	"unknown-144",
856 	"unknown-145",
857 	"unknown-146",
858 	"unknown-147",
859 	"unknown-148",
860 	"unknown-149",
861 	"unknown-150",
862 	"unknown-151",
863 	"unknown-152",
864 	"unknown-153",
865 	"unknown-154",
866 	"unknown-155",
867 	"unknown-156",
868 	"unknown-157",
869 	"unknown-158",
870 	"unknown-159",
871 	"unknown-160",
872 	"unknown-161",
873 	"unknown-162",
874 	"unknown-163",
875 	"unknown-164",
876 	"unknown-165",
877 	"unknown-166",
878 	"unknown-167",
879 	"unknown-168",
880 	"unknown-169",
881 	"unknown-170",
882 	"unknown-171",
883 	"unknown-172",
884 	"unknown-173",
885 	"unknown-174",
886 	"unknown-175",
887 	"unknown-176",
888 	"unknown-177",
889 	"unknown-178",
890 	"unknown-179",
891 	"unknown-180",
892 	"unknown-181",
893 	"unknown-182",
894 	"unknown-183",
895 	"unknown-184",
896 	"unknown-185",
897 	"unknown-186",
898 	"unknown-187",
899 	"unknown-188",
900 	"unknown-189",
901 	"unknown-190",
902 	"unknown-191",
903 	"unknown-192",
904 	"unknown-193",
905 	"unknown-194",
906 	"unknown-195",
907 	"unknown-196",
908 	"unknown-197",
909 	"unknown-198",
910 	"unknown-199",
911 	"unknown-200",
912 	"unknown-201",
913 	"unknown-202",
914 	"unknown-203",
915 	"unknown-204",
916 	"unknown-205",
917 	"unknown-206",
918 	"unknown-207",
919 	"unknown-208",
920 	"unknown-209",
921 	"unknown-210",
922 	"unknown-211",
923 	"unknown-212",
924 	"unknown-213",
925 	"unknown-214",
926 	"unknown-215",
927 	"unknown-216",
928 	"unknown-217",
929 	"unknown-218",
930 	"unknown-219",
931 	"unknown-220",
932 	"unknown-221",
933 	"unknown-222",
934 	"unknown-223",
935 	"unknown-224",
936 	"unknown-225",
937 	"unknown-226",
938 	"unknown-227",
939 	"unknown-228",
940 	"unknown-229",
941 	"unknown-230",
942 	"unknown-231",
943 	"unknown-232",
944 	"unknown-233",
945 	"unknown-234",
946 	"unknown-235",
947 	"unknown-236",
948 	"unknown-237",
949 	"unknown-238",
950 	"unknown-239",
951 	"unknown-240",
952 	"unknown-241",
953 	"unknown-242",
954 	"unknown-243",
955 	"unknown-244",
956 	"unknown-245",
957 	"unknown-246",
958 	"unknown-247",
959 	"unknown-248",
960 	"unknown-249",
961 	"unknown-250",
962 	"unknown-251",
963 	"unknown-252",
964 	"unknown-253",
965 	"unknown-254",
966 	"unknown-255" };
967 
968 universe_hash_t *universe_hash;
969 struct universe **universes;
970 int universe_count, universe_max;
971 
972 /* Universe containing names of configuration options, which, rather than
973    writing "option universe-name.option-name ...;", can be set by writing
974    "option-name ...;". */
975 
976 struct universe *config_universe;
977 
978 /* XXX: omapi must die...all the below keeps us from having to make the
979  * option structures omapi typed objects, which is a bigger headache.
980  */
981 
982 char *default_option_format = (char *) "X";
983 
984 /* Must match hash_reference/dereference types in omapip/hash.h. */
985 int
option_reference(struct option ** dest,struct option * src,const char * file,int line)986 option_reference(struct option **dest, struct option *src,
987 	         const char * file, int line)
988 {
989 	if (!dest || !src)
990 	        return DHCP_R_INVALIDARG;
991 
992 	if (*dest) {
993 #if defined(POINTER_DEBUG)
994 	        log_fatal("%s(%d): reference store into non-null pointer!",
995 	                  file, line);
996 #else
997 	        return DHCP_R_INVALIDARG;
998 #endif
999 	}
1000 
1001 	*dest = src;
1002 	src->refcnt++;
1003 	rc_register(file, line, dest, src, src->refcnt, 0, RC_MISC);
1004 	return(ISC_R_SUCCESS);
1005 }
1006 
1007 int
option_dereference(struct option ** dest,const char * file,int line)1008 option_dereference(struct option **dest, const char *file, int line)
1009 {
1010 	if (!dest)
1011 	        return DHCP_R_INVALIDARG;
1012 
1013 	if (!*dest) {
1014 #if defined (POINTER_DEBUG)
1015 	        log_fatal("%s(%d): dereference of null pointer!", file, line);
1016 #else
1017 	        return DHCP_R_INVALIDARG;
1018 #endif
1019 	}
1020 
1021 	if ((*dest)->refcnt <= 0) {
1022 #if defined (POINTER_DEBUG)
1023 	        log_fatal("%s(%d): dereference of <= 0 refcnt!", file, line);
1024 #else
1025 	        return DHCP_R_INVALIDARG;
1026 #endif
1027 	}
1028 
1029 	(*dest)->refcnt--;
1030 
1031 	rc_register(file, line, dest, (*dest), (*dest)->refcnt, 1, RC_MISC);
1032 
1033 	if ((*dest)->refcnt == 0) {
1034 		/* The option name may be packed in the same alloc as the
1035 		 * option structure.
1036 		 */
1037 	        if ((char *) (*dest)->name != (char *) ((*dest) + 1))
1038 	                dfree((char *) (*dest)->name, file, line);
1039 
1040 		/* It's either a user-configured format (allocated), or the
1041 		 * default static format.
1042 		 */
1043 		if (((*dest)->format != NULL) &&
1044 		    ((*dest)->format != default_option_format)) {
1045 			dfree((char *) (*dest)->format, file, line);
1046 		}
1047 
1048 	        dfree(*dest, file, line);
1049 	}
1050 
1051 	*dest = NULL;
1052 	return ISC_R_SUCCESS;
1053 }
1054 
initialize_common_option_spaces()1055 void initialize_common_option_spaces()
1056 {
1057 	unsigned code;
1058 	int i;
1059 
1060 	/* The 'universes' table is dynamically grown to contain
1061 	 * universe as they're configured - except during startup.
1062 	 * Since we know how many we put down in .c files, we can
1063 	 * allocate a more-than-right-sized buffer now, leaving some
1064 	 * space for user-configured option spaces.
1065 	 *
1066 	 * 1: dhcp_universe (dhcpv4 options)
1067 	 * 2: nwip_universe (dhcpv4 NWIP option)
1068 	 * 3: fqdn_universe (dhcpv4 fqdn option - reusable for v6)
1069 	 * 4: vendor_class_universe (VIVCO)
1070 	 * 5: vendor_universe (VIVSO)
1071 	 * 6: isc_universe (dhcpv4 isc config space)
1072 	 * 7: dhcpv6_universe (dhcpv6 options)
1073 	 * 8: vsio_universe (DHCPv6 Vendor-Identified space)
1074 	 * 9: isc6_universe (ISC's Vendor universe in DHCPv6 VSIO)
1075 	 * 10: fqdn6_universe (dhcpv6 fqdn option shill to v4)
1076 	 * 11: agent_universe (dhcpv4 relay agent - see server/stables.c)
1077 	 * 12: server_universe (server's config, see server/stables.c)
1078 	 * 13: user-config
1079 	 * 14: more user-config
1080 	 * 15: more user-config
1081 	 * 16: more user-config
1082 	 */
1083 	universe_max = 16;
1084 	i = universe_max * sizeof(struct universe *);
1085 	if (i <= 0)
1086 		log_fatal("Ludicrous initial size option space table.");
1087 	universes = dmalloc(i, MDL);
1088 	if (universes == NULL)
1089 		log_fatal("Can't allocate option space table.");
1090 	memset(universes, 0, i);
1091 
1092 	/* Set up the DHCP option universe... */
1093 	dhcp_universe.name = "dhcp";
1094 	dhcp_universe.concat_duplicates = 1;
1095 	dhcp_universe.lookup_func = lookup_hashed_option;
1096 	dhcp_universe.option_state_dereference =
1097 		hashed_option_state_dereference;
1098 	dhcp_universe.save_func = save_hashed_option;
1099 	dhcp_universe.delete_func = delete_hashed_option;
1100 	dhcp_universe.encapsulate = hashed_option_space_encapsulate;
1101 	dhcp_universe.foreach = hashed_option_space_foreach;
1102 	dhcp_universe.decode = parse_option_buffer;
1103 	dhcp_universe.length_size = 1;
1104 	dhcp_universe.tag_size = 1;
1105 	dhcp_universe.get_tag = getUChar;
1106 	dhcp_universe.store_tag = putUChar;
1107 	dhcp_universe.get_length = getUChar;
1108 	dhcp_universe.store_length = putUChar;
1109 	dhcp_universe.site_code_min = 0;
1110 	dhcp_universe.end = DHO_END;
1111 	dhcp_universe.index = universe_count++;
1112 	universes [dhcp_universe.index] = &dhcp_universe;
1113 	if (!option_name_new_hash(&dhcp_universe.name_hash,
1114 				  BYTE_NAME_HASH_SIZE, MDL) ||
1115 	    !option_code_new_hash(&dhcp_universe.code_hash,
1116 				  BYTE_CODE_HASH_SIZE, MDL))
1117 		log_fatal ("Can't allocate dhcp option hash table.");
1118 	for (i = 0 ; dhcp_options[i].name ; i++) {
1119 		option_code_hash_add(dhcp_universe.code_hash,
1120 				     &dhcp_options[i].code, 0,
1121 				     &dhcp_options[i], MDL);
1122 		option_name_hash_add(dhcp_universe.name_hash,
1123 				     dhcp_options [i].name, 0,
1124 				     &dhcp_options [i], MDL);
1125 	}
1126 #if defined(REPORT_HASH_PERFORMANCE)
1127 	log_info("DHCP name hash: %s",
1128 		 option_name_hash_report(dhcp_universe.name_hash));
1129 	log_info("DHCP code hash: %s",
1130 		 option_code_hash_report(dhcp_universe.code_hash));
1131 #endif
1132 
1133 	/* Set up the Novell option universe (for option 63)... */
1134 	nwip_universe.name = "nwip";
1135 	nwip_universe.concat_duplicates = 0; /* XXX: reference? */
1136 	nwip_universe.lookup_func = lookup_linked_option;
1137 	nwip_universe.option_state_dereference =
1138 		linked_option_state_dereference;
1139 	nwip_universe.save_func = save_linked_option;
1140 	nwip_universe.delete_func = delete_linked_option;
1141 	nwip_universe.encapsulate = nwip_option_space_encapsulate;
1142 	nwip_universe.foreach = linked_option_space_foreach;
1143 	nwip_universe.decode = parse_option_buffer;
1144 	nwip_universe.length_size = 1;
1145 	nwip_universe.tag_size = 1;
1146 	nwip_universe.get_tag = getUChar;
1147 	nwip_universe.store_tag = putUChar;
1148 	nwip_universe.get_length = getUChar;
1149 	nwip_universe.store_length = putUChar;
1150 	nwip_universe.site_code_min = 0;
1151 	nwip_universe.end = 0;
1152 	code = DHO_NWIP_SUBOPTIONS;
1153 	nwip_universe.enc_opt = NULL;
1154 	if (!option_code_hash_lookup(&nwip_universe.enc_opt,
1155 				     dhcp_universe.code_hash, &code, 0, MDL))
1156 		log_fatal("Unable to find NWIP parent option (%s:%d).", MDL);
1157 	nwip_universe.index = universe_count++;
1158 	universes [nwip_universe.index] = &nwip_universe;
1159 	if (!option_name_new_hash(&nwip_universe.name_hash,
1160 				  NWIP_HASH_SIZE, MDL) ||
1161 	    !option_code_new_hash(&nwip_universe.code_hash,
1162 				  NWIP_HASH_SIZE, MDL))
1163 		log_fatal ("Can't allocate nwip option hash table.");
1164 	for (i = 0 ; nwip_options[i].name ; i++) {
1165 		option_code_hash_add(nwip_universe.code_hash,
1166 				     &nwip_options[i].code, 0,
1167 				     &nwip_options[i], MDL);
1168 		option_name_hash_add(nwip_universe.name_hash,
1169 				     nwip_options[i].name, 0,
1170 				     &nwip_options[i], MDL);
1171 	}
1172 #if defined(REPORT_HASH_PERFORMANCE)
1173 	log_info("NWIP name hash: %s",
1174 		 option_name_hash_report(nwip_universe.name_hash));
1175 	log_info("NWIP code hash: %s",
1176 		 option_code_hash_report(nwip_universe.code_hash));
1177 #endif
1178 
1179 	/* Set up the FQDN option universe... */
1180 	fqdn_universe.name = "fqdn";
1181 	fqdn_universe.concat_duplicates = 0;
1182 	fqdn_universe.lookup_func = lookup_linked_option;
1183 	fqdn_universe.option_state_dereference =
1184 		linked_option_state_dereference;
1185 	fqdn_universe.save_func = save_linked_option;
1186 	fqdn_universe.delete_func = delete_linked_option;
1187 	fqdn_universe.encapsulate = fqdn_option_space_encapsulate;
1188 	fqdn_universe.foreach = linked_option_space_foreach;
1189 	fqdn_universe.decode = fqdn_universe_decode;
1190 	fqdn_universe.length_size = 1;
1191 	fqdn_universe.tag_size = 1;
1192 	fqdn_universe.get_tag = getUChar;
1193 	fqdn_universe.store_tag = putUChar;
1194 	fqdn_universe.get_length = getUChar;
1195 	fqdn_universe.store_length = putUChar;
1196 	fqdn_universe.site_code_min = 0;
1197 	fqdn_universe.end = 0;
1198 	fqdn_universe.index = universe_count++;
1199 	code = DHO_FQDN;
1200 	fqdn_universe.enc_opt = NULL;
1201 	if (!option_code_hash_lookup(&fqdn_universe.enc_opt,
1202 				     dhcp_universe.code_hash, &code, 0, MDL))
1203 		log_fatal("Unable to find FQDN parent option (%s:%d).", MDL);
1204 	universes [fqdn_universe.index] = &fqdn_universe;
1205 	if (!option_name_new_hash(&fqdn_universe.name_hash,
1206 				  FQDN_HASH_SIZE, MDL) ||
1207 	    !option_code_new_hash(&fqdn_universe.code_hash,
1208 				  FQDN_HASH_SIZE, MDL))
1209 		log_fatal ("Can't allocate fqdn option hash table.");
1210 	for (i = 0 ; fqdn_options[i].name ; i++) {
1211 		option_code_hash_add(fqdn_universe.code_hash,
1212 				     &fqdn_options[i].code, 0,
1213 				     &fqdn_options[i], MDL);
1214 		option_name_hash_add(fqdn_universe.name_hash,
1215 				     fqdn_options[i].name, 0,
1216 				     &fqdn_options[i], MDL);
1217 	}
1218 #if defined(REPORT_HASH_PERFORMANCE)
1219 	log_info("FQDN name hash: %s",
1220 		 option_name_hash_report(fqdn_universe.name_hash));
1221 	log_info("FQDN code hash: %s",
1222 		 option_code_hash_report(fqdn_universe.code_hash));
1223 #endif
1224 
1225         /* Set up the Vendor Identified Vendor Class options (for option
1226 	 * 125)...
1227 	 */
1228         vendor_class_universe.name = "vendor-class";
1229 	vendor_class_universe.concat_duplicates = 0; /* XXX: reference? */
1230         vendor_class_universe.lookup_func = lookup_hashed_option;
1231         vendor_class_universe.option_state_dereference =
1232                 hashed_option_state_dereference;
1233         vendor_class_universe.save_func = save_hashed_option;
1234         vendor_class_universe.delete_func = delete_hashed_option;
1235         vendor_class_universe.encapsulate = hashed_option_space_encapsulate;
1236         vendor_class_universe.foreach = hashed_option_space_foreach;
1237         vendor_class_universe.decode = parse_option_buffer;
1238         vendor_class_universe.length_size = 1;
1239         vendor_class_universe.tag_size = 4;
1240 	vendor_class_universe.get_tag = getULong;
1241         vendor_class_universe.store_tag = putULong;
1242 	vendor_class_universe.get_length = getUChar;
1243         vendor_class_universe.store_length = putUChar;
1244 	vendor_class_universe.site_code_min = 0;
1245 	vendor_class_universe.end = 0;
1246 	code = DHO_VIVCO_SUBOPTIONS;
1247 	vendor_class_universe.enc_opt = NULL;
1248 	if (!option_code_hash_lookup(&vendor_class_universe.enc_opt,
1249 				     dhcp_universe.code_hash, &code, 0, MDL))
1250 		log_fatal("Unable to find VIVCO parent option (%s:%d).", MDL);
1251         vendor_class_universe.index = universe_count++;
1252         universes[vendor_class_universe.index] = &vendor_class_universe;
1253         if (!option_name_new_hash(&vendor_class_universe.name_hash,
1254 				  VIVCO_HASH_SIZE, MDL) ||
1255 	    !option_code_new_hash(&vendor_class_universe.code_hash,
1256 				  VIVCO_HASH_SIZE, MDL))
1257                 log_fatal("Can't allocate Vendor Identified Vendor Class "
1258 			  "option hash table.");
1259         for (i = 0 ; vendor_class_options[i].name ; i++) {
1260 		option_code_hash_add(vendor_class_universe.code_hash,
1261 				     &vendor_class_options[i].code, 0,
1262 				     &vendor_class_options[i], MDL);
1263                 option_name_hash_add(vendor_class_universe.name_hash,
1264                                      vendor_class_options[i].name, 0,
1265                                      &vendor_class_options[i], MDL);
1266         }
1267 #if defined(REPORT_HASH_PERFORMANCE)
1268 	log_info("VIVCO name hash: %s",
1269 		 option_name_hash_report(vendor_class_universe.name_hash));
1270 	log_info("VIVCO code hash: %s",
1271 		 option_code_hash_report(vendor_class_universe.code_hash));
1272 #endif
1273 
1274         /* Set up the Vendor Identified Vendor Sub-options (option 126)... */
1275         vendor_universe.name = "vendor";
1276 	vendor_universe.concat_duplicates = 0; /* XXX: reference? */
1277         vendor_universe.lookup_func = lookup_hashed_option;
1278         vendor_universe.option_state_dereference =
1279                 hashed_option_state_dereference;
1280         vendor_universe.save_func = save_hashed_option;
1281         vendor_universe.delete_func = delete_hashed_option;
1282         vendor_universe.encapsulate = hashed_option_space_encapsulate;
1283         vendor_universe.foreach = hashed_option_space_foreach;
1284         vendor_universe.decode = parse_option_buffer;
1285         vendor_universe.length_size = 1;
1286         vendor_universe.tag_size = 4;
1287 	vendor_universe.get_tag = getULong;
1288         vendor_universe.store_tag = putULong;
1289 	vendor_universe.get_length = getUChar;
1290         vendor_universe.store_length = putUChar;
1291 	vendor_universe.site_code_min = 0;
1292 	vendor_universe.end = 0;
1293 	code = DHO_VIVSO_SUBOPTIONS;
1294 	vendor_universe.enc_opt = NULL;
1295 	if (!option_code_hash_lookup(&vendor_universe.enc_opt,
1296 				     dhcp_universe.code_hash, &code, 0, MDL))
1297 		log_fatal("Unable to find VIVSO parent option (%s:%d).", MDL);
1298         vendor_universe.index = universe_count++;
1299         universes[vendor_universe.index] = &vendor_universe;
1300         if (!option_name_new_hash(&vendor_universe.name_hash,
1301 				  VIVSO_HASH_SIZE, MDL) ||
1302 	    !option_code_new_hash(&vendor_universe.code_hash,
1303 				  VIVSO_HASH_SIZE, MDL))
1304                 log_fatal("Can't allocate Vendor Identified Vendor Sub-"
1305 			  "options hash table.");
1306         for (i = 0 ; vendor_options[i].name ; i++) {
1307                 option_code_hash_add(vendor_universe.code_hash,
1308 				     &vendor_options[i].code, 0,
1309 				     &vendor_options[i], MDL);
1310                 option_name_hash_add(vendor_universe.name_hash,
1311 				     vendor_options[i].name, 0,
1312 				     &vendor_options[i], MDL);
1313         }
1314 #if defined(REPORT_HASH_PERFORMANCE)
1315 	log_info("VIVSO name hash: %s",
1316 		 option_name_hash_report(vendor_universe.name_hash));
1317 	log_info("VIVSO code hash: %s",
1318 		 option_code_hash_report(vendor_universe.code_hash));
1319 #endif
1320 
1321         /* Set up the ISC Vendor-option universe (for option 125.2495)... */
1322         isc_universe.name = "isc";
1323 	isc_universe.concat_duplicates = 0; /* XXX: check VIVSO ref */
1324         isc_universe.lookup_func = lookup_linked_option;
1325         isc_universe.option_state_dereference =
1326                 linked_option_state_dereference;
1327         isc_universe.save_func = save_linked_option;
1328         isc_universe.delete_func = delete_linked_option;
1329         isc_universe.encapsulate = linked_option_space_encapsulate;
1330         isc_universe.foreach = linked_option_space_foreach;
1331         isc_universe.decode = parse_option_buffer;
1332         isc_universe.length_size = 2;
1333         isc_universe.tag_size = 2;
1334 	isc_universe.get_tag = getUShort;
1335         isc_universe.store_tag = putUShort;
1336 	isc_universe.get_length = getUShort;
1337         isc_universe.store_length = putUShort;
1338 	isc_universe.site_code_min = 0;
1339 	isc_universe.end = 0;
1340 	code = VENDOR_ISC_SUBOPTIONS;
1341 	isc_universe.enc_opt = NULL;
1342 	if (!option_code_hash_lookup(&isc_universe.enc_opt,
1343 				     vendor_universe.code_hash, &code, 0, MDL))
1344 		log_fatal("Unable to find ISC parent option (%s:%d).", MDL);
1345         isc_universe.index = universe_count++;
1346         universes[isc_universe.index] = &isc_universe;
1347         if (!option_name_new_hash(&isc_universe.name_hash,
1348 				  VIV_ISC_HASH_SIZE, MDL) ||
1349 	    !option_code_new_hash(&isc_universe.code_hash,
1350 				  VIV_ISC_HASH_SIZE, MDL))
1351                 log_fatal("Can't allocate ISC Vendor options hash table.");
1352         for (i = 0 ; isc_options[i].name ; i++) {
1353 		option_code_hash_add(isc_universe.code_hash,
1354 				     &isc_options[i].code, 0,
1355 				     &isc_options[i], MDL);
1356                 option_name_hash_add(isc_universe.name_hash,
1357                                      isc_options[i].name, 0,
1358                                      &isc_options[i], MDL);
1359         }
1360 #if defined(REPORT_HASH_PERFORMANCE)
1361 	log_info("ISC name hash: %s",
1362 		 option_name_hash_report(isc_universe.name_hash));
1363 	log_info("ISC code hash: %s",
1364 		 option_code_hash_report(isc_universe.code_hash));
1365 #endif
1366 
1367 	/* Set up the DHCPv6 root universe. */
1368 	dhcpv6_universe.name = "dhcp6";
1369 	dhcpv6_universe.concat_duplicates = 0;
1370 	dhcpv6_universe.lookup_func = lookup_hashed_option;
1371 	dhcpv6_universe.option_state_dereference =
1372 		hashed_option_state_dereference;
1373 	dhcpv6_universe.save_func = save_hashed_option;
1374 	dhcpv6_universe.delete_func = delete_hashed_option;
1375 	dhcpv6_universe.encapsulate = hashed_option_space_encapsulate;
1376 	dhcpv6_universe.foreach = hashed_option_space_foreach;
1377 	dhcpv6_universe.decode = parse_option_buffer;
1378 	dhcpv6_universe.length_size = 2;
1379 	dhcpv6_universe.tag_size = 2;
1380 	dhcpv6_universe.get_tag = getUShort;
1381 	dhcpv6_universe.store_tag = putUShort;
1382 	dhcpv6_universe.get_length = getUShort;
1383 	dhcpv6_universe.store_length = putUShort;
1384 	dhcpv6_universe.site_code_min = 0;
1385 	/* DHCPv6 has no END option. */
1386 	dhcpv6_universe.end = 0x00;
1387 	dhcpv6_universe.index = universe_count++;
1388 	universes[dhcpv6_universe.index] = &dhcpv6_universe;
1389 	if (!option_name_new_hash(&dhcpv6_universe.name_hash,
1390 				  WORD_NAME_HASH_SIZE, MDL) ||
1391 	    !option_code_new_hash(&dhcpv6_universe.code_hash,
1392 				  WORD_CODE_HASH_SIZE, MDL))
1393 		log_fatal("Can't allocate dhcpv6 option hash tables.");
1394 	for (i = 0 ; dhcpv6_options[i].name ; i++) {
1395 		option_code_hash_add(dhcpv6_universe.code_hash,
1396 				     &dhcpv6_options[i].code, 0,
1397 				     &dhcpv6_options[i], MDL);
1398 		option_name_hash_add(dhcpv6_universe.name_hash,
1399 				     dhcpv6_options[i].name, 0,
1400 				     &dhcpv6_options[i], MDL);
1401 	}
1402 
1403 	/* Add DHCPv6 protocol enumeration sets. */
1404 	add_enumeration(&dhcpv6_duid_types);
1405 	add_enumeration(&dhcpv6_status_codes);
1406 	add_enumeration(&dhcpv6_messages);
1407 
1408 	/* Set up DHCPv6 VSIO universe. */
1409 	vsio_universe.name = "vsio";
1410 	vsio_universe.concat_duplicates = 0;
1411 	vsio_universe.lookup_func = lookup_hashed_option;
1412 	vsio_universe.option_state_dereference =
1413 		hashed_option_state_dereference;
1414 	vsio_universe.save_func = save_hashed_option;
1415 	vsio_universe.delete_func = delete_hashed_option;
1416 	vsio_universe.encapsulate = hashed_option_space_encapsulate;
1417 	vsio_universe.foreach = hashed_option_space_foreach;
1418 	vsio_universe.decode = parse_option_buffer;
1419 	vsio_universe.length_size = 0;
1420 	vsio_universe.tag_size = 4;
1421 	vsio_universe.get_tag = getULong;
1422 	vsio_universe.store_tag = putULong;
1423 	vsio_universe.get_length = NULL;
1424 	vsio_universe.store_length = NULL;
1425 	vsio_universe.site_code_min = 0;
1426 	/* No END option. */
1427 	vsio_universe.end = 0x00;
1428 	code = D6O_VENDOR_OPTS;
1429 	if (!option_code_hash_lookup(&vsio_universe.enc_opt,
1430 				     dhcpv6_universe.code_hash, &code, 0, MDL))
1431 		log_fatal("Unable to find VSIO parent option (%s:%d).", MDL);
1432 	vsio_universe.index = universe_count++;
1433 	universes[vsio_universe.index] = &vsio_universe;
1434 	if (!option_name_new_hash(&vsio_universe.name_hash,
1435 				  VSIO_HASH_SIZE, MDL) ||
1436 	    !option_code_new_hash(&vsio_universe.code_hash,
1437 				  VSIO_HASH_SIZE, MDL))
1438 		log_fatal("Can't allocate Vendor Specific Information "
1439 			  "Options space.");
1440 	for (i = 0 ; vsio_options[i].name != NULL ; i++) {
1441 		option_code_hash_add(vsio_universe.code_hash,
1442 				     &vsio_options[i].code, 0,
1443 				     &vsio_options[i], MDL);
1444 		option_name_hash_add(vsio_universe.name_hash,
1445 				     vsio_options[i].name, 0,
1446 				     &vsio_options[i], MDL);
1447 	}
1448 
1449 	/* Add ISC VSIO sub-sub-option space. */
1450 	isc6_universe.name = "isc6";
1451 	isc6_universe.concat_duplicates = 0;
1452 	isc6_universe.lookup_func = lookup_hashed_option;
1453 	isc6_universe.option_state_dereference =
1454 		hashed_option_state_dereference;
1455 	isc6_universe.save_func = save_hashed_option;
1456 	isc6_universe.delete_func = delete_hashed_option;
1457 	isc6_universe.encapsulate = hashed_option_space_encapsulate;
1458 	isc6_universe.foreach = hashed_option_space_foreach;
1459 	isc6_universe.decode = parse_option_buffer;
1460 	isc6_universe.length_size = 0;
1461 	isc6_universe.tag_size = 4;
1462 	isc6_universe.get_tag = getULong;
1463 	isc6_universe.store_tag = putULong;
1464 	isc6_universe.get_length = NULL;
1465 	isc6_universe.store_length = NULL;
1466 	isc6_universe.site_code_min = 0;
1467 	/* No END option. */
1468 	isc6_universe.end = 0x00;
1469 	code = 2495;
1470 	if (!option_code_hash_lookup(&isc6_universe.enc_opt,
1471 				     vsio_universe.code_hash, &code, 0, MDL))
1472 		log_fatal("Unable to find ISC parent option (%s:%d).", MDL);
1473 	isc6_universe.index = universe_count++;
1474 	universes[isc6_universe.index] = &isc6_universe;
1475 	if (!option_name_new_hash(&isc6_universe.name_hash,
1476 				  VIV_ISC_HASH_SIZE, MDL) ||
1477 	    !option_code_new_hash(&isc6_universe.code_hash,
1478 				  VIV_ISC_HASH_SIZE, MDL))
1479 		log_fatal("Can't allocate Vendor Specific Information "
1480 			  "Options space.");
1481 	for (i = 0 ; isc6_options[i].name != NULL ; i++) {
1482 		option_code_hash_add(isc6_universe.code_hash,
1483 				     &isc6_options[i].code, 0,
1484 				     &isc6_options[i], MDL);
1485 		option_name_hash_add(isc6_universe.name_hash,
1486 				     isc6_options[i].name, 0,
1487 				     &isc6_options[i], MDL);
1488 	}
1489 
1490 	/* The fqdn6 option space is a protocol-wrapper shill for the
1491 	 * old DHCPv4 space.
1492 	 */
1493 	fqdn6_universe.name = "fqdn6-if-you-see-me-its-a-bug-bug-bug";
1494 	fqdn6_universe.lookup_func = lookup_fqdn6_option;
1495 	fqdn6_universe.option_state_dereference = NULL; /* Covered by v4. */
1496 	fqdn6_universe.save_func = save_fqdn6_option;
1497 	fqdn6_universe.delete_func = delete_fqdn6_option;
1498 	fqdn6_universe.encapsulate = fqdn6_option_space_encapsulate;
1499 	fqdn6_universe.foreach = fqdn6_option_space_foreach;
1500 	fqdn6_universe.decode = fqdn6_universe_decode;
1501 	/* This is not a 'normal' encapsulated space, so these values are
1502 	 * meaningless.
1503 	 */
1504 	fqdn6_universe.length_size = 0;
1505 	fqdn6_universe.tag_size = 0;
1506 	fqdn6_universe.get_tag = NULL;
1507 	fqdn6_universe.store_tag = NULL;
1508 	fqdn6_universe.get_length = NULL;
1509 	fqdn6_universe.store_length = NULL;
1510 	fqdn6_universe.site_code_min = 0;
1511 	fqdn6_universe.end = 0;
1512 	fqdn6_universe.index = universe_count++;
1513 	code = D6O_CLIENT_FQDN;
1514 	fqdn6_universe.enc_opt = NULL;
1515 	if (!option_code_hash_lookup(&fqdn6_universe.enc_opt,
1516 				     dhcpv6_universe.code_hash, &code, 0, MDL))
1517 		log_fatal("Unable to find FQDN v6 parent option. (%s:%d).",
1518 			  MDL);
1519 	universes[fqdn6_universe.index] = &fqdn6_universe;
1520 	/* The fqdn6 space shares the same option space as the v4 space.
1521 	 * So there are no name or code hashes on the v6 side.
1522 	 */
1523 	fqdn6_universe.name_hash = NULL;
1524 	fqdn6_universe.code_hash = NULL;
1525 
1526 
1527 	/* Set up the hash of DHCPv4 universes. */
1528 	universe_new_hash(&universe_hash, UNIVERSE_HASH_SIZE, MDL);
1529 	universe_hash_add(universe_hash, dhcp_universe.name, 0,
1530 			  &dhcp_universe, MDL);
1531 	universe_hash_add(universe_hash, nwip_universe.name, 0,
1532 			  &nwip_universe, MDL);
1533 	universe_hash_add(universe_hash, fqdn_universe.name, 0,
1534 			  &fqdn_universe, MDL);
1535 	universe_hash_add(universe_hash, vendor_class_universe.name, 0,
1536 			  &vendor_class_universe, MDL);
1537 	universe_hash_add(universe_hash, vendor_universe.name, 0,
1538 			  &vendor_universe, MDL);
1539 	universe_hash_add(universe_hash, isc_universe.name, 0,
1540 			  &isc_universe, MDL);
1541 
1542 	/* Set up hashes for DHCPv6 universes. */
1543 	universe_hash_add(universe_hash, dhcpv6_universe.name, 0,
1544 			  &dhcpv6_universe, MDL);
1545 	universe_hash_add(universe_hash, vsio_universe.name, 0,
1546 			  &vsio_universe, MDL);
1547 	universe_hash_add(universe_hash, isc6_universe.name, 0,
1548 			  &isc6_universe, MDL);
1549 	/* previously this wasn't necessary, now that we can send
1550 	 * v6 encapsulated options it is.
1551 	 */
1552 	universe_hash_add(universe_hash, fqdn6_universe.name, 0,
1553 			  &fqdn6_universe, MDL);
1554 
1555 }
1556