3 Tables of information only used by server... */
6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 * Copyright (c) 1995-2003 by Internet Software Consortium
9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
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.
21 * Internet Systems Consortium, Inc.
23 * Redwood City, CA 94063
27 * This software has been written for Internet Systems Consortium
28 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
29 * To learn more about Internet Systems Consortium, see
30 * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
31 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
32 * ``http://www.nominum.com''.
36 static char copyright
[] =
37 "$Id: stables.c,v 1.25.2.12 2004/06/10 17:59:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
42 #if defined (FAILOVER_PROTOCOL)
44 /* This is used to indicate some kind of failure when generating a
46 failover_option_t null_failover_option
= { 0, 0 };
47 failover_option_t skip_failover_option
= { 0, 0 };
49 /* Information about failover options, for printing, encoding
51 struct failover_option_info ft_options
[] =
53 { 0, "unused", FT_UNDEF
, 0, 0, 0 },
54 { FTO_BINDING_STATUS
, "binding-status",
55 FT_UINT8
, 1, FM_OFFSET (binding_status
), FTB_BINDING_STATUS
},
56 { FTO_ASSIGNED_IP_ADDRESS
, "assigned-IP-address",
57 FT_IPADDR
, 1, FM_OFFSET (assigned_addr
), FTB_ASSIGNED_IP_ADDRESS
},
58 { FTO_SERVER_ADDR
, "sending-server-IP-address",
59 FT_IPADDR
, 1, FM_OFFSET (server_addr
), FTB_SERVER_ADDR
},
60 { FTO_ADDRESSES_TRANSFERRED
, "addresses-transferred",
61 FT_UINT32
, 1, FM_OFFSET (addresses_transferred
),
62 FTB_ADDRESSES_TRANSFERRED
},
63 { FTO_CLIENT_IDENTIFIER
, "client-identifier",
64 FT_BYTES
, 0, FM_OFFSET (client_identifier
), FTB_CLIENT_IDENTIFIER
},
65 { FTO_CHADDR
, "client-hardware-address",
66 FT_BYTES
, 0, FM_OFFSET (chaddr
), FTB_CHADDR
},
68 FT_DDNS
, 1, FM_OFFSET (ddns
), FTB_DDNS
},
69 { FTO_REJECT_REASON
, "reject-reason",
70 FT_UINT8
, 1, FM_OFFSET (reject_reason
), FTB_REJECT_REASON
},
71 { FTO_MESSAGE
, "message",
72 FT_TEXT
, 0, FM_OFFSET (message
), FTB_MESSAGE
},
74 FT_UINT32
, 1, FM_OFFSET (mclt
), FTB_MCLT
},
75 { FTO_VENDOR_CLASS
, "vendor-class-identifier",
76 FT_TEXT_OR_BYTES
, 0, FM_OFFSET (vendor_class
), FTB_VENDOR_CLASS
},
77 { 12, "undefined", FT_UNDEF
, 0, 0, 0 },
78 { FTO_LEASE_EXPIRY
, "lease-expiration-time",
79 FT_UINT32
, 1, FM_OFFSET (expiry
), FTB_LEASE_EXPIRY
},
80 { FTO_POTENTIAL_EXPIRY
, "potential-expiration-time",
81 FT_UINT32
, 1, FM_OFFSET (potential_expiry
), FTB_POTENTIAL_EXPIRY
},
82 { FTO_GRACE_EXPIRY
, "grace-expiration-time",
83 FT_UINT32
, 1, FM_OFFSET (grace_expiry
), FTB_GRACE_EXPIRY
},
84 { FTO_CLTT
, "client-last-transaction-time",
85 FT_UINT32
, 1, FM_OFFSET (client_ltt
), FTB_CLTT
},
86 { FTO_STOS
, "start-time-of-state",
87 FT_UINT32
, 1, FM_OFFSET (stos
), FTB_STOS
},
88 { FTO_SERVER_STATE
, "server-state",
89 FT_UINT8
, 1, FM_OFFSET (server_state
), FTB_SERVER_STATE
},
90 { FTO_SERVER_FLAGS
, "server-flags",
91 FT_UINT8
, 1, FM_OFFSET (server_flags
), FTB_SERVER_FLAGS
},
92 { FTO_VENDOR_OPTIONS
, "vendor-specific-options",
93 FT_BYTES
, 0, FM_OFFSET (vendor_options
), FTB_VENDOR_OPTIONS
},
94 { FTO_MAX_UNACKED
, "max-unacked-bndupd",
95 FT_UINT32
, 1, FM_OFFSET (max_unacked
), FTB_MAX_UNACKED
},
96 { 22, "undefined", FT_UNDEF
, 0, 0 },
97 { FTO_RECEIVE_TIMER
, "receive-timer",
98 FT_UINT32
, 1, FM_OFFSET (receive_timer
), FTB_RECEIVE_TIMER
},
99 { FTO_HBA
, "hash-bucket-assignment",
100 FT_BYTES
, 0, FM_OFFSET (hba
), FTB_HBA
},
101 { FTO_MESSAGE_DIGEST
, "message-digest",
102 FT_DIGEST
, 0, 0, FTB_MESSAGE_DIGEST
},
103 { FTO_PROTOCOL_VERSION
, "protocol-version",
104 FT_UINT8
, 1, FM_OFFSET (protocol_version
), FTB_PROTOCOL_VERSION
},
105 { FTO_TLS_REQUEST
, "TLS-request",
106 FT_UINT8
, 2, FM_OFFSET (tls_request
), FTB_TLS_REQUEST
},
107 { FTO_TLS_REPLY
, "TLS-reply",
108 FT_BYTES
, 1, FM_OFFSET (tls_reply
), FTB_TLS_REPLY
},
109 { FTO_REQUEST_OPTIONS
, "client-request-options",
110 FT_BYTES
, 0, FM_OFFSET (request_options
), FTB_REQUEST_OPTIONS
},
111 { FTO_REPLY_OPTIONS
, "client-reply-options",
112 FT_BYTES
, 0, FM_OFFSET (reply_options
), FTB_REPLY_OPTIONS
}
115 /* These are really options that make sense for a particular request - if
116 some other option comes in, we're not going to use it, so we can just
117 discard it. Note that the message-digest option is allowed for all
118 message types, but is not saved - it's just used to validate the message
119 and then discarded - so it's not mentioned here. */
121 u_int32_t fto_allowed
[] = {
124 FTB_ADDRESSES_TRANSFERRED
, /* 2 POOLRESP */
125 (FTB_ASSIGNED_IP_ADDRESS
| FTB_BINDING_STATUS
| FTB_CLIENT_IDENTIFIER
|
126 FTB_CHADDR
| FTB_LEASE_EXPIRY
| FTB_POTENTIAL_EXPIRY
| FTB_STOS
|
127 FTB_CLTT
| FTB_REQUEST_OPTIONS
| FTB_REPLY_OPTIONS
), /* 3 BNDUPD */
128 (FTB_ASSIGNED_IP_ADDRESS
| FTB_BINDING_STATUS
| FTB_CLIENT_IDENTIFIER
|
129 FTB_CHADDR
| FTB_LEASE_EXPIRY
| FTB_POTENTIAL_EXPIRY
| FTB_STOS
|
130 FTB_CLTT
| FTB_REQUEST_OPTIONS
| FTB_REPLY_OPTIONS
|
131 FTB_REJECT_REASON
| FTB_MESSAGE
), /* 4 BNDACK */
132 (FTB_SERVER_ADDR
| FTB_MAX_UNACKED
| FTB_RECEIVE_TIMER
|
133 FTB_VENDOR_CLASS
| FTB_PROTOCOL_VERSION
| FTB_TLS_REQUEST
|
134 FTB_MCLT
| FTB_HBA
), /* 5 CONNECT */
135 (FTB_SERVER_ADDR
| FTB_MAX_UNACKED
| FTB_RECEIVE_TIMER
|
136 FTB_VENDOR_CLASS
| FTB_PROTOCOL_VERSION
| FTB_TLS_REPLY
|
137 FTB_REJECT_REASON
| FTB_MESSAGE
), /* CONNECTACK */
141 (FTB_SERVER_STATE
| FTB_SERVER_FLAGS
| FTB_STOS
), /* 10 STATE */
143 (FTB_REJECT_REASON
| FTB_MESSAGE
) /* 12 DISCONNECT */
146 /* Sizes of the various types. */
152 1, /* FT_TEXT_OR_BYTES */
161 /* Names of the various failover link states. */
162 const char *dhcp_flink_state_names
[] = {
165 "message length wait",
169 #endif /* FAILOVER_PROTOCOL */
171 /* Failover binding state names. These are used even if there is no
172 failover protocol support. */
173 const char *binding_state_names
[] = {
174 "free", "active", "expired", "released", "abandoned",
175 "reset", "backup", "reserved", "bootp" };
177 struct universe agent_universe
;
178 struct option agent_options
[256] = {
179 { "pad", "", &agent_universe
, 0 },
180 { "circuit-id", "X", &agent_universe
, 1 },
181 { "remote-id", "X", &agent_universe
, 2 },
182 { "agent-id", "I", &agent_universe
, 3 },
183 { "DOCSIS-device-class", "L", &agent_universe
, 4 },
184 { "unknown-5", "X", &agent_universe
, 5 },
185 { "unknown-6", "X", &agent_universe
, 6 },
186 { "unknown-7", "X", &agent_universe
, 7 },
187 { "unknown-8", "X", &agent_universe
, 8 },
188 { "unknown-9", "X", &agent_universe
, 9 },
189 { "unknown-10", "X", &agent_universe
, 10 },
190 { "unknown-11", "X", &agent_universe
, 11 },
191 { "unknown-12", "X", &agent_universe
, 12 },
192 { "unknown-13", "X", &agent_universe
, 13 },
193 { "unknown-14", "X", &agent_universe
, 14 },
194 { "unknown-15", "X", &agent_universe
, 15 },
195 { "unknown-16", "X", &agent_universe
, 16 },
196 { "unknown-17", "X", &agent_universe
, 17 },
197 { "unknown-18", "X", &agent_universe
, 18 },
198 { "unknown-19", "X", &agent_universe
, 19 },
199 { "unknown-20", "X", &agent_universe
, 20 },
200 { "unknown-21", "X", &agent_universe
, 21 },
201 { "unknown-22", "X", &agent_universe
, 22 },
202 { "unknown-23", "X", &agent_universe
, 23 },
203 { "unknown-24", "X", &agent_universe
, 24 },
204 { "unknown-25", "X", &agent_universe
, 25 },
205 { "unknown-26", "X", &agent_universe
, 26 },
206 { "unknown-27", "X", &agent_universe
, 27 },
207 { "unknown-28", "X", &agent_universe
, 28 },
208 { "unknown-29", "X", &agent_universe
, 29 },
209 { "unknown-30", "X", &agent_universe
, 30 },
210 { "unknown-31", "X", &agent_universe
, 31 },
211 { "unknown-32", "X", &agent_universe
, 32 },
212 { "unknown-33", "X", &agent_universe
, 33 },
213 { "unknown-34", "X", &agent_universe
, 34 },
214 { "unknown-35", "X", &agent_universe
, 35 },
215 { "unknown-36", "X", &agent_universe
, 36 },
216 { "unknown-37", "X", &agent_universe
, 37 },
217 { "unknown-38", "X", &agent_universe
, 38 },
218 { "unknown-39", "X", &agent_universe
, 39 },
219 { "unknown-40", "X", &agent_universe
, 40 },
220 { "unknown-41", "X", &agent_universe
, 41 },
221 { "unknown-42", "X", &agent_universe
, 42 },
222 { "unknown-43", "X", &agent_universe
, 43 },
223 { "unknown-44", "X", &agent_universe
, 44 },
224 { "unknown-45", "X", &agent_universe
, 45 },
225 { "unknown-46", "X", &agent_universe
, 46 },
226 { "unknown-47", "X", &agent_universe
, 47 },
227 { "unknown-48", "X", &agent_universe
, 48 },
228 { "unknown-49", "X", &agent_universe
, 49 },
229 { "unknown-50", "X", &agent_universe
, 50 },
230 { "unknown-51", "X", &agent_universe
, 51 },
231 { "unknown-52", "X", &agent_universe
, 52 },
232 { "unknown-53", "X", &agent_universe
, 53 },
233 { "unknown-54", "X", &agent_universe
, 54 },
234 { "unknown-55", "X", &agent_universe
, 55 },
235 { "unknown-56", "X", &agent_universe
, 56 },
236 { "unknown-57", "X", &agent_universe
, 57 },
237 { "unknown-58", "X", &agent_universe
, 58 },
238 { "unknown-59", "X", &agent_universe
, 59 },
239 { "unknown-60", "X", &agent_universe
, 60 },
240 { "unknown-61", "X", &agent_universe
, 61 },
241 { "unknown-62", "X", &agent_universe
, 62 },
242 { "unknown-63", "X", &agent_universe
, 63 },
243 { "unknown-64", "X", &agent_universe
, 64 },
244 { "unknown-65", "X", &agent_universe
, 65 },
245 { "unknown-66", "X", &agent_universe
, 66 },
246 { "unknown-67", "X", &agent_universe
, 67 },
247 { "unknown-68", "X", &agent_universe
, 68 },
248 { "unknown-69", "X", &agent_universe
, 69 },
249 { "unknown-70", "X", &agent_universe
, 70 },
250 { "unknown-71", "X", &agent_universe
, 71 },
251 { "unknown-72", "X", &agent_universe
, 72 },
252 { "unknown-73", "X", &agent_universe
, 73 },
253 { "unknown-74", "X", &agent_universe
, 74 },
254 { "unknown-75", "X", &agent_universe
, 75 },
255 { "unknown-76", "X", &agent_universe
, 76 },
256 { "unknown-77", "X", &agent_universe
, 77 },
257 { "unknown-78", "X", &agent_universe
, 78 },
258 { "unknown-79", "X", &agent_universe
, 79 },
259 { "unknown-80", "X", &agent_universe
, 80 },
260 { "unknown-81", "X", &agent_universe
, 81 },
261 { "unknown-82", "X", &agent_universe
, 82 },
262 { "unknown-83", "X", &agent_universe
, 83 },
263 { "unknown-84", "X", &agent_universe
, 84 },
264 { "unknown-85", "X", &agent_universe
, 85 },
265 { "unknown-86", "X", &agent_universe
, 86 },
266 { "unknown-87", "X", &agent_universe
, 87 },
267 { "unknown-88", "X", &agent_universe
, 88 },
268 { "unknown-89", "X", &agent_universe
, 89 },
269 { "unknown-90", "X", &agent_universe
, 90 },
270 { "unknown-91", "X", &agent_universe
, 91 },
271 { "unknown-92", "X", &agent_universe
, 92 },
272 { "unknown-93", "X", &agent_universe
, 93 },
273 { "unknown-94", "X", &agent_universe
, 94 },
274 { "unknown-95", "X", &agent_universe
, 95 },
275 { "unknown-96", "X", &agent_universe
, 96 },
276 { "unknown-97", "X", &agent_universe
, 97 },
277 { "unknown-98", "X", &agent_universe
, 98 },
278 { "unknown-99", "X", &agent_universe
, 99 },
279 { "unknown-100", "X", &agent_universe
, 100 },
280 { "unknown-101", "X", &agent_universe
, 101 },
281 { "unknown-102", "X", &agent_universe
, 102 },
282 { "unknown-103", "X", &agent_universe
, 103 },
283 { "unknown-104", "X", &agent_universe
, 104 },
284 { "unknown-105", "X", &agent_universe
, 105 },
285 { "unknown-106", "X", &agent_universe
, 106 },
286 { "unknown-107", "X", &agent_universe
, 107 },
287 { "unknown-108", "X", &agent_universe
, 108 },
288 { "unknown-109", "X", &agent_universe
, 109 },
289 { "unknown-110", "X", &agent_universe
, 110 },
290 { "unknown-111", "X", &agent_universe
, 111 },
291 { "unknown-112", "X", &agent_universe
, 112 },
292 { "unknown-113", "X", &agent_universe
, 113 },
293 { "unknown-114", "X", &agent_universe
, 114 },
294 { "unknown-115", "X", &agent_universe
, 115 },
295 { "unknown-116", "X", &agent_universe
, 116 },
296 { "unknown-117", "X", &agent_universe
, 117 },
297 { "unknown-118", "X", &agent_universe
, 118 },
298 { "unknown-119", "X", &agent_universe
, 119 },
299 { "unknown-120", "X", &agent_universe
, 120 },
300 { "unknown-121", "X", &agent_universe
, 121 },
301 { "unknown-122", "X", &agent_universe
, 122 },
302 { "unknown-123", "X", &agent_universe
, 123 },
303 { "unknown-124", "X", &agent_universe
, 124 },
304 { "unknown-125", "X", &agent_universe
, 125 },
305 { "unknown-126", "X", &agent_universe
, 126 },
306 { "unknown-127", "X", &agent_universe
, 127 },
307 { "unknown-128", "X", &agent_universe
, 128 },
308 { "unknown-129", "X", &agent_universe
, 129 },
309 { "unknown-130", "X", &agent_universe
, 130 },
310 { "unknown-131", "X", &agent_universe
, 131 },
311 { "unknown-132", "X", &agent_universe
, 132 },
312 { "unknown-133", "X", &agent_universe
, 133 },
313 { "unknown-134", "X", &agent_universe
, 134 },
314 { "unknown-135", "X", &agent_universe
, 135 },
315 { "unknown-136", "X", &agent_universe
, 136 },
316 { "unknown-137", "X", &agent_universe
, 137 },
317 { "unknown-138", "X", &agent_universe
, 138 },
318 { "unknown-139", "X", &agent_universe
, 139 },
319 { "unknown-140", "X", &agent_universe
, 140 },
320 { "unknown-141", "X", &agent_universe
, 141 },
321 { "unknown-142", "X", &agent_universe
, 142 },
322 { "unknown-143", "X", &agent_universe
, 143 },
323 { "unknown-144", "X", &agent_universe
, 144 },
324 { "unknown-145", "X", &agent_universe
, 145 },
325 { "unknown-146", "X", &agent_universe
, 146 },
326 { "unknown-147", "X", &agent_universe
, 147 },
327 { "unknown-148", "X", &agent_universe
, 148 },
328 { "unknown-149", "X", &agent_universe
, 149 },
329 { "unknown-150", "X", &agent_universe
, 150 },
330 { "unknown-151", "X", &agent_universe
, 151 },
331 { "unknown-152", "X", &agent_universe
, 152 },
332 { "unknown-153", "X", &agent_universe
, 153 },
333 { "unknown-154", "X", &agent_universe
, 154 },
334 { "unknown-155", "X", &agent_universe
, 155 },
335 { "unknown-156", "X", &agent_universe
, 156 },
336 { "unknown-157", "X", &agent_universe
, 157 },
337 { "unknown-158", "X", &agent_universe
, 158 },
338 { "unknown-159", "X", &agent_universe
, 159 },
339 { "unknown-160", "X", &agent_universe
, 160 },
340 { "unknown-161", "X", &agent_universe
, 161 },
341 { "unknown-162", "X", &agent_universe
, 162 },
342 { "unknown-163", "X", &agent_universe
, 163 },
343 { "unknown-164", "X", &agent_universe
, 164 },
344 { "unknown-165", "X", &agent_universe
, 165 },
345 { "unknown-166", "X", &agent_universe
, 166 },
346 { "unknown-167", "X", &agent_universe
, 167 },
347 { "unknown-168", "X", &agent_universe
, 168 },
348 { "unknown-169", "X", &agent_universe
, 169 },
349 { "unknown-170", "X", &agent_universe
, 170 },
350 { "unknown-171", "X", &agent_universe
, 171 },
351 { "unknown-172", "X", &agent_universe
, 172 },
352 { "unknown-173", "X", &agent_universe
, 173 },
353 { "unknown-174", "X", &agent_universe
, 174 },
354 { "unknown-175", "X", &agent_universe
, 175 },
355 { "unknown-176", "X", &agent_universe
, 176 },
356 { "unknown-177", "X", &agent_universe
, 177 },
357 { "unknown-178", "X", &agent_universe
, 178 },
358 { "unknown-179", "X", &agent_universe
, 179 },
359 { "unknown-180", "X", &agent_universe
, 180 },
360 { "unknown-181", "X", &agent_universe
, 181 },
361 { "unknown-182", "X", &agent_universe
, 182 },
362 { "unknown-183", "X", &agent_universe
, 183 },
363 { "unknown-184", "X", &agent_universe
, 184 },
364 { "unknown-185", "X", &agent_universe
, 185 },
365 { "unknown-186", "X", &agent_universe
, 186 },
366 { "unknown-187", "X", &agent_universe
, 187 },
367 { "unknown-188", "X", &agent_universe
, 188 },
368 { "unknown-189", "X", &agent_universe
, 189 },
369 { "unknown-190", "X", &agent_universe
, 190 },
370 { "unknown-191", "X", &agent_universe
, 191 },
371 { "unknown-192", "X", &agent_universe
, 192 },
372 { "unknown-193", "X", &agent_universe
, 193 },
373 { "unknown-194", "X", &agent_universe
, 194 },
374 { "unknown-195", "X", &agent_universe
, 195 },
375 { "unknown-196", "X", &agent_universe
, 196 },
376 { "unknown-197", "X", &agent_universe
, 197 },
377 { "unknown-198", "X", &agent_universe
, 198 },
378 { "unknown-199", "X", &agent_universe
, 199 },
379 { "unknown-200", "X", &agent_universe
, 200 },
380 { "unknown-201", "X", &agent_universe
, 201 },
381 { "unknown-202", "X", &agent_universe
, 202 },
382 { "unknown-203", "X", &agent_universe
, 203 },
383 { "unknown-204", "X", &agent_universe
, 204 },
384 { "unknown-205", "X", &agent_universe
, 205 },
385 { "unknown-206", "X", &agent_universe
, 206 },
386 { "unknown-207", "X", &agent_universe
, 207 },
387 { "unknown-208", "X", &agent_universe
, 208 },
388 { "unknown-209", "X", &agent_universe
, 209 },
389 { "unknown-210", "X", &agent_universe
, 210 },
390 { "unknown-211", "X", &agent_universe
, 211 },
391 { "unknown-212", "X", &agent_universe
, 212 },
392 { "unknown-213", "X", &agent_universe
, 213 },
393 { "unknown-214", "X", &agent_universe
, 214 },
394 { "unknown-215", "X", &agent_universe
, 215 },
395 { "unknown-216", "X", &agent_universe
, 216 },
396 { "unknown-217", "X", &agent_universe
, 217 },
397 { "unknown-218", "X", &agent_universe
, 218 },
398 { "unknown-219", "X", &agent_universe
, 219 },
399 { "unknown-220", "X", &agent_universe
, 220 },
400 { "unknown-221", "X", &agent_universe
, 221 },
401 { "unknown-222", "X", &agent_universe
, 222 },
402 { "unknown-223", "X", &agent_universe
, 223 },
403 { "unknown-224", "X", &agent_universe
, 224 },
404 { "unknown-225", "X", &agent_universe
, 225 },
405 { "unknown-226", "X", &agent_universe
, 226 },
406 { "unknown-227", "X", &agent_universe
, 227 },
407 { "unknown-228", "X", &agent_universe
, 228 },
408 { "unknown-229", "X", &agent_universe
, 229 },
409 { "unknown-230", "X", &agent_universe
, 230 },
410 { "unknown-231", "X", &agent_universe
, 231 },
411 { "unknown-232", "X", &agent_universe
, 232 },
412 { "unknown-233", "X", &agent_universe
, 233 },
413 { "unknown-234", "X", &agent_universe
, 234 },
414 { "unknown-235", "X", &agent_universe
, 235 },
415 { "unknown-236", "X", &agent_universe
, 236 },
416 { "unknown-237", "X", &agent_universe
, 237 },
417 { "unknown-238", "X", &agent_universe
, 238 },
418 { "unknown-239", "X", &agent_universe
, 239 },
419 { "unknown-240", "X", &agent_universe
, 240 },
420 { "unknown-241", "X", &agent_universe
, 241 },
421 { "unknown-242", "X", &agent_universe
, 242 },
422 { "unknown-243", "X", &agent_universe
, 243 },
423 { "unknown-244", "X", &agent_universe
, 244 },
424 { "unknown-245", "X", &agent_universe
, 245 },
425 { "unknown-246", "X", &agent_universe
, 246 },
426 { "unknown-247", "X", &agent_universe
, 247 },
427 { "unknown-248", "X", &agent_universe
, 248 },
428 { "unknown-249", "X", &agent_universe
, 249 },
429 { "unknown-250", "X", &agent_universe
, 250 },
430 { "unknown-251", "X", &agent_universe
, 251 },
431 { "unknown-252", "X", &agent_universe
, 252 },
432 { "unknown-253", "X", &agent_universe
, 253 },
433 { "unknown-254", "X", &agent_universe
, 254 },
434 { "option-end", "e", &agent_universe
, 255 },
437 struct universe server_universe
;
438 struct option server_options
[256] = {
439 { "pad", "", &server_universe
, 0 },
440 { "default-lease-time", "T", &server_universe
, 1 },
441 { "max-lease-time", "T", &server_universe
, 2 },
442 { "min-lease-time", "T", &server_universe
, 3 },
443 { "dynamic-bootp-lease-cutoff", "T", &server_universe
, 4 },
444 { "dynamic-bootp-lease-length", "L", &server_universe
, 5 },
445 { "boot-unknown-clients", "f", &server_universe
, 6 },
446 { "dynamic-bootp", "f", &server_universe
, 7 },
447 { "allow-bootp", "f", &server_universe
, 8 },
448 { "allow-booting", "f", &server_universe
, 9 },
449 { "one-lease-per-client", "f", &server_universe
, 10 },
450 { "get-lease-hostnames", "f", &server_universe
, 11 },
451 { "use-host-decl-names", "f", &server_universe
, 12 },
452 { "use-lease-addr-for-default-route", "f", &server_universe
, 13 },
453 { "min-secs", "B", &server_universe
, 14 },
454 { "filename", "t", &server_universe
, 15 },
455 { "server-name", "t", &server_universe
, 16 },
456 { "next-server", "I", &server_universe
, 17 },
457 { "authoritative", "f", &server_universe
, 18 },
458 { "vendor-option-space", "U", &server_universe
, 19 },
459 { "always-reply-rfc1048", "f", &server_universe
, 20 },
460 { "site-option-space", "X", &server_universe
, 21 },
461 { "always-broadcast", "f", &server_universe
, 22 },
462 { "ddns-domainname", "t", &server_universe
, 23 },
463 { "ddns-hostname", "t", &server_universe
, 24 },
464 { "ddns-rev-domainname", "t", &server_universe
, 25 },
465 { "lease-file-name", "t", &server_universe
, 26 },
466 { "pid-file-name", "t", &server_universe
, 27 },
467 { "duplicates", "f", &server_universe
, 28 },
468 { "declines", "f", &server_universe
, 29 },
469 { "ddns-updates", "f", &server_universe
, 30 },
470 { "omapi-port", "S", &server_universe
, 31 },
471 { "local-port", "S", &server_universe
, 32 },
472 { "limited-broadcast-address", "I", &server_universe
, 33 },
473 { "remote-port", "S", &server_universe
, 34 },
474 { "local-address", "I", &server_universe
, 35 },
475 { "omapi-key", "d", &server_universe
, 36 },
476 { "stash-agent-options", "f", &server_universe
, 37 },
477 { "ddns-ttl", "T", &server_universe
, 38 },
478 { "ddns-update-style", "Nddns-styles.", &server_universe
, 39 },
479 { "client-updates", "f", &server_universe
, 40 },
480 { "update-optimization", "f", &server_universe
, 41 },
481 { "ping-check", "f", &server_universe
, 42 },
482 { "update-static-leases", "f", &server_universe
, 43 },
483 { "log-facility", "Nsyslog-facilities.", &server_universe
, 44 },
484 { "do-forward-updates", "f", &server_universe
, 45 },
485 { "ping-timeout", "T", &server_universe
, 46 },
486 { "unknown-47", "X", &server_universe
, 47 },
487 { "unknown-48", "X", &server_universe
, 48 },
488 { "unknown-49", "X", &server_universe
, 49 },
489 { "unknown-50", "X", &server_universe
, 50 },
490 { "unknown-51", "X", &server_universe
, 51 },
491 { "unknown-52", "X", &server_universe
, 52 },
492 { "unknown-53", "X", &server_universe
, 53 },
493 { "unknown-54", "X", &server_universe
, 54 },
494 { "unknown-55", "X", &server_universe
, 55 },
495 { "unknown-56", "X", &server_universe
, 56 },
496 { "unknown-57", "X", &server_universe
, 57 },
497 { "unknown-58", "X", &server_universe
, 58 },
498 { "unknown-59", "X", &server_universe
, 59 },
499 { "unknown-60", "X", &server_universe
, 60 },
500 { "unknown-61", "X", &server_universe
, 61 },
501 { "unknown-62", "X", &server_universe
, 62 },
502 { "unknown-63", "X", &server_universe
, 63 },
503 { "unknown-64", "X", &server_universe
, 64 },
504 { "unknown-65", "X", &server_universe
, 65 },
505 { "unknown-66", "X", &server_universe
, 66 },
506 { "unknown-67", "X", &server_universe
, 67 },
507 { "unknown-68", "X", &server_universe
, 68 },
508 { "unknown-69", "X", &server_universe
, 69 },
509 { "unknown-70", "X", &server_universe
, 70 },
510 { "unknown-71", "X", &server_universe
, 71 },
511 { "unknown-72", "X", &server_universe
, 72 },
512 { "unknown-73", "X", &server_universe
, 73 },
513 { "unknown-74", "X", &server_universe
, 74 },
514 { "unknown-75", "X", &server_universe
, 75 },
515 { "unknown-76", "X", &server_universe
, 76 },
516 { "unknown-77", "X", &server_universe
, 77 },
517 { "unknown-78", "X", &server_universe
, 78 },
518 { "unknown-79", "X", &server_universe
, 79 },
519 { "unknown-80", "X", &server_universe
, 80 },
520 { "unknown-81", "X", &server_universe
, 81 },
521 { "unknown-82", "X", &server_universe
, 82 },
522 { "unknown-83", "X", &server_universe
, 83 },
523 { "unknown-84", "X", &server_universe
, 84 },
524 { "unknown-85", "X", &server_universe
, 85 },
525 { "unknown-86", "X", &server_universe
, 86 },
526 { "unknown-87", "X", &server_universe
, 87 },
527 { "unknown-88", "X", &server_universe
, 88 },
528 { "unknown-89", "X", &server_universe
, 89 },
529 { "unknown-90", "X", &server_universe
, 90 },
530 { "unknown-91", "X", &server_universe
, 91 },
531 { "unknown-92", "X", &server_universe
, 92 },
532 { "unknown-93", "X", &server_universe
, 93 },
533 { "unknown-94", "X", &server_universe
, 94 },
534 { "unknown-95", "X", &server_universe
, 95 },
535 { "unknown-96", "X", &server_universe
, 96 },
536 { "unknown-97", "X", &server_universe
, 97 },
537 { "unknown-98", "X", &server_universe
, 98 },
538 { "unknown-99", "X", &server_universe
, 99 },
539 { "unknown-100", "X", &server_universe
, 100 },
540 { "unknown-101", "X", &server_universe
, 101 },
541 { "unknown-102", "X", &server_universe
, 102 },
542 { "unknown-103", "X", &server_universe
, 103 },
543 { "unknown-104", "X", &server_universe
, 104 },
544 { "unknown-105", "X", &server_universe
, 105 },
545 { "unknown-106", "X", &server_universe
, 106 },
546 { "unknown-107", "X", &server_universe
, 107 },
547 { "unknown-108", "X", &server_universe
, 108 },
548 { "unknown-109", "X", &server_universe
, 109 },
549 { "unknown-110", "X", &server_universe
, 110 },
550 { "unknown-111", "X", &server_universe
, 111 },
551 { "unknown-112", "X", &server_universe
, 112 },
552 { "unknown-113", "X", &server_universe
, 113 },
553 { "unknown-114", "X", &server_universe
, 114 },
554 { "unknown-115", "X", &server_universe
, 115 },
555 { "unknown-116", "X", &server_universe
, 116 },
556 { "unknown-117", "X", &server_universe
, 117 },
557 { "unknown-118", "X", &server_universe
, 118 },
558 { "unknown-119", "X", &server_universe
, 119 },
559 { "unknown-120", "X", &server_universe
, 120 },
560 { "unknown-121", "X", &server_universe
, 121 },
561 { "unknown-122", "X", &server_universe
, 122 },
562 { "unknown-123", "X", &server_universe
, 123 },
563 { "unknown-124", "X", &server_universe
, 124 },
564 { "unknown-125", "X", &server_universe
, 125 },
565 { "unknown-126", "X", &server_universe
, 126 },
566 { "unknown-127", "X", &server_universe
, 127 },
567 { "unknown-128", "X", &server_universe
, 128 },
568 { "unknown-129", "X", &server_universe
, 129 },
569 { "unknown-130", "X", &server_universe
, 130 },
570 { "unknown-131", "X", &server_universe
, 131 },
571 { "unknown-132", "X", &server_universe
, 132 },
572 { "unknown-133", "X", &server_universe
, 133 },
573 { "unknown-134", "X", &server_universe
, 134 },
574 { "unknown-135", "X", &server_universe
, 135 },
575 { "unknown-136", "X", &server_universe
, 136 },
576 { "unknown-137", "X", &server_universe
, 137 },
577 { "unknown-138", "X", &server_universe
, 138 },
578 { "unknown-139", "X", &server_universe
, 139 },
579 { "unknown-140", "X", &server_universe
, 140 },
580 { "unknown-141", "X", &server_universe
, 141 },
581 { "unknown-142", "X", &server_universe
, 142 },
582 { "unknown-143", "X", &server_universe
, 143 },
583 { "unknown-144", "X", &server_universe
, 144 },
584 { "unknown-145", "X", &server_universe
, 145 },
585 { "unknown-146", "X", &server_universe
, 146 },
586 { "unknown-147", "X", &server_universe
, 147 },
587 { "unknown-148", "X", &server_universe
, 148 },
588 { "unknown-149", "X", &server_universe
, 149 },
589 { "unknown-150", "X", &server_universe
, 150 },
590 { "unknown-151", "X", &server_universe
, 151 },
591 { "unknown-152", "X", &server_universe
, 152 },
592 { "unknown-153", "X", &server_universe
, 153 },
593 { "unknown-154", "X", &server_universe
, 154 },
594 { "unknown-155", "X", &server_universe
, 155 },
595 { "unknown-156", "X", &server_universe
, 156 },
596 { "unknown-157", "X", &server_universe
, 157 },
597 { "unknown-158", "X", &server_universe
, 158 },
598 { "unknown-159", "X", &server_universe
, 159 },
599 { "unknown-160", "X", &server_universe
, 160 },
600 { "unknown-161", "X", &server_universe
, 161 },
601 { "unknown-162", "X", &server_universe
, 162 },
602 { "unknown-163", "X", &server_universe
, 163 },
603 { "unknown-164", "X", &server_universe
, 164 },
604 { "unknown-165", "X", &server_universe
, 165 },
605 { "unknown-166", "X", &server_universe
, 166 },
606 { "unknown-167", "X", &server_universe
, 167 },
607 { "unknown-168", "X", &server_universe
, 168 },
608 { "unknown-169", "X", &server_universe
, 169 },
609 { "unknown-170", "X", &server_universe
, 170 },
610 { "unknown-171", "X", &server_universe
, 171 },
611 { "unknown-172", "X", &server_universe
, 172 },
612 { "unknown-173", "X", &server_universe
, 173 },
613 { "unknown-174", "X", &server_universe
, 174 },
614 { "unknown-175", "X", &server_universe
, 175 },
615 { "unknown-176", "X", &server_universe
, 176 },
616 { "unknown-177", "X", &server_universe
, 177 },
617 { "unknown-178", "X", &server_universe
, 178 },
618 { "unknown-179", "X", &server_universe
, 179 },
619 { "unknown-180", "X", &server_universe
, 180 },
620 { "unknown-181", "X", &server_universe
, 181 },
621 { "unknown-182", "X", &server_universe
, 182 },
622 { "unknown-183", "X", &server_universe
, 183 },
623 { "unknown-184", "X", &server_universe
, 184 },
624 { "unknown-185", "X", &server_universe
, 185 },
625 { "unknown-186", "X", &server_universe
, 186 },
626 { "unknown-187", "X", &server_universe
, 187 },
627 { "unknown-188", "X", &server_universe
, 188 },
628 { "unknown-189", "X", &server_universe
, 189 },
629 { "unknown-190", "X", &server_universe
, 190 },
630 { "unknown-191", "X", &server_universe
, 191 },
631 { "unknown-192", "X", &server_universe
, 192 },
632 { "unknown-193", "X", &server_universe
, 193 },
633 { "unknown-194", "X", &server_universe
, 194 },
634 { "unknown-195", "X", &server_universe
, 195 },
635 { "unknown-196", "X", &server_universe
, 196 },
636 { "unknown-197", "X", &server_universe
, 197 },
637 { "unknown-198", "X", &server_universe
, 198 },
638 { "unknown-199", "X", &server_universe
, 199 },
639 { "unknown-200", "X", &server_universe
, 200 },
640 { "unknown-201", "X", &server_universe
, 201 },
641 { "unknown-202", "X", &server_universe
, 202 },
642 { "unknown-203", "X", &server_universe
, 203 },
643 { "unknown-204", "X", &server_universe
, 204 },
644 { "unknown-205", "X", &server_universe
, 205 },
645 { "unknown-206", "X", &server_universe
, 206 },
646 { "unknown-207", "X", &server_universe
, 207 },
647 { "unknown-208", "X", &server_universe
, 208 },
648 { "unknown-209", "X", &server_universe
, 209 },
649 { "unknown-210", "X", &server_universe
, 210 },
650 { "unknown-211", "X", &server_universe
, 211 },
651 { "unknown-212", "X", &server_universe
, 212 },
652 { "unknown-213", "X", &server_universe
, 213 },
653 { "unknown-214", "X", &server_universe
, 214 },
654 { "unknown-215", "X", &server_universe
, 215 },
655 { "unknown-216", "X", &server_universe
, 216 },
656 { "unknown-217", "X", &server_universe
, 217 },
657 { "unknown-218", "X", &server_universe
, 218 },
658 { "unknown-219", "X", &server_universe
, 219 },
659 { "unknown-220", "X", &server_universe
, 220 },
660 { "unknown-221", "X", &server_universe
, 221 },
661 { "unknown-222", "X", &server_universe
, 222 },
662 { "unknown-223", "X", &server_universe
, 223 },
663 { "unknown-224", "X", &server_universe
, 224 },
664 { "unknown-225", "X", &server_universe
, 225 },
665 { "unknown-226", "X", &server_universe
, 226 },
666 { "unknown-227", "X", &server_universe
, 227 },
667 { "unknown-228", "X", &server_universe
, 228 },
668 { "unknown-229", "X", &server_universe
, 229 },
669 { "unknown-230", "X", &server_universe
, 230 },
670 { "unknown-231", "X", &server_universe
, 231 },
671 { "unknown-232", "X", &server_universe
, 232 },
672 { "unknown-233", "X", &server_universe
, 233 },
673 { "unknown-234", "X", &server_universe
, 234 },
674 { "unknown-235", "X", &server_universe
, 235 },
675 { "unknown-236", "X", &server_universe
, 236 },
676 { "unknown-237", "X", &server_universe
, 237 },
677 { "unknown-238", "X", &server_universe
, 238 },
678 { "unknown-239", "X", &server_universe
, 239 },
679 { "unknown-240", "X", &server_universe
, 240 },
680 { "unknown-241", "X", &server_universe
, 241 },
681 { "unknown-242", "X", &server_universe
, 242 },
682 { "unknown-243", "X", &server_universe
, 243 },
683 { "unknown-244", "X", &server_universe
, 244 },
684 { "unknown-245", "X", &server_universe
, 245 },
685 { "unknown-246", "X", &server_universe
, 246 },
686 { "unknown-247", "X", &server_universe
, 247 },
687 { "unknown-248", "X", &server_universe
, 248 },
688 { "unknown-249", "X", &server_universe
, 249 },
689 { "unknown-250", "X", &server_universe
, 250 },
690 { "unknown-251", "X", &server_universe
, 251 },
691 { "unknown-252", "X", &server_universe
, 252 },
692 { "unknown-253", "X", &server_universe
, 253 },
693 { "unknown-254", "X", &server_universe
, 254 },
694 { "option-end", "e", &server_universe
, 255 },
697 struct enumeration_value ddns_styles_values
[] = {
704 struct enumeration ddns_styles
= {
705 (struct enumeration
*)0,
710 struct enumeration_value syslog_values
[] = {
711 #if defined (LOG_KERN)
712 { "kern", LOG_KERN
},
714 #if defined (LOG_USER)
715 { "user", LOG_USER
},
717 #if defined (LOG_MAIL)
718 { "mail", LOG_MAIL
},
720 #if defined (LOG_DAEMON)
721 { "daemon", LOG_DAEMON
},
723 #if defined (LOG_AUTH)
724 { "auth", LOG_AUTH
},
726 #if defined (LOG_SYSLOG)
727 { "syslog", LOG_SYSLOG
},
729 #if defined (LOG_LPR)
732 #if defined (LOG_NEWS)
733 { "news", LOG_NEWS
},
735 #if defined (LOG_UUCP)
736 { "uucp", LOG_UUCP
},
738 #if defined (LOG_CRON)
739 { "cron", LOG_CRON
},
741 #if defined (LOG_AUTHPRIV)
742 { "authpriv", LOG_AUTHPRIV
},
744 #if defined (LOG_FTP)
747 #if defined (LOG_LOCAL0)
748 { "local0", LOG_LOCAL0
},
750 #if defined (LOG_LOCAL1)
751 { "local1", LOG_LOCAL1
},
753 #if defined (LOG_LOCAL2)
754 { "local2", LOG_LOCAL2
},
756 #if defined (LOG_LOCAL3)
757 { "local3", LOG_LOCAL3
},
759 #if defined (LOG_LOCAL4)
760 { "local4", LOG_LOCAL4
},
762 #if defined (LOG_LOCAL5)
763 { "local5", LOG_LOCAL5
},
765 #if defined (LOG_LOCAL6)
766 { "local6", LOG_LOCAL6
},
768 #if defined (LOG_LOCAL7)
769 { "local7", LOG_LOCAL7
},
774 struct enumeration syslog_enum
= {
775 (struct enumeration
*)0,
780 void initialize_server_option_spaces()
784 /* Set up the Relay Agent Information Option suboption space... */
785 agent_universe
.name
= "agent";
786 agent_universe
.option_state_dereference
=
787 linked_option_state_dereference
;
788 agent_universe
.lookup_func
= lookup_linked_option
;
789 agent_universe
.save_func
= save_linked_option
;
790 agent_universe
.delete_func
= delete_linked_option
;
791 agent_universe
.encapsulate
= linked_option_space_encapsulate
;
792 agent_universe
.foreach
= linked_option_space_foreach
;
793 agent_universe
.decode
= parse_option_buffer
;
794 agent_universe
.index
= universe_count
++;
795 agent_universe
.length_size
= 1;
796 agent_universe
.tag_size
= 1;
797 agent_universe
.store_tag
= putUChar
;
798 agent_universe
.store_length
= putUChar
;
799 universes
[agent_universe
.index
] = &agent_universe
;
800 option_new_hash (&agent_universe
.hash
, 1, MDL
);
801 if (!agent_universe
.hash
)
802 log_fatal ("Can't allocate agent option hash table.");
803 for (i
= 0; i
< 256; i
++) {
804 agent_universe
.options
[i
] = &agent_options
[i
];
805 option_hash_add (agent_universe
.hash
,
806 agent_options
[i
].name
, 0,
807 &agent_options
[i
], MDL
);
809 agent_universe
.enc_opt
= &dhcp_options
[DHO_DHCP_AGENT_OPTIONS
];
812 /* Set up the server option universe... */
813 server_universe
.name
= "server";
814 server_universe
.lookup_func
= lookup_hashed_option
;
815 server_universe
.option_state_dereference
=
816 hashed_option_state_dereference
;
817 server_universe
.save_func
= save_hashed_option
;
818 server_universe
.delete_func
= delete_hashed_option
;
819 server_universe
.encapsulate
= hashed_option_space_encapsulate
;
820 server_universe
.foreach
= hashed_option_space_foreach
;
821 server_universe
.length_size
= 1;
822 server_universe
.tag_size
= 1;
823 server_universe
.store_tag
= putUChar
;
824 server_universe
.store_length
= putUChar
;
825 server_universe
.index
= universe_count
++;
826 universes
[server_universe
.index
] = &server_universe
;
827 option_new_hash (&server_universe
.hash
, 1, MDL
);
828 if (!server_universe
.hash
)
829 log_fatal ("Can't allocate server option hash table.");
830 for (i
= 0; i
< 256; i
++) {
831 server_universe
.options
[i
] = &server_options
[i
];
832 option_hash_add (server_universe
.hash
,
833 server_options
[i
].name
, 0,
834 &server_options
[i
], MDL
);
837 /* Add the server and agent option spaces to the option space hash. */
838 universe_hash_add (universe_hash
,
839 agent_universe
.name
, 0, &agent_universe
, MDL
);
840 universe_hash_add (universe_hash
,
841 server_universe
.name
, 0, &server_universe
, MDL
);
843 /* Make the server universe the configuration option universe. */
844 config_universe
= &server_universe
;
845 vendor_cfg_option
= &server_options
[SV_VENDOR_OPTION_SPACE
];