If SMALL is defined, don't support the OMAPI protocol.
This commit is contained in:
parent
871abbab37
commit
64ce71d1cd
@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: clparse.c,v 1.11 2001/04/06 17:08:52 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: clparse.c,v 1.12 2001/04/06 19:01:06 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -248,6 +248,7 @@ void parse_client_statement (cfile, ip, config)
|
||||
int tmp, i;
|
||||
|
||||
switch (peek_token (&val, (unsigned *)0, cfile)) {
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
next_token (&val, (unsigned *)0, cfile);
|
||||
if (ip) {
|
||||
@ -269,6 +270,7 @@ void parse_client_statement (cfile, ip, config)
|
||||
}
|
||||
parse_key (cfile);
|
||||
return;
|
||||
#endif
|
||||
|
||||
/* REQUIRE can either start a policy statement or a
|
||||
comma-seperated list of names of required options. */
|
||||
@ -921,6 +923,7 @@ void parse_client_lease_declaration (cfile, lease, ipp, clientp)
|
||||
struct data_string key_id;
|
||||
|
||||
switch (next_token (&val, (unsigned *)0, cfile)) {
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != STRING && !is_identifier (token)) {
|
||||
@ -933,6 +936,7 @@ void parse_client_lease_declaration (cfile, lease, ipp, clientp)
|
||||
parse_warn (cfile, "unknown key %s", val);
|
||||
parse_semi (cfile);
|
||||
break;
|
||||
#endif
|
||||
case TOKEN_BOOTP:
|
||||
lease -> is_bootp = 1;
|
||||
break;
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char ocopyright[] =
|
||||
"$Id: dhclient.c,v 1.36 2001/04/06 17:08:52 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dhclient.c,v 1.37 2001/04/06 19:01:06 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -139,9 +139,11 @@ int main (argc, argv, envp)
|
||||
log_fatal ("Can't initialize OMAPI: %s",
|
||||
isc_result_totext (status));
|
||||
|
||||
#if !defined (SMALL)
|
||||
/* Set up the OMAPI wrappers for various server database internal
|
||||
objects. */
|
||||
dhcp_common_objects_setup ();
|
||||
#endif
|
||||
|
||||
dhcp_interface_discovery_hook = dhclient_interface_discovery_hook;
|
||||
dhcp_interface_shutdown_hook = dhclient_interface_shutdown_hook;
|
||||
@ -426,6 +428,7 @@ int main (argc, argv, envp)
|
||||
if (release_mode)
|
||||
return 0;
|
||||
|
||||
#if !defined (SMALL)
|
||||
/* Start up a listener for the object management API protocol. */
|
||||
if (top_level_config.omapi_port != -1) {
|
||||
listener = (omapi_object_t *)0;
|
||||
@ -441,6 +444,7 @@ int main (argc, argv, envp)
|
||||
log_fatal ("Can't start OMAPI protocol: %s",
|
||||
isc_result_totext (result));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set up the bootp packet handler... */
|
||||
bootp_packet_handler = do_packet;
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: comapi.c,v 1.5 2001/04/02 23:45:54 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: comapi.c,v 1.6 2001/04/06 19:01:07 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -111,7 +111,9 @@ void dhcp_common_objects_setup ()
|
||||
log_fatal ("Can't register shared network object type: %s",
|
||||
isc_result_totext (status));
|
||||
|
||||
#if !defined (SMALL)
|
||||
interface_setup ();
|
||||
#endif
|
||||
}
|
||||
|
||||
isc_result_t dhcp_group_set_value (omapi_object_t *h,
|
||||
@ -301,6 +303,7 @@ isc_result_t dhcp_group_stuff_values (omapi_object_t *c,
|
||||
return ISC_R_INVALIDARG;
|
||||
group = (struct group_object *)h;
|
||||
|
||||
#if !defined (SMALL)
|
||||
/* Write out all the values. */
|
||||
if (group -> name) {
|
||||
status = omapi_connection_put_name (c, "name");
|
||||
@ -310,6 +313,7 @@ isc_result_t dhcp_group_stuff_values (omapi_object_t *c,
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Write out the inner object, if any. */
|
||||
if (h -> inner && h -> inner -> type -> stuff_values) {
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: discover.c,v 1.12 2001/04/06 17:08:53 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: discover.c,v 1.13 2001/04/06 19:01:07 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -79,6 +79,7 @@ int interface_max;
|
||||
|
||||
OMAPI_OBJECT_ALLOC (interface, struct interface_info, dhcp_type_interface)
|
||||
|
||||
#if !defined (SMALL)
|
||||
isc_result_t interface_setup ()
|
||||
{
|
||||
isc_result_t status;
|
||||
@ -101,6 +102,7 @@ isc_result_t interface_setup ()
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (TRACING)
|
||||
void interface_trace_setup ()
|
||||
@ -776,6 +778,7 @@ isc_result_t got_one (h)
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
#if !defined (SMALL)
|
||||
isc_result_t dhcp_interface_set_value (omapi_object_t *h,
|
||||
omapi_object_t *id,
|
||||
omapi_data_string_t *name,
|
||||
@ -1005,6 +1008,7 @@ isc_result_t dhcp_interface_create (omapi_object_t **lp,
|
||||
interface_dereference (&hp, MDL);
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
isc_result_t dhcp_interface_remove (omapi_object_t *lp,
|
||||
omapi_object_t *id)
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dns.c,v 1.4 2001/04/02 23:45:55 mellon Exp $ Copyright (c) 2000 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dns.c,v 1.5 2001/04/06 19:01:07 mellon Exp $ Copyright (c) 2000 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -281,8 +281,10 @@ int dns_zone_dereference (ptr, file, line)
|
||||
|
||||
if (dns_zone -> name)
|
||||
dfree (dns_zone -> name, file, line);
|
||||
#if !defined (SMALL)
|
||||
if (dns_zone -> key)
|
||||
omapi_auth_key_dereference (&dns_zone -> key, file, line);
|
||||
#endif
|
||||
if (dns_zone -> primary)
|
||||
option_cache_dereference (&dns_zone -> primary, file, line);
|
||||
if (dns_zone -> secondary)
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: parse.c,v 1.4 2001/04/02 23:45:56 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: parse.c,v 1.5 2001/04/06 19:01:07 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -1972,6 +1972,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
|
||||
return 1;
|
||||
|
||||
/* Also not really a statement, but same idea as above. */
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (!parse_key (cfile)) {
|
||||
@ -1979,6 +1980,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
default:
|
||||
if (config_universe && is_identifier (token)) {
|
||||
@ -2111,6 +2113,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
|
||||
}
|
||||
break;
|
||||
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
@ -2134,6 +2137,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
|
||||
if (!parse_semi (cfile))
|
||||
return 0;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
done = 1;
|
||||
@ -2157,6 +2161,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
|
||||
secret-definition :== SECRET base64val |
|
||||
SECRET STRING */
|
||||
|
||||
#if !defined (SMALL)
|
||||
int parse_key (struct parse *cfile)
|
||||
{
|
||||
int token;
|
||||
@ -2283,6 +2288,7 @@ int parse_key (struct parse *cfile)
|
||||
omapi_auth_key_dereference (&key, MDL);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* on-statement :== event-types LBRACE executable-statements RBRACE
|
||||
|
@ -63,6 +63,7 @@ isc_result_t omapi_init (void)
|
||||
{
|
||||
isc_result_t status;
|
||||
|
||||
#if !defined (SMALL)
|
||||
dst_init();
|
||||
|
||||
/* Register all the standard object types... */
|
||||
@ -91,6 +92,7 @@ isc_result_t omapi_init (void)
|
||||
0);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
#endif
|
||||
|
||||
status = omapi_object_type_register (&omapi_type_io_object,
|
||||
"io",
|
||||
@ -104,6 +106,7 @@ isc_result_t omapi_init (void)
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
|
||||
#if !defined (SMALL)
|
||||
status = omapi_object_type_register (&omapi_type_generic,
|
||||
"generic",
|
||||
omapi_generic_set_value,
|
||||
@ -154,6 +157,7 @@ isc_result_t omapi_init (void)
|
||||
0);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
#endif
|
||||
|
||||
status = omapi_object_type_register (&omapi_type_waiter,
|
||||
"waiter",
|
||||
@ -167,6 +171,7 @@ isc_result_t omapi_init (void)
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
|
||||
#if !defined (SMALL)
|
||||
status = omapi_object_type_register (&omapi_type_auth_key,
|
||||
"authenticator",
|
||||
0,
|
||||
@ -179,6 +184,7 @@ isc_result_t omapi_init (void)
|
||||
sizeof (omapi_auth_key_t), 0);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
#endif
|
||||
|
||||
#if defined (TRACING)
|
||||
omapi_listener_trace_setup ();
|
||||
|
Loading…
Reference in New Issue
Block a user