diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-20 10:05:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-20 10:05:57 +0000 |
commit | 11063a80e54cca06882010de175e10ce9f941cf9 (patch) | |
tree | 7bcdca1733ead7ee1d69058dde422642df2b828f /usr.bin/rup/rup.c | |
parent | 1a365ced6561c1c0459e52c8f1fe3d340c969f68 (diff) |
Wall
Diffstat (limited to 'usr.bin/rup/rup.c')
-rw-r--r-- | usr.bin/rup/rup.c | 14 |
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"); |