aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/bootpd/getif.c2
-rw-r--r--libexec/bootpd/tools/bootptest/bootptest.c9
-rw-r--r--libexec/bootpd/tools/bootptest/bootptest.h5
-rw-r--r--libexec/bootpd/tools/bootptest/print-bootp.c9
4 files changed, 12 insertions, 13 deletions
diff --git a/libexec/bootpd/getif.c b/libexec/bootpd/getif.c
index 64e5edadb6799..225647ea439b6 100644
--- a/libexec/bootpd/getif.c
+++ b/libexec/bootpd/getif.c
@@ -36,7 +36,7 @@
static struct ifreq ifreq[10]; /* Holds interface configuration */
static struct ifconf ifconf; /* points to ifreq */
-static int nmatch();
+static int nmatch(u_char *ca, u_char *cb);
/* Return a pointer to the interface struct for the passed address. */
struct ifreq *
diff --git a/libexec/bootpd/tools/bootptest/bootptest.c b/libexec/bootpd/tools/bootptest/bootptest.c
index e25c1f0f4665c..b99ac49a735e6 100644
--- a/libexec/bootpd/tools/bootptest/bootptest.c
+++ b/libexec/bootpd/tools/bootptest/bootptest.c
@@ -71,7 +71,7 @@ char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
#include "patchlevel.h"
-static void send_request();
+static void send_request(int s);
#define LOG_ERR 1
#define BUFLEN 1024
@@ -122,9 +122,6 @@ 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();
-
/*
* Initialization such as command-line processing is done, then
* the receiver loop is started. Die when interrupted.
@@ -429,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
@@ -447,7 +444,7 @@ send_request(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. */
diff --git a/libexec/bootpd/tools/bootptest/bootptest.h b/libexec/bootpd/tools/bootptest/bootptest.h
index a1891fe525562..2df35dea7ffc2 100644
--- a/libexec/bootpd/tools/bootptest/bootptest.h
+++ b/libexec/bootpd/tools/bootptest/bootptest.h
@@ -20,4 +20,7 @@ extern int vflag; /* verbose flag */
extern unsigned char *packetp;
extern unsigned char *snapend;
-extern char *ipaddr_string(struct in_addr *);
+void bootp_print(struct bootp *bp, int length, u_short sport,
+ u_short dport);
+char *ipaddr_string(struct in_addr *);
+int printfn(u_char *s, u_char *ep);
diff --git a/libexec/bootpd/tools/bootptest/print-bootp.c b/libexec/bootpd/tools/bootptest/print-bootp.c
index fddc4fb6b4c43..650798e5d0c02 100644
--- a/libexec/bootpd/tools/bootptest/print-bootp.c
+++ b/libexec/bootpd/tools/bootptest/print-bootp.c
@@ -42,11 +42,10 @@
#include "bootptest.h"
/* These decode the vendor data. */
-extern int printfn();
-static void rfc1048_print();
-static void cmu_print();
-static void other_print();
-static void dump_hex();
+static void rfc1048_print(u_char *bp, int length);
+static void cmu_print(u_char *bp, int length);
+static void other_print(u_char *bp, int length);
+static void dump_hex(u_char *bp, int len);
/*
* Print bootp requests