#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.36 1999/10/07 06:35:35 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.37 1999/10/12 16:00:17 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
break;
}
if (i == 256) {
- parse_warn (cfile, "%s: expected option name.");
+ parse_warn (cfile, "%s: expected option name.", val);
skip_to_semi (cfile);
return;
}
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.84 1999/10/07 06:35:36 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.85 1999/10/12 16:00:18 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
add_timeout (client -> active -> renewal,
state_bound, client);
- log_info ("bound to %s -- renewal in %d seconds.",
+ log_info ("bound to %s -- renewal in %ld seconds.",
piaddr (client -> active -> address),
- client -> active -> renewal - cur_time);
+ (long)(client -> active -> renewal - cur_time));
client -> state = S_BOUND;
reinitialize_interfaces ();
go_daemon ();
if (cur_time <
client -> active -> renewal) {
client -> state = S_BOUND;
- log_info ("bound: renewal in %d seconds.",
- client -> active -> renewal
- - cur_time);
+ log_info ("bound: renewal in %s %ld.",
+ "seconds",
+ (long)
+ (client -> active -> renewal
+ - cur_time));
add_timeout ((client ->
active -> renewal),
state_bound, client);
int i;
if (strlen (option -> name) + 1 > sizeof evbuf)
- log_fatal ("option %s name is larger than static buffer.");
+ log_fatal ("option %s name is larger than static buffer.",
+ option -> name);
for (i = 0; option -> name [i]; i++) {
if (option -> name [i] == '-')
evbuf [i] = '_';
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.30 1999/10/07 06:47:49 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.31 1999/10/12 16:00:26 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
log_fatal ("Can't get bpf buffer length: %m");
info -> rbuf = malloc (info -> rbuf_max);
if (!info -> rbuf)
- log_fatal ("Can't allocate %d bytes for bpf input buffer.");
+ log_fatal ("Can't allocate %d bytes for bpf input buffer.",
+ info -> rbuf_max);
info -> rbuf_offset = 0;
info -> rbuf_len = 0;
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.59 1999/10/07 06:35:45 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.60 1999/10/12 16:00:27 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
}
if (!option_cache_allocate (oc, name)) {
- log_error ("%s: can't allocate option cache.");
+ log_error ("%s: can't allocate option cache.", name);
buffer_dereference (&bp, name);
return 0;
}
unsigned buflen, i;
if (len != 8 && len != 16 && len != 32) {
- log_info ("binary_to_ascii: %s %d!",
+ log_info ("binary_to_ascii: %s %ld!",
"invalid width", len);
goto b2a_out;
}
/* The buffer must be a multiple of the number's
width. */
if (other.len % len) {
- log_info ("binary-to-ascii: %s %d %s %d!",
+ log_info ("binary-to-ascii: %s %d %s %ld!",
"length of buffer", other.len,
"not a multiple of width", len);
status = 0;
/* The buffer must be a multiple of the number's
width. */
if (other.len % len) {
- log_info ("reverse: %s %d %s %d!",
+ log_info ("reverse: %s %d %s %ld!",
"length of buffer", other.len,
"not a multiple of width", len);
status = 0;
#if !defined (__ISC_DHCP_CDEFS_H__)
#define __ISC_DHCP_CDEFS_H__
+/* Delete attributes if not gcc or not the right version of gcc. */
+#if !defined(__GNUC__) || __GNUC__ < 2 || \
+ (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+#define __attribute__(x)
+#endif
+
#if (defined (__GNUC__) || defined (__STDC__)) && !defined (BROKEN_ANSI)
#define PROTO(x) x
#define KandR(x)
struct universe *));
/* errwarn.c */
-void log_fatal PROTO ((const char *, ...));
-int log_error PROTO ((const char *, ...));
-int log_info PROTO ((const char *, ...));
-int log_debug PROTO ((const char *, ...));
-int parse_warn PROTO ((struct parse *, const char *, ...));
+void log_fatal PROTO ((const char *, ...))
+ __attribute__((__format__(__printf__,1,2)));
+int log_error PROTO ((const char *, ...))
+ __attribute__((__format__(__printf__,1,2)));
+int log_info PROTO ((const char *, ...))
+ __attribute__((__format__(__printf__,1,2)));
+int log_debug PROTO ((const char *, ...))
+ __attribute__((__format__(__printf__,1,2)));
+int parse_warn PROTO ((struct parse *, const char *, ...))
+ __attribute__((__format__(__printf__,2,3)));
/* dhcpd.c */
extern TIME cur_time;
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.87 1999/10/07 06:36:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.88 1999/10/12 16:00:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (token == CODE) {
if (type != ROOT_GROUP) {
parse_warn (cfile,
- "option definitions%s%s",
+ "option definitions%s",
" may not be scoped.");
skip_to_semi (cfile);
free_option (option,
"expecting a declaration");
else
parse_warn (cfile,
- "expecting a parameter %s"
+ "expecting a parameter %s",
"or declaration");
skip_to_semi (cfile);
}
status = enter_host (host, dynamicp, 0);
if (status != ISC_R_SUCCESS)
- parse_warn (cfile,
- "host %s: %s", isc_result_totext (status));
+ parse_warn (cfile, "host %s: %s", host -> name,
+ isc_result_totext (status));
}
}
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.116 1999/10/08 22:21:34 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.117 1999/10/12 16:00:34 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
oc)) {
if (d1.len && packet -> raw -> secs < d1.data [0]) {
data_string_forget (&d1, "ack_lease");
- log_info ("%s: %d secs < %d",
- packet -> raw -> secs, d1.data [0]);
+ log_info ("%s: %d secs < %d", msg,
+ packet -> raw -> secs, d1.data [0]);
free_lease_state (state, "ack_lease");
static_lease_dereference (lease, "ack_lease");
return;