From 9493bb79393c113ac087e84e7a5424e13e06fb1d Mon Sep 17 00:00:00 2001 From: lukem Date: Sat, 14 Mar 1998 04:39:53 +0000 Subject: [PATCH] warnsify --- usr.sbin/bootp/bootpd/Makefile | 3 +-- usr.sbin/bootp/bootpd/bootpd.c | 7 ++++-- usr.sbin/bootp/bootpef/bootpef.c | 11 +++++---- usr.sbin/bootp/bootpgw/bootpgw.c | 6 ++++- usr.sbin/bootp/bootptest/bootptest.c | 33 ++++++++++++++++++++------ usr.sbin/bootp/bootptest/bootptest.h | 4 +++- usr.sbin/bootp/bootptest/getether.c | 23 ++++++++++++++++-- usr.sbin/bootp/bootptest/print-bootp.c | 25 ++++++++++++------- usr.sbin/bootp/bootptest/trygetea.c | 7 +++++- usr.sbin/bootp/common/dovend.c | 9 ++++++- usr.sbin/bootp/common/dumptab.c | 10 ++++++-- usr.sbin/bootp/common/getif.c | 19 ++++++++++++--- usr.sbin/bootp/common/hash.c | 3 ++- usr.sbin/bootp/common/hwaddr.c | 10 ++++++-- usr.sbin/bootp/common/lookup.c | 8 +++++-- usr.sbin/bootp/common/readfile.c | 4 ++-- usr.sbin/bootp/common/report.c | 9 +++++-- usr.sbin/bootp/common/trygetif.c | 7 +++++- usr.sbin/bootp/common/trylook.c | 7 +++++- usr.sbin/bootp/common/tzone.c | 7 +++++- usr.sbin/bootp/common/tzone.h | 14 +++++++++-- usr.sbin/bootpd/Makefile | 3 +-- usr.sbin/bootpd/bootpd.c | 7 ++++-- usr.sbin/bootpd/bootpef.c | 11 +++++---- usr.sbin/bootpd/bootpgw.c | 6 ++++- usr.sbin/bootpd/bootptest.c | 33 ++++++++++++++++++++------ usr.sbin/bootpd/bootptest.h | 4 +++- usr.sbin/bootpd/dovend.c | 9 ++++++- usr.sbin/bootpd/dumptab.c | 10 ++++++-- usr.sbin/bootpd/getether.c | 23 ++++++++++++++++-- usr.sbin/bootpd/getif.c | 19 ++++++++++++--- usr.sbin/bootpd/hash.c | 3 ++- usr.sbin/bootpd/hwaddr.c | 10 ++++++-- usr.sbin/bootpd/lookup.c | 8 +++++-- usr.sbin/bootpd/print-bootp.c | 25 ++++++++++++------- usr.sbin/bootpd/readfile.c | 4 ++-- usr.sbin/bootpd/report.c | 9 +++++-- usr.sbin/bootpd/trygetea.c | 7 +++++- usr.sbin/bootpd/trygetif.c | 7 +++++- usr.sbin/bootpd/trylook.c | 7 +++++- usr.sbin/bootpd/tzone.c | 7 +++++- usr.sbin/bootpd/tzone.h | 14 +++++++++-- 42 files changed, 352 insertions(+), 100 deletions(-) diff --git a/usr.sbin/bootp/bootpd/Makefile b/usr.sbin/bootp/bootpd/Makefile index 8b344572630b..43f09131a0da 100644 --- a/usr.sbin/bootp/bootpd/Makefile +++ b/usr.sbin/bootp/bootpd/Makefile @@ -1,7 +1,6 @@ # bootpd/Makefile -# $NetBSD: Makefile,v 1.4 1997/10/25 06:57:55 lukem Exp $ +# $NetBSD: Makefile,v 1.5 1998/03/14 04:39:53 lukem Exp $ -WARNS?= 0 PROG= bootpd CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU diff --git a/usr.sbin/bootp/bootpd/bootpd.c b/usr.sbin/bootp/bootpd/bootpd.c index 5eaca8ebf41e..dc81a1cfdcf2 100644 --- a/usr.sbin/bootp/bootpd/bootpd.c +++ b/usr.sbin/bootp/bootpd/bootpd.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: bootpd.c,v 1.7 1997/10/18 04:36:55 lukem Exp $"; +__RCSID("$NetBSD: bootpd.c,v 1.8 1998/03/14 04:39:53 lukem Exp $"); #endif /* @@ -126,6 +127,7 @@ PRIVATE void handle_reply P((void)); PRIVATE void handle_request P((void)); PRIVATE void sendreply P((int forward, int32 dest_override)); PRIVATE void usage P((void)); +int main P((int, char **)); #undef P @@ -911,7 +913,9 @@ HW addr type is IEEE 802. convert to %s and check again\n", if (debug > 2) report(LOG_INFO, "bootfile=\"%s\"", clntpath); +#ifdef CHECK_FILE_ACCESS null_file_name: +#endif /* CHECK_FILE_ACCESS */ /* @@ -1206,7 +1210,6 @@ dovend_rfc1048(bp, hp, bootsize) { int bytesleft, len; byte *vp; - char *tmpstr; static char noroom[] = "%s: No room for \"%s\" option"; diff --git a/usr.sbin/bootp/bootpef/bootpef.c b/usr.sbin/bootp/bootpef/bootpef.c index 262aa1f4d00b..61f5b40d4d27 100644 --- a/usr.sbin/bootp/bootpef/bootpef.c +++ b/usr.sbin/bootp/bootpef/bootpef.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $"; +__RCSID("$NetBSD: bootpef.c,v 1.4 1998/03/14 04:39:53 lukem Exp $"); #endif @@ -97,9 +98,9 @@ static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $" #define P(args) () #endif -static void dovend_rfc1048 P((struct bootp *, struct host *, int32)); static void mktagfile P((struct host *)); static void usage P((void)); +int main P((int, char **)); #undef P @@ -139,7 +140,7 @@ usage() * Initialization such as command-line processing is done and then the * main server loop is started. */ -void +int main(argc, argv) int argc; char **argv; @@ -275,6 +276,7 @@ main(argc, argv) mktagfile(hp); hp = (struct host *) hash_NextEntry(nmhashtable); } + exit(0); } @@ -291,7 +293,6 @@ mktagfile(hp) FILE *fp; int bytesleft, len; byte *vp; - char *tmpstr; if (!hp->flags.exten_file) return; @@ -332,7 +333,7 @@ mktagfile(hp) } fclose(fp); -} /* dovend_rfc1048 */ +} /* mktagfile */ /* * Local Variables: diff --git a/usr.sbin/bootp/bootpgw/bootpgw.c b/usr.sbin/bootp/bootpgw/bootpgw.c index f9e0e9184171..61d4ab2c80b7 100644 --- a/usr.sbin/bootp/bootpgw/bootpgw.c +++ b/usr.sbin/bootp/bootpgw/bootpgw.c @@ -25,8 +25,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $"; +__RCSID("$NetBSD: bootpgw.c,v 1.7 1998/03/14 04:39:53 lukem Exp $"); #endif /* @@ -98,6 +99,7 @@ static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $" static void usage P((void)); static void handle_reply P((void)); static void handle_request P((void)); +int main P((int, char **)); #undef P @@ -513,7 +515,9 @@ static void handle_request() { struct bootp *bp = (struct bootp *) pktbuf; +#if 0 struct ifreq *ifr; +#endif u_short secs, hops; /* XXX - SLIP init: Set bp_ciaddr = clnt_addr here? */ diff --git a/usr.sbin/bootp/bootptest/bootptest.c b/usr.sbin/bootp/bootptest/bootptest.c index 90d728181499..6d1bb525cc72 100644 --- a/usr.sbin/bootp/bootptest/bootptest.c +++ b/usr.sbin/bootp/bootptest/bootptest.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootptest.c,v 1.4 1998/01/09 08:09:03 perry Exp $ */ +/* $NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $ */ /* * bootptest.c - Test out a bootp server. @@ -34,6 +34,11 @@ * 09/93 Original developed by Gordon W. Ross */ +#include +#ifndef lint +__RCSID("$NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $"); +#endif + char *usage = "bootptest [-h] server-name [vendor-data-template-file]"; #include @@ -55,10 +60,12 @@ char *usage = "bootptest [-h] server-name [vendor-data-template-file]"; #include #include #include +#include #include "bootp.h" #include "bootptest.h" #include "getif.h" +#include "report.h" #include "patchlevel.h" #define LOG_ERR 1 @@ -108,14 +115,25 @@ unsigned char vm_cmu[4] = VM_CMU; unsigned char vm_rfc1048[4] = VM_RFC1048; short secs; /* How long client has waited */ -char *get_errmsg(); -extern void bootp_print(); + +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +extern int getether P((char *, char *)); +int main P((int, char **)); +void send_request P((int)); + +#undef P /* * Initialization such as command-line processing is done, then * the receiver loop is started. Die when interrupted. */ +int main(argc, argv) int argc; char **argv; @@ -128,7 +146,7 @@ main(argc, argv) char *vendor_file = NULL; char *bp_file = NULL; int s; /* Socket file descriptor */ - int n, tolen, fromlen, recvcnt; + int n, fromlen, recvcnt; int use_hwa = 0; int32 vend_magic; int32 xid; @@ -408,7 +426,7 @@ main(argc, argv) /* set globals needed by bootp_print() */ snaplen = n; snapend = (unsigned char *) rcvbuf + snaplen; - bootp_print(rcvbuf, n, sin_from.sin_port, 0); + bootp_print((struct bootp *)rcvbuf, n, sin_from.sin_port, 0); putchar('\n'); /* * This no longer exits immediately after receiving @@ -421,12 +439,13 @@ main(argc, argv) exit(1); } +void send_request(s) int s; { /* Print the request packet. */ printf("Sending to %s", inet_ntoa(sin_server.sin_addr)); - bootp_print(sndbuf, snaplen, sin_from.sin_port, 0); + bootp_print((struct bootp *)sndbuf, snaplen, sin_from.sin_port, 0); putchar('\n'); /* Send the request packet. */ @@ -450,7 +469,7 @@ printfn(s, ep) register u_char c; putchar('"'); - while (c = *s++) { + while ((c = *s++) != 0) { if (s > ep) { putchar('"'); return (1); diff --git a/usr.sbin/bootp/bootptest/bootptest.h b/usr.sbin/bootp/bootptest/bootptest.h index 8fdc504ed64f..61f8ceaa65c0 100644 --- a/usr.sbin/bootp/bootptest/bootptest.h +++ b/usr.sbin/bootp/bootptest/bootptest.h @@ -1,4 +1,4 @@ -/* $NetBSD: bootptest.h,v 1.2 1998/01/09 08:09:04 perry Exp $ */ +/* $NetBSD: bootptest.h,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ /* bootptest.h */ /* @@ -27,6 +27,8 @@ extern unsigned char *snapend; #define P(args) () #endif +extern void bootp_print P((struct bootp *, int, u_short, u_short)); extern char *ipaddr_string P((struct in_addr *)); +extern int printfn P((u_char *, u_char *)); #undef P diff --git a/usr.sbin/bootp/bootptest/getether.c b/usr.sbin/bootp/bootptest/getether.c index 8b6371f68376..5c1414a522a2 100644 --- a/usr.sbin/bootp/bootptest/getether.c +++ b/usr.sbin/bootp/bootptest/getether.c @@ -1,4 +1,9 @@ -/* $NetBSD: getether.c,v 1.2 1998/01/09 08:09:08 perry Exp $ */ +/* $NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * getether.c : get the ethernet address of an interface @@ -14,11 +19,23 @@ #include #include +#include #include +#include #include "report.h" #define EALEN 6 +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +extern int getether P((char *, char *)); + +#undef P + #if defined(ultrix) || (defined(__osf__) && defined(__alpha)) /* * This is really easy on Ultrix! Thanks to @@ -32,6 +49,7 @@ #include #include /* struct ifdevea */ +int getether(ifname, eap) char *ifname, *eap; { @@ -110,13 +128,14 @@ getether(ifname, eap) #include #include +int getether(ifname, eap) char *ifname; /* interface name from ifconfig structure */ char *eap; /* Ether address (output) */ { int fd, rc = -1; register int n; - struct ifreq ibuf[16], ifr; + struct ifreq ibuf[16]; struct ifconf ifc; register struct ifreq *ifrp, *ifend; diff --git a/usr.sbin/bootp/bootptest/print-bootp.c b/usr.sbin/bootp/bootptest/print-bootp.c index c1ba8795cf8c..d5c4fdd3cb3b 100644 --- a/usr.sbin/bootp/bootptest/print-bootp.c +++ b/usr.sbin/bootp/bootptest/print-bootp.c @@ -23,8 +23,10 @@ * This file was copied from tcpdump-2.1.1 and modified. * There is an e-mail list for tcpdump: */ + +#include #ifndef lint -static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Exp $"; +__RCSID("$NetBSD: print-bootp.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); /* 93/10/10 New data-driven option print routine. */ #endif @@ -41,11 +43,19 @@ static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Ex #include "bootp.h" #include "bootptest.h" +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + /* These decode the vendor data. */ -static void rfc1048_print(); -static void cmu_print(); -static void other_print(); -static void dump_hex(); +static void cmu_print P((u_char *, int)); +static void dump_hex P((u_char *, int)); +static void other_print P((u_char *, int)); +static void rfc1048_print P((u_char *, int)); + +#undef P /* * Print bootp requests @@ -271,8 +281,6 @@ rfc1048_opts[] = { }; #define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0])) -static void print_string(); - static void rfc1048_print(bp, length) register u_char *bp; @@ -280,7 +288,7 @@ rfc1048_print(bp, length) { u_char tag; u_char *ep; - register int len, j; + register int len; u_int32 ul; u_short us; struct in_addr ia; @@ -433,7 +441,6 @@ other_print(bp, length) { u_char *ep; /* end pointer */ u_char *zp; /* points one past last non-zero byte */ - register int i, j; /* Setup end pointer */ ep = bp + length; diff --git a/usr.sbin/bootp/bootptest/trygetea.c b/usr.sbin/bootp/bootptest/trygetea.c index 411f9b52f198..a0db43e96fe3 100644 --- a/usr.sbin/bootp/bootptest/trygetea.c +++ b/usr.sbin/bootp/bootptest/trygetea.c @@ -1,4 +1,9 @@ -/* $NetBSD: trygetea.c,v 1.2 1998/01/09 08:09:16 perry Exp $ */ +/* $NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * trygetea.c - test program for getether.c diff --git a/usr.sbin/bootp/common/dovend.c b/usr.sbin/bootp/common/dovend.c index 6a482f712926..29f58e9069c2 100644 --- a/usr.sbin/bootp/common/dovend.c +++ b/usr.sbin/bootp/common/dovend.c @@ -1,4 +1,9 @@ -/* $NetBSD: dovend.c,v 1.2 1998/01/09 08:09:06 perry Exp $ */ +/* $NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * dovend.c : Inserts all but the first few vendor options. @@ -58,7 +63,9 @@ dovend_rfc1497(hp, buf, len) { int bytesleft = len; byte *vp = buf; +#if 0 char *tmpstr; +#endif static char noroom[] = "%s: No room for \"%s\" option"; #define NEED(LEN, MSG) do \ diff --git a/usr.sbin/bootp/common/dumptab.c b/usr.sbin/bootp/common/dumptab.c index 36575c122a5f..374e030b8690 100644 --- a/usr.sbin/bootp/common/dumptab.c +++ b/usr.sbin/bootp/common/dumptab.c @@ -1,4 +1,9 @@ -/* $NetBSD: dumptab.c,v 1.4 1998/01/09 08:09:07 perry Exp $ */ +/* $NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * dumptab.c - handles dumping the database @@ -37,6 +42,7 @@ static void dump_generic P((FILE *, struct shared_bindata *)); static void dump_host P((FILE *, struct host *)); static void list_ipaddresses P((FILE *, struct in_addr_list *)); +void dumptab P((char *)); #undef P @@ -262,7 +268,7 @@ dump_host(fp, hp) /* NetBSD: domainname (see above) */ /* NetBSD: dumpfile (see above) */ if (hp->flags.time_offset) { - fprintf(fp, "\\\n\t:to=%ld:", hp->time_offset); + fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset); } if (hp->flags.time_server) { fprintf(fp, "\\\n\t:ts="); diff --git a/usr.sbin/bootp/common/getif.c b/usr.sbin/bootp/common/getif.c index 1ac6594392fc..150fea9ba54f 100644 --- a/usr.sbin/bootp/common/getif.c +++ b/usr.sbin/bootp/common/getif.c @@ -1,4 +1,9 @@ -/* $NetBSD: getif.c,v 1.3 1998/01/09 08:09:08 perry Exp $ */ +/* $NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * getif.c : get an interface structure @@ -36,7 +41,15 @@ static struct ifreq ifreq[10]; /* Holds interface configuration */ static struct ifconf ifconf; /* points to ifreq */ -static int nmatch(); +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +static int nmatch P((u_char *, u_char *)); + +#undef P /* Return a pointer to the interface struct for the passed address. */ struct ifreq * @@ -86,7 +99,7 @@ getif(s, addrp) while (len > 0) { ifrq = (struct ifreq *) p; sip = (struct sockaddr_in *) &ifrq->ifr_addr; - m = nmatch(addrp, &(sip->sin_addr)); + m = nmatch((u_char *)addrp, (u_char *)&(sip->sin_addr)); if (m > maxmatch) { maxmatch = m; ifrmax = ifrq; diff --git a/usr.sbin/bootp/common/hash.c b/usr.sbin/bootp/common/hash.c index cc52f3408e4b..0c7fc7fa3137 100644 --- a/usr.sbin/bootp/common/hash.c +++ b/usr.sbin/bootp/common/hash.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: hash.c,v 1.3 1997/10/18 04:37:01 lukem Exp $"; +__RCSID("$NetBSD: hash.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); #endif diff --git a/usr.sbin/bootp/common/hwaddr.c b/usr.sbin/bootp/common/hwaddr.c index 9a3182b0343d..5510a514a24a 100644 --- a/usr.sbin/bootp/common/hwaddr.c +++ b/usr.sbin/bootp/common/hwaddr.c @@ -1,4 +1,9 @@ -/* $NetBSD: hwaddr.c,v 1.3 1998/01/09 08:09:10 perry Exp $ */ +/* $NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * hwaddr.c - routines that deal with hardware addresses. @@ -22,10 +27,12 @@ #include #include #include +#include #ifndef NO_UNISTD #include #endif #include +#include #ifndef USE_BFUNCS /* Yes, memcpy is OK here (no overlapped copies). */ @@ -132,7 +139,6 @@ setarp(s, ia, ha, len) int status; char buf[256]; char *a; - extern char *inet_ntoa(); a = inet_ntoa(*ia); sprintf(buf, "arp -d %s; arp -s %s %s temp", diff --git a/usr.sbin/bootp/common/lookup.c b/usr.sbin/bootp/common/lookup.c index 0c121f34b2b8..c539bc5b7a15 100644 --- a/usr.sbin/bootp/common/lookup.c +++ b/usr.sbin/bootp/common/lookup.c @@ -1,4 +1,9 @@ -/* $NetBSD: lookup.c,v 1.3 1998/01/09 08:09:12 perry Exp $ */ +/* $NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * lookup.c - Lookup IP address, HW address, netmask @@ -12,7 +17,6 @@ #ifdef ETC_ETHERS #include -extern int ether_hostton(); #endif #include diff --git a/usr.sbin/bootp/common/readfile.c b/usr.sbin/bootp/common/readfile.c index ee40174946e5..a3ccd1c1b8d7 100644 --- a/usr.sbin/bootp/common/readfile.c +++ b/usr.sbin/bootp/common/readfile.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: readfile.c,v 1.4 1997/10/18 04:37:05 lukem Exp $"; +__RCSID("$NetBSD: readfile.c,v 1.5 1998/03/14 04:39:55 lukem Exp $"); #endif @@ -235,7 +236,6 @@ PRIVATE struct htypename htnamemap[] = { #define P(args) () #endif -extern boolean iplookcmp(); boolean nmcmp P((hash_datum *, hash_datum *)); PRIVATE void diff --git a/usr.sbin/bootp/common/report.c b/usr.sbin/bootp/common/report.c index f128e8223f41..102c60e53ae6 100644 --- a/usr.sbin/bootp/common/report.c +++ b/usr.sbin/bootp/common/report.c @@ -1,4 +1,9 @@ -/* $NetBSD: report.c,v 1.2 1998/01/09 08:09:15 perry Exp $ */ +/* $NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * report() - calls syslog @@ -11,6 +16,7 @@ #endif #include +#include #include #include "report.h" @@ -138,7 +144,6 @@ char * get_errmsg() { extern int errno; - extern char *strerror(); return strerror(errno); } diff --git a/usr.sbin/bootp/common/trygetif.c b/usr.sbin/bootp/common/trygetif.c index 73ada76ae412..e7a5468500a6 100644 --- a/usr.sbin/bootp/common/trygetif.c +++ b/usr.sbin/bootp/common/trygetif.c @@ -1,4 +1,9 @@ -/* $NetBSD: trygetif.c,v 1.3 1998/01/09 08:09:17 perry Exp $ */ +/* $NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * trygetif.c - test program for getif.c diff --git a/usr.sbin/bootp/common/trylook.c b/usr.sbin/bootp/common/trylook.c index 382f2e0ccca4..810576232597 100644 --- a/usr.sbin/bootp/common/trylook.c +++ b/usr.sbin/bootp/common/trylook.c @@ -1,4 +1,9 @@ -/* $NetBSD: trylook.c,v 1.2 1998/01/09 08:09:17 perry Exp $ */ +/* $NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * trylook.c - test program for lookup.c diff --git a/usr.sbin/bootp/common/tzone.c b/usr.sbin/bootp/common/tzone.c index b50d0f660e1c..387e7cf47322 100644 --- a/usr.sbin/bootp/common/tzone.c +++ b/usr.sbin/bootp/common/tzone.c @@ -1,4 +1,9 @@ -/* $NetBSD: tzone.c,v 1.3 1998/01/09 08:09:18 perry Exp $ */ +/* $NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * tzone.c - get the timezone diff --git a/usr.sbin/bootp/common/tzone.h b/usr.sbin/bootp/common/tzone.h index e408a1482865..df25a6f5e547 100644 --- a/usr.sbin/bootp/common/tzone.h +++ b/usr.sbin/bootp/common/tzone.h @@ -1,5 +1,15 @@ -/* $NetBSD: tzone.h,v 1.2 1998/01/09 08:09:19 perry Exp $ */ +/* $NetBSD: tzone.h,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ /* tzone.h */ + extern int32 secondswest; -extern void tzone_init(); + +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +extern void tzone_init P((void)); + +#undef P diff --git a/usr.sbin/bootpd/Makefile b/usr.sbin/bootpd/Makefile index 8b344572630b..43f09131a0da 100644 --- a/usr.sbin/bootpd/Makefile +++ b/usr.sbin/bootpd/Makefile @@ -1,7 +1,6 @@ # bootpd/Makefile -# $NetBSD: Makefile,v 1.4 1997/10/25 06:57:55 lukem Exp $ +# $NetBSD: Makefile,v 1.5 1998/03/14 04:39:53 lukem Exp $ -WARNS?= 0 PROG= bootpd CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU diff --git a/usr.sbin/bootpd/bootpd.c b/usr.sbin/bootpd/bootpd.c index 5eaca8ebf41e..dc81a1cfdcf2 100644 --- a/usr.sbin/bootpd/bootpd.c +++ b/usr.sbin/bootpd/bootpd.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: bootpd.c,v 1.7 1997/10/18 04:36:55 lukem Exp $"; +__RCSID("$NetBSD: bootpd.c,v 1.8 1998/03/14 04:39:53 lukem Exp $"); #endif /* @@ -126,6 +127,7 @@ PRIVATE void handle_reply P((void)); PRIVATE void handle_request P((void)); PRIVATE void sendreply P((int forward, int32 dest_override)); PRIVATE void usage P((void)); +int main P((int, char **)); #undef P @@ -911,7 +913,9 @@ HW addr type is IEEE 802. convert to %s and check again\n", if (debug > 2) report(LOG_INFO, "bootfile=\"%s\"", clntpath); +#ifdef CHECK_FILE_ACCESS null_file_name: +#endif /* CHECK_FILE_ACCESS */ /* @@ -1206,7 +1210,6 @@ dovend_rfc1048(bp, hp, bootsize) { int bytesleft, len; byte *vp; - char *tmpstr; static char noroom[] = "%s: No room for \"%s\" option"; diff --git a/usr.sbin/bootpd/bootpef.c b/usr.sbin/bootpd/bootpef.c index 262aa1f4d00b..61f5b40d4d27 100644 --- a/usr.sbin/bootpd/bootpef.c +++ b/usr.sbin/bootpd/bootpef.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $"; +__RCSID("$NetBSD: bootpef.c,v 1.4 1998/03/14 04:39:53 lukem Exp $"); #endif @@ -97,9 +98,9 @@ static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $" #define P(args) () #endif -static void dovend_rfc1048 P((struct bootp *, struct host *, int32)); static void mktagfile P((struct host *)); static void usage P((void)); +int main P((int, char **)); #undef P @@ -139,7 +140,7 @@ usage() * Initialization such as command-line processing is done and then the * main server loop is started. */ -void +int main(argc, argv) int argc; char **argv; @@ -275,6 +276,7 @@ main(argc, argv) mktagfile(hp); hp = (struct host *) hash_NextEntry(nmhashtable); } + exit(0); } @@ -291,7 +293,6 @@ mktagfile(hp) FILE *fp; int bytesleft, len; byte *vp; - char *tmpstr; if (!hp->flags.exten_file) return; @@ -332,7 +333,7 @@ mktagfile(hp) } fclose(fp); -} /* dovend_rfc1048 */ +} /* mktagfile */ /* * Local Variables: diff --git a/usr.sbin/bootpd/bootpgw.c b/usr.sbin/bootpd/bootpgw.c index f9e0e9184171..61d4ab2c80b7 100644 --- a/usr.sbin/bootpd/bootpgw.c +++ b/usr.sbin/bootpd/bootpgw.c @@ -25,8 +25,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $"; +__RCSID("$NetBSD: bootpgw.c,v 1.7 1998/03/14 04:39:53 lukem Exp $"); #endif /* @@ -98,6 +99,7 @@ static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $" static void usage P((void)); static void handle_reply P((void)); static void handle_request P((void)); +int main P((int, char **)); #undef P @@ -513,7 +515,9 @@ static void handle_request() { struct bootp *bp = (struct bootp *) pktbuf; +#if 0 struct ifreq *ifr; +#endif u_short secs, hops; /* XXX - SLIP init: Set bp_ciaddr = clnt_addr here? */ diff --git a/usr.sbin/bootpd/bootptest.c b/usr.sbin/bootpd/bootptest.c index 90d728181499..6d1bb525cc72 100644 --- a/usr.sbin/bootpd/bootptest.c +++ b/usr.sbin/bootpd/bootptest.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootptest.c,v 1.4 1998/01/09 08:09:03 perry Exp $ */ +/* $NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $ */ /* * bootptest.c - Test out a bootp server. @@ -34,6 +34,11 @@ * 09/93 Original developed by Gordon W. Ross */ +#include +#ifndef lint +__RCSID("$NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $"); +#endif + char *usage = "bootptest [-h] server-name [vendor-data-template-file]"; #include @@ -55,10 +60,12 @@ char *usage = "bootptest [-h] server-name [vendor-data-template-file]"; #include #include #include +#include #include "bootp.h" #include "bootptest.h" #include "getif.h" +#include "report.h" #include "patchlevel.h" #define LOG_ERR 1 @@ -108,14 +115,25 @@ unsigned char vm_cmu[4] = VM_CMU; unsigned char vm_rfc1048[4] = VM_RFC1048; short secs; /* How long client has waited */ -char *get_errmsg(); -extern void bootp_print(); + +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +extern int getether P((char *, char *)); +int main P((int, char **)); +void send_request P((int)); + +#undef P /* * Initialization such as command-line processing is done, then * the receiver loop is started. Die when interrupted. */ +int main(argc, argv) int argc; char **argv; @@ -128,7 +146,7 @@ main(argc, argv) char *vendor_file = NULL; char *bp_file = NULL; int s; /* Socket file descriptor */ - int n, tolen, fromlen, recvcnt; + int n, fromlen, recvcnt; int use_hwa = 0; int32 vend_magic; int32 xid; @@ -408,7 +426,7 @@ main(argc, argv) /* set globals needed by bootp_print() */ snaplen = n; snapend = (unsigned char *) rcvbuf + snaplen; - bootp_print(rcvbuf, n, sin_from.sin_port, 0); + bootp_print((struct bootp *)rcvbuf, n, sin_from.sin_port, 0); putchar('\n'); /* * This no longer exits immediately after receiving @@ -421,12 +439,13 @@ main(argc, argv) exit(1); } +void send_request(s) int s; { /* Print the request packet. */ printf("Sending to %s", inet_ntoa(sin_server.sin_addr)); - bootp_print(sndbuf, snaplen, sin_from.sin_port, 0); + bootp_print((struct bootp *)sndbuf, snaplen, sin_from.sin_port, 0); putchar('\n'); /* Send the request packet. */ @@ -450,7 +469,7 @@ printfn(s, ep) register u_char c; putchar('"'); - while (c = *s++) { + while ((c = *s++) != 0) { if (s > ep) { putchar('"'); return (1); diff --git a/usr.sbin/bootpd/bootptest.h b/usr.sbin/bootpd/bootptest.h index 8fdc504ed64f..61f8ceaa65c0 100644 --- a/usr.sbin/bootpd/bootptest.h +++ b/usr.sbin/bootpd/bootptest.h @@ -1,4 +1,4 @@ -/* $NetBSD: bootptest.h,v 1.2 1998/01/09 08:09:04 perry Exp $ */ +/* $NetBSD: bootptest.h,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ /* bootptest.h */ /* @@ -27,6 +27,8 @@ extern unsigned char *snapend; #define P(args) () #endif +extern void bootp_print P((struct bootp *, int, u_short, u_short)); extern char *ipaddr_string P((struct in_addr *)); +extern int printfn P((u_char *, u_char *)); #undef P diff --git a/usr.sbin/bootpd/dovend.c b/usr.sbin/bootpd/dovend.c index 6a482f712926..29f58e9069c2 100644 --- a/usr.sbin/bootpd/dovend.c +++ b/usr.sbin/bootpd/dovend.c @@ -1,4 +1,9 @@ -/* $NetBSD: dovend.c,v 1.2 1998/01/09 08:09:06 perry Exp $ */ +/* $NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * dovend.c : Inserts all but the first few vendor options. @@ -58,7 +63,9 @@ dovend_rfc1497(hp, buf, len) { int bytesleft = len; byte *vp = buf; +#if 0 char *tmpstr; +#endif static char noroom[] = "%s: No room for \"%s\" option"; #define NEED(LEN, MSG) do \ diff --git a/usr.sbin/bootpd/dumptab.c b/usr.sbin/bootpd/dumptab.c index 36575c122a5f..374e030b8690 100644 --- a/usr.sbin/bootpd/dumptab.c +++ b/usr.sbin/bootpd/dumptab.c @@ -1,4 +1,9 @@ -/* $NetBSD: dumptab.c,v 1.4 1998/01/09 08:09:07 perry Exp $ */ +/* $NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * dumptab.c - handles dumping the database @@ -37,6 +42,7 @@ static void dump_generic P((FILE *, struct shared_bindata *)); static void dump_host P((FILE *, struct host *)); static void list_ipaddresses P((FILE *, struct in_addr_list *)); +void dumptab P((char *)); #undef P @@ -262,7 +268,7 @@ dump_host(fp, hp) /* NetBSD: domainname (see above) */ /* NetBSD: dumpfile (see above) */ if (hp->flags.time_offset) { - fprintf(fp, "\\\n\t:to=%ld:", hp->time_offset); + fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset); } if (hp->flags.time_server) { fprintf(fp, "\\\n\t:ts="); diff --git a/usr.sbin/bootpd/getether.c b/usr.sbin/bootpd/getether.c index 8b6371f68376..5c1414a522a2 100644 --- a/usr.sbin/bootpd/getether.c +++ b/usr.sbin/bootpd/getether.c @@ -1,4 +1,9 @@ -/* $NetBSD: getether.c,v 1.2 1998/01/09 08:09:08 perry Exp $ */ +/* $NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * getether.c : get the ethernet address of an interface @@ -14,11 +19,23 @@ #include #include +#include #include +#include #include "report.h" #define EALEN 6 +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +extern int getether P((char *, char *)); + +#undef P + #if defined(ultrix) || (defined(__osf__) && defined(__alpha)) /* * This is really easy on Ultrix! Thanks to @@ -32,6 +49,7 @@ #include #include /* struct ifdevea */ +int getether(ifname, eap) char *ifname, *eap; { @@ -110,13 +128,14 @@ getether(ifname, eap) #include #include +int getether(ifname, eap) char *ifname; /* interface name from ifconfig structure */ char *eap; /* Ether address (output) */ { int fd, rc = -1; register int n; - struct ifreq ibuf[16], ifr; + struct ifreq ibuf[16]; struct ifconf ifc; register struct ifreq *ifrp, *ifend; diff --git a/usr.sbin/bootpd/getif.c b/usr.sbin/bootpd/getif.c index 1ac6594392fc..150fea9ba54f 100644 --- a/usr.sbin/bootpd/getif.c +++ b/usr.sbin/bootpd/getif.c @@ -1,4 +1,9 @@ -/* $NetBSD: getif.c,v 1.3 1998/01/09 08:09:08 perry Exp $ */ +/* $NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * getif.c : get an interface structure @@ -36,7 +41,15 @@ static struct ifreq ifreq[10]; /* Holds interface configuration */ static struct ifconf ifconf; /* points to ifreq */ -static int nmatch(); +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +static int nmatch P((u_char *, u_char *)); + +#undef P /* Return a pointer to the interface struct for the passed address. */ struct ifreq * @@ -86,7 +99,7 @@ getif(s, addrp) while (len > 0) { ifrq = (struct ifreq *) p; sip = (struct sockaddr_in *) &ifrq->ifr_addr; - m = nmatch(addrp, &(sip->sin_addr)); + m = nmatch((u_char *)addrp, (u_char *)&(sip->sin_addr)); if (m > maxmatch) { maxmatch = m; ifrmax = ifrq; diff --git a/usr.sbin/bootpd/hash.c b/usr.sbin/bootpd/hash.c index cc52f3408e4b..0c7fc7fa3137 100644 --- a/usr.sbin/bootpd/hash.c +++ b/usr.sbin/bootpd/hash.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: hash.c,v 1.3 1997/10/18 04:37:01 lukem Exp $"; +__RCSID("$NetBSD: hash.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); #endif diff --git a/usr.sbin/bootpd/hwaddr.c b/usr.sbin/bootpd/hwaddr.c index 9a3182b0343d..5510a514a24a 100644 --- a/usr.sbin/bootpd/hwaddr.c +++ b/usr.sbin/bootpd/hwaddr.c @@ -1,4 +1,9 @@ -/* $NetBSD: hwaddr.c,v 1.3 1998/01/09 08:09:10 perry Exp $ */ +/* $NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * hwaddr.c - routines that deal with hardware addresses. @@ -22,10 +27,12 @@ #include #include #include +#include #ifndef NO_UNISTD #include #endif #include +#include #ifndef USE_BFUNCS /* Yes, memcpy is OK here (no overlapped copies). */ @@ -132,7 +139,6 @@ setarp(s, ia, ha, len) int status; char buf[256]; char *a; - extern char *inet_ntoa(); a = inet_ntoa(*ia); sprintf(buf, "arp -d %s; arp -s %s %s temp", diff --git a/usr.sbin/bootpd/lookup.c b/usr.sbin/bootpd/lookup.c index 0c121f34b2b8..c539bc5b7a15 100644 --- a/usr.sbin/bootpd/lookup.c +++ b/usr.sbin/bootpd/lookup.c @@ -1,4 +1,9 @@ -/* $NetBSD: lookup.c,v 1.3 1998/01/09 08:09:12 perry Exp $ */ +/* $NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); +#endif /* * lookup.c - Lookup IP address, HW address, netmask @@ -12,7 +17,6 @@ #ifdef ETC_ETHERS #include -extern int ether_hostton(); #endif #include diff --git a/usr.sbin/bootpd/print-bootp.c b/usr.sbin/bootpd/print-bootp.c index c1ba8795cf8c..d5c4fdd3cb3b 100644 --- a/usr.sbin/bootpd/print-bootp.c +++ b/usr.sbin/bootpd/print-bootp.c @@ -23,8 +23,10 @@ * This file was copied from tcpdump-2.1.1 and modified. * There is an e-mail list for tcpdump: */ + +#include #ifndef lint -static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Exp $"; +__RCSID("$NetBSD: print-bootp.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); /* 93/10/10 New data-driven option print routine. */ #endif @@ -41,11 +43,19 @@ static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Ex #include "bootp.h" #include "bootptest.h" +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + /* These decode the vendor data. */ -static void rfc1048_print(); -static void cmu_print(); -static void other_print(); -static void dump_hex(); +static void cmu_print P((u_char *, int)); +static void dump_hex P((u_char *, int)); +static void other_print P((u_char *, int)); +static void rfc1048_print P((u_char *, int)); + +#undef P /* * Print bootp requests @@ -271,8 +281,6 @@ rfc1048_opts[] = { }; #define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0])) -static void print_string(); - static void rfc1048_print(bp, length) register u_char *bp; @@ -280,7 +288,7 @@ rfc1048_print(bp, length) { u_char tag; u_char *ep; - register int len, j; + register int len; u_int32 ul; u_short us; struct in_addr ia; @@ -433,7 +441,6 @@ other_print(bp, length) { u_char *ep; /* end pointer */ u_char *zp; /* points one past last non-zero byte */ - register int i, j; /* Setup end pointer */ ep = bp + length; diff --git a/usr.sbin/bootpd/readfile.c b/usr.sbin/bootpd/readfile.c index ee40174946e5..a3ccd1c1b8d7 100644 --- a/usr.sbin/bootpd/readfile.c +++ b/usr.sbin/bootpd/readfile.c @@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +#include #ifndef lint -static char rcsid[] = "$NetBSD: readfile.c,v 1.4 1997/10/18 04:37:05 lukem Exp $"; +__RCSID("$NetBSD: readfile.c,v 1.5 1998/03/14 04:39:55 lukem Exp $"); #endif @@ -235,7 +236,6 @@ PRIVATE struct htypename htnamemap[] = { #define P(args) () #endif -extern boolean iplookcmp(); boolean nmcmp P((hash_datum *, hash_datum *)); PRIVATE void diff --git a/usr.sbin/bootpd/report.c b/usr.sbin/bootpd/report.c index f128e8223f41..102c60e53ae6 100644 --- a/usr.sbin/bootpd/report.c +++ b/usr.sbin/bootpd/report.c @@ -1,4 +1,9 @@ -/* $NetBSD: report.c,v 1.2 1998/01/09 08:09:15 perry Exp $ */ +/* $NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * report() - calls syslog @@ -11,6 +16,7 @@ #endif #include +#include #include #include "report.h" @@ -138,7 +144,6 @@ char * get_errmsg() { extern int errno; - extern char *strerror(); return strerror(errno); } diff --git a/usr.sbin/bootpd/trygetea.c b/usr.sbin/bootpd/trygetea.c index 411f9b52f198..a0db43e96fe3 100644 --- a/usr.sbin/bootpd/trygetea.c +++ b/usr.sbin/bootpd/trygetea.c @@ -1,4 +1,9 @@ -/* $NetBSD: trygetea.c,v 1.2 1998/01/09 08:09:16 perry Exp $ */ +/* $NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * trygetea.c - test program for getether.c diff --git a/usr.sbin/bootpd/trygetif.c b/usr.sbin/bootpd/trygetif.c index 73ada76ae412..e7a5468500a6 100644 --- a/usr.sbin/bootpd/trygetif.c +++ b/usr.sbin/bootpd/trygetif.c @@ -1,4 +1,9 @@ -/* $NetBSD: trygetif.c,v 1.3 1998/01/09 08:09:17 perry Exp $ */ +/* $NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * trygetif.c - test program for getif.c diff --git a/usr.sbin/bootpd/trylook.c b/usr.sbin/bootpd/trylook.c index 382f2e0ccca4..810576232597 100644 --- a/usr.sbin/bootpd/trylook.c +++ b/usr.sbin/bootpd/trylook.c @@ -1,4 +1,9 @@ -/* $NetBSD: trylook.c,v 1.2 1998/01/09 08:09:17 perry Exp $ */ +/* $NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * trylook.c - test program for lookup.c diff --git a/usr.sbin/bootpd/tzone.c b/usr.sbin/bootpd/tzone.c index b50d0f660e1c..387e7cf47322 100644 --- a/usr.sbin/bootpd/tzone.c +++ b/usr.sbin/bootpd/tzone.c @@ -1,4 +1,9 @@ -/* $NetBSD: tzone.c,v 1.3 1998/01/09 08:09:18 perry Exp $ */ +/* $NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */ + +#include +#ifndef lint +__RCSID("$NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $"); +#endif /* * tzone.c - get the timezone diff --git a/usr.sbin/bootpd/tzone.h b/usr.sbin/bootpd/tzone.h index e408a1482865..df25a6f5e547 100644 --- a/usr.sbin/bootpd/tzone.h +++ b/usr.sbin/bootpd/tzone.h @@ -1,5 +1,15 @@ -/* $NetBSD: tzone.h,v 1.2 1998/01/09 08:09:19 perry Exp $ */ +/* $NetBSD: tzone.h,v 1.3 1998/03/14 04:39:55 lukem Exp $ */ /* tzone.h */ + extern int32 secondswest; -extern void tzone_init(); + +#ifdef __STDC__ +#define P(args) args +#else +#define P(args) () +#endif + +extern void tzone_init P((void)); + +#undef P