#FFMANDIR = /usr/share/man/cat4
#FFMANEXT = .4
#LIBMANDIR = /usr/share/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#VARRUN = /etc
#VARDB = /etc
#SCRIPT=solaris
#FFMANDIR = /usr/share/man/cat4
#FFMANEXT = .4
#LIBMANDIR = /usr/share/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#VARRUN = /etc
#VARDB = /etc
#SCRIPT=solaris
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
##--ultrix--
## Linux 1.x
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/dhcpd
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /etc
#COPTS=-w3 -Dlint $(BINDDEF)
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#VARRUN = /etc
#MANINSTALL = /bin/true
#INSTALL = cp
#FFMANDIR = /usr/local/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/local/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#INSTALL = install
#MANINSTALL = install
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.28 1999/09/08 01:43:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.29 1999/09/09 23:53:13 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
#ifndef lint
static char copyright[] =
-"$Id: dlpi.c,v 1.13 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dlpi.c,v 1.14 1999/09/09 23:53:13 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
#ifndef lint
static char copyright[] =
-"$Id: execute.c,v 1.16 1999/07/31 17:56:09 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: execute.c,v 1.17 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
switch (r -> op) {
case statements_statement:
#if defined (DEBUG_EXPRESSIONS)
- log_info ("exec: statements");
+ log_debug ("exec: statements");
#endif
status = execute_statements (packet, lease,
in_options, out_options,
r -> data.statements);
#if defined (DEBUG_EXPRESSIONS)
- log_info ("exec: statements returns %d", status);
+ log_debug ("exec: statements returns %d", status);
#endif
if (!status)
return 0;
#ifndef lint
static char copyright[] =
-"$Id: lpf.c,v 1.15 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.16 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.23 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.24 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.38 1999/09/08 01:43:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.39 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* This just reads in a packet and silently discards it. */
isc_result_t fallback_discard (object)
- omapi_object_t object;
+ omapi_object_t *object;
{
char buf [1540];
struct sockaddr_in from;
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.46 1999/08/01 14:26:48 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.47 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* we only want to do this on a DHCPREQUEST */
if (!packet || packet -> packet_type != DHCPREQUEST)
return 0;
- /* no update for static leases */
- if (lease && (lease -> flags & STATIC_LEASE))
- return 0;
memset (&rrtype, 0, sizeof expr1);
s0 = evaluate_data_expression (&rrtype, packet, lease,
in_options, cfg_options,
if (s0 && s1 && s2 && s3) {
if (rrtype.len == 1 &&
strncmp(rrtype.data, "a", 1) == 0) {
-log_info("calling updateA(%s, %s, %d, lease)", expr1.data , expr2.data, ttl);
+#if defined (DEBUG_EXPRESSIONS)
+ log_debug("calling updateA(%s, %s, %d, lease)",
+ expr1.data , expr2.data, ttl);
+#endif
updateA(expr1, expr2, ttl, lease);
} else if (rrtype.len == 3 &&
strncmp(rrtype.data, "ptr", 3) == 0) {
-log_info("calling updatePTR(%s, %s, %d, lease)", expr1.data , expr2.data, ttl);
+#if defined (DEBUG_EXPRESSIONS)
+ log_debug ("%s updatePTR(%s, %s, %d, lease)",
+ "calling", expr1.data,
+ expr2.data, ttl);
+#endif
updatePTR(expr1, expr2, ttl, lease);
}
*result = 1;
return 0;
}
#if defined (DEBUG_EXPRESSIONS)
- log_info ("dns-update(%s, %s, %s):",
+ log_debug ("dns-update (%s, %s, %s):",
print_hex_1(rrtype.len, rrtype.data, 60),
print_hex_2(expr1.len, expr1.data, 60),
print_hex_3(expr2.len, expr2.data, 60));
#ifndef lint
static char copyright[] =
-"$Id: upf.c,v 1.12 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.13 1999/09/09 23:53:15 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
all: libdhcpctl.a test $(CATMANPAGES)
test: test.o libdhcpctl.a ../omapip/libomapi.a
- $(CC) $(DEBUG) -o test test.o libdhcpctl.a ../omapip/libomapi.a
+ $(CC) $(DEBUG) -o test test.o libdhcpctl.a ../omapip/libomapi.a $(LIBS)
libdhcpctl.a: $(OBJ)
rm -f libdhcpctl.a
#include <isc/boolean.h>
#include <isc/list.h>
+/* This is a bit of an ugly: if you are using NSUPDATE, you are also
+ * including (by means of -I...) the include files that are installed
+ * by BIND. The problem is that the BIND includes also have an
+ * isc/list.h, which gets included above rather than the isc/list.h
+ * that is packaged with the DHCP server. That include does not
+ * prepend the macros with "ISC_", the one ith the DHCP's isc/list.h
+ * does. Sigh.
+ *
+ * Fixed in BIND 9. Double sigh. This is a temporary fix - we'll
+ * come up with something more correct later.
+ */
+#ifdef NSUPDATE
+#define ISC_LIST LIST
+#endif
+
/***
*** Core Types.
***/
all: libomapi.a test $(CATMANPAGES)
test: test.o libomapi.a
- $(CC) $(DEBUG) -o test test.o libomapi.a
+ $(CC) $(DEBUG) -o test test.o libomapi.a $(LIBS)
libomapi.a: $(OBJ)
rm -f libomapi.a
/* Copy some bytes from the input buffer, and advance the input buffer
pointer beyond the bytes copied out. */
-u_int32_t omapi_connection_copyout (unsigned char *buf,
- omapi_object_t *h,
- int size)
+isc_result_t omapi_connection_copyout (unsigned char *buf,
+ omapi_object_t *h,
+ int size)
{
int bytes_remaining;
int bytes_this_copy;
return ISC_R_SUCCESS;
}
-u_int32_t omapi_connection_writer (omapi_object_t *h)
+isc_result_t omapi_connection_writer (omapi_object_t *h)
{
int bytes_this_write;
int bytes_written;
} else
he = (struct hostent *)0;
+#if defined (HAVE_SA_LEN)
obj -> remote_addr.sin_len =
sizeof (struct sockaddr_in);
+#endif
obj -> remote_addr.sin_family = AF_INET;
memset (&(obj -> remote_addr.sin_zero), 0,
sizeof obj -> remote_addr.sin_zero);
omapi_message_object_t *message, *m;
omapi_object_t *object = (omapi_object_t *)0;
omapi_value_t *tv = (omapi_value_t *)0;
- int create, update, exclusive;
+ u_int32_t create, update, exclusive;
isc_result_t status, waitstatus;
omapi_object_type_t *type;
(omapi_object_t *)0,
"result", &tv);
if (status == ISC_R_SUCCESS) {
- status = omapi_get_int_value (&waitstatus,
+ status = omapi_get_int_value ((u_int32_t *)&waitstatus,
tv -> value);
omapi_value_dereference (&tv,
"omapi_message_process");
case omapi_protocol_intro_wait:
/* Get protocol version and header size in network
byte order. */
- omapi_connection_get_uint32 (c, &p -> protocol_version);
- omapi_connection_get_uint32 (c, &p -> header_size);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> protocol_version);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> header_size);
/* We currently only support the current protocol version. */
if (p -> protocol_version != OMAPI_PROTOCOL_VERSION) {
}
/* Swap in the header... */
- omapi_connection_get_uint32 (c, &p -> message -> authid);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> authid);
/* XXX bind the authenticator here! */
- omapi_connection_get_uint32 (c, &p -> message -> authlen);
- omapi_connection_get_uint32 (c, &p -> message -> op);
- omapi_connection_get_uint32 (c, &p -> message -> handle);
- omapi_connection_get_uint32 (c, &p -> message -> id);
- omapi_connection_get_uint32 (c, &p -> message -> rid);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> authlen);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> op);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> handle);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> id);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> rid);
/* If there was any extra header data, skip over it. */
if (p -> header_size > sizeof (omapi_protocol_header_t)) {
#ifndef lint
static char copyright[] =
-"$Id: omapi.c,v 1.3 1999/09/09 23:33:43 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: omapi.c,v 1.4 1999/09/09 23:53:29 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (!strcmp (name, "updated")) {
if (!host -> name) {
char hnbuf [64];
- sprintf (hnbuf, "nh%08lx%08x",
- cur_time, (u_int32_t)host);
+ sprintf (hnbuf, "nh%08lx%08lx",
+ cur_time, (unsigned long)host);
host -> name = malloc (strlen (hnbuf) + 1);
if (!host -> name)
return ISC_R_NOMEMORY;