=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rup/rup.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- src/usr.bin/rup/rup.c 1997/02/01 07:18:28 1.6 +++ src/usr.bin/rup/rup.c 1997/06/20 10:05:56 1.7 @@ -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 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -61,6 +62,9 @@ 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 sort_type; +int compare(d1, d2) struct rup_data *d1; struct rup_data *d2; @@ -278,7 +283,7 @@ } 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 @@ } } - +int main(argc, argv) int argc; char *argv[]; @@ -337,6 +342,7 @@ } +void usage() { fprintf(stderr, "Usage: rup [-dhlt] [hosts ...]\n");