summaryrefslogtreecommitdiffstats
path: root/usr.bin/rup
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-06-20 09:58:03 +0000
committerderaadt <deraadt@openbsd.org>1997-06-20 09:58:03 +0000
commit81a265f705df077dedc5defc249f00af0fb762a5 (patch)
tree4811060a54faa5a6650d48c3abca787853d6d5cd /usr.bin/rup
parentstrip%d not st%d (diff)
downloadwireguard-openbsd-81a265f705df077dedc5defc249f00af0fb762a5.tar.xz
wireguard-openbsd-81a265f705df077dedc5defc249f00af0fb762a5.zip
Wall
Diffstat (limited to 'usr.bin/rup')
-rw-r--r--usr.bin/rup/rup.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c
index 9869a0b528c..543e6a00548 100644
--- a/usr.bin/rup/rup.c
+++ b/usr.bin/rup/rup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rup.c,v 1.6 1997/02/01 07:18:28 tholo Exp $ */
+/* $OpenBSD: rup.c,v 1.7 1997/06/20 10:05:56 deraadt Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rup.c,v 1.6 1997/02/01 07:18:28 tholo Exp $";
+static char rcsid[] = "$OpenBSD: rup.c,v 1.7 1997/06/20 10:05:56 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -45,6 +45,7 @@ static char rcsid[] = "$OpenBSD: rup.c,v 1.6 1997/02/01 07:18:28 tholo Exp $";
#include <sys/socket.h>
#include <netdb.h>
#include <rpc/rpc.h>
+#include <rpc/pmap_clnt.h>
#include <arpa/inet.h>
#include <err.h>
@@ -61,6 +62,9 @@ struct host_list {
struct in_addr addr;
} *hosts;
+void usage __P((void));
+int print_rup_data __P((char *, statstime *host_stat));
+
int
search_host(addr)
struct in_addr addr;
@@ -110,6 +114,7 @@ enum sort_type {
};
enum sort_type sort_type;
+int
compare(d1, d2)
struct rup_data *d1;
struct rup_data *d2;
@@ -278,7 +283,7 @@ allhosts()
}
clnt_stat = clnt_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
- xdr_void, NULL, xdr_statstime, &host_stat, rstat_reply);
+ xdr_void, NULL, xdr_statstime, (char *)&host_stat, rstat_reply);
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) {
fprintf(stderr, "%s: %s", __progname, clnt_sperrno(clnt_stat));
exit(1);
@@ -296,7 +301,7 @@ allhosts()
}
}
-
+int
main(argc, argv)
int argc;
char *argv[];
@@ -337,6 +342,7 @@ main(argc, argv)
}
+void
usage()
{
fprintf(stderr, "Usage: rup [-dhlt] [hosts ...]\n");