Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/dhcp If SMALL is defined, don't support the OMAPI p...
details: https://anonhg.NetBSD.org/src/rev/e503b2bd7320
branches: trunk
changeset: 508151:e503b2bd7320
user: mellon <mellon%NetBSD.org@localhost>
date: Fri Apr 06 19:01:06 2001 +0000
description:
If SMALL is defined, don't support the OMAPI protocol.
diffstat:
usr.sbin/dhcp/client/clparse.c | 6 +++++-
usr.sbin/dhcp/client/dhclient.c | 6 +++++-
usr.sbin/dhcp/common/comapi.c | 6 +++++-
usr.sbin/dhcp/common/discover.c | 6 +++++-
usr.sbin/dhcp/common/dns.c | 4 +++-
usr.sbin/dhcp/common/parse.c | 8 +++++++-
usr.sbin/dhcp/omapip/support.c | 6 ++++++
7 files changed, 36 insertions(+), 6 deletions(-)
diffs (300 lines):
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/client/clparse.c
--- a/usr.sbin/dhcp/client/clparse.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/client/clparse.c Fri Apr 06 19:01:06 2001 +0000
@@ -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 @@
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 @@
}
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 @@
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 @@
parse_warn (cfile, "unknown key %s", val);
parse_semi (cfile);
break;
+#endif
case TOKEN_BOOTP:
lease -> is_bootp = 1;
break;
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/client/dhclient.c
--- a/usr.sbin/dhcp/client/dhclient.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/client/dhclient.c Fri Apr 06 19:01:06 2001 +0000
@@ -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 @@
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 @@
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 @@
log_fatal ("Can't start OMAPI protocol: %s",
isc_result_totext (result));
}
+#endif
/* Set up the bootp packet handler... */
bootp_packet_handler = do_packet;
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/common/comapi.c
--- a/usr.sbin/dhcp/common/comapi.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/common/comapi.c Fri Apr 06 19:01:06 2001 +0000
@@ -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 @@
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 @@
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 @@
if (status != ISC_R_SUCCESS)
return status;
}
+#endif
/* Write out the inner object, if any. */
if (h -> inner && h -> inner -> type -> stuff_values) {
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/common/discover.c
--- a/usr.sbin/dhcp/common/discover.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/common/discover.c Fri Apr 06 19:01:06 2001 +0000
@@ -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 @@
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 @@
return status;
}
+#endif
#if defined (TRACING)
void interface_trace_setup ()
@@ -776,6 +778,7 @@
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 @@
interface_dereference (&hp, MDL);
return status;
}
+#endif
isc_result_t dhcp_interface_remove (omapi_object_t *lp,
omapi_object_t *id)
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/common/dns.c
--- a/usr.sbin/dhcp/common/dns.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/common/dns.c Fri Apr 06 19:01:06 2001 +0000
@@ -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 @@
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)
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/common/parse.c
--- a/usr.sbin/dhcp/common/parse.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/common/parse.c Fri Apr 06 19:01:06 2001 +0000
@@ -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 @@
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 @@
return 0;
}
return 1;
+#endif
default:
if (config_universe && is_identifier (token)) {
@@ -2111,6 +2113,7 @@
}
break;
+#if !defined (SMALL)
case KEY:
token = next_token (&val, (unsigned *)0, cfile);
token = peek_token (&val, (unsigned *)0, cfile);
@@ -2134,6 +2137,7 @@
if (!parse_semi (cfile))
return 0;
break;
+#endif
default:
done = 1;
@@ -2157,6 +2161,7 @@
secret-definition :== SECRET base64val |
SECRET STRING */
+#if !defined (SMALL)
int parse_key (struct parse *cfile)
{
int token;
@@ -2283,6 +2288,7 @@
omapi_auth_key_dereference (&key, MDL);
return 0;
}
+#endif
/*
* on-statement :== event-types LBRACE executable-statements RBRACE
diff -r d1ebddd447cf -r e503b2bd7320 usr.sbin/dhcp/omapip/support.c
--- a/usr.sbin/dhcp/omapip/support.c Fri Apr 06 18:53:33 2001 +0000
+++ b/usr.sbin/dhcp/omapip/support.c Fri Apr 06 19:01:06 2001 +0000
@@ -63,6 +63,7 @@
{
isc_result_t status;
+#if !defined (SMALL)
dst_init();
/* Register all the standard object types... */
@@ -91,6 +92,7 @@
0);
if (status != ISC_R_SUCCESS)
return status;
+#endif
status = omapi_object_type_register (&omapi_type_io_object,
"io",
@@ -104,6 +106,7 @@
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 @@
0);
if (status != ISC_R_SUCCESS)
return status;
+#endif
status = omapi_object_type_register (&omapi_type_waiter,
"waiter",
@@ -167,6 +171,7 @@
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 @@
sizeof (omapi_auth_key_t), 0);
if (status != ISC_R_SUCCESS)
return status;
+#endif
#if defined (TRACING)
omapi_listener_trace_setup ();
Home |
Main Index |
Thread Index |
Old Index