From: Ted Lemon Date: Tue, 10 Oct 2000 23:09:17 +0000 (+0000) Subject: Fix up universe initializations, and define vendor_cfg_option global. X-Git-Tag: V3-BETA-2-PATCH-7~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e929278f0b5b111b0eb9e4c06a8eddfee2b3b150;p=thirdparty%2Fdhcp.git Fix up universe initializations, and define vendor_cfg_option global. --- diff --git a/server/stables.c b/server/stables.c index 02de2a725..8b0031372 100644 --- a/server/stables.c +++ b/server/stables.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: stables.c,v 1.17 2000/08/31 04:40:24 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: stables.c,v 1.18 2000/10/10 23:09:17 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -710,8 +710,13 @@ void initialize_server_option_spaces() /* Set up the Relay Agent Information Option suboption space... */ agent_universe.name = "agent"; agent_universe.option_state_dereference = - agent_option_state_dereference; - agent_universe.get_func = agent_option_get; + linked_option_state_dereference; + agent_universe.lookup_func = lookup_linked_option; + agent_universe.save_func = save_linked_option; + agent_universe.delete_func = delete_linked_option; + agent_universe.encapsulate = linked_option_space_encapsulate; + agent_universe.foreach = linked_option_space_foreach; + agent_universe.decode = parse_option_buffer; agent_universe.index = universe_count++; agent_universe.length_size = 1; agent_universe.tag_size = 1; @@ -727,17 +732,18 @@ void initialize_server_option_spaces() agent_options [i].name, 0, &agent_options [i], MDL); } + agent_universe.enc_opt = &dhcp_options [DHO_DHCP_AGENT_OPTIONS]; + /* Set up the server option universe... */ server_universe.name = "server"; server_universe.lookup_func = lookup_hashed_option; server_universe.option_state_dereference = hashed_option_state_dereference; - server_universe.get_func = hashed_option_get; - server_universe.set_func = hashed_option_set; server_universe.save_func = save_hashed_option; server_universe.delete_func = delete_hashed_option; server_universe.encapsulate = hashed_option_space_encapsulate; + server_universe.foreach = hashed_option_space_foreach; server_universe.length_size = 1; server_universe.tag_size = 1; server_universe.store_tag = putUChar; @@ -762,4 +768,5 @@ void initialize_server_option_spaces() /* Make the server universe the configuration option universe. */ config_universe = &server_universe; + vendor_cfg_option = &server_options [SV_VENDOR_OPTION_SPACE]; }