version 1.6, 1997/02/01 07:18:28 |
version 1.7, 1997/06/20 10:05:56 |
|
|
#include <sys/socket.h> |
#include <sys/socket.h> |
#include <netdb.h> |
#include <netdb.h> |
#include <rpc/rpc.h> |
#include <rpc/rpc.h> |
|
#include <rpc/pmap_clnt.h> |
#include <arpa/inet.h> |
#include <arpa/inet.h> |
#include <err.h> |
#include <err.h> |
|
|
|
|
struct in_addr addr; |
struct in_addr addr; |
} *hosts; |
} *hosts; |
|
|
|
void usage __P((void)); |
|
int print_rup_data __P((char *, statstime *host_stat)); |
|
|
int |
int |
search_host(addr) |
search_host(addr) |
struct in_addr addr; |
struct in_addr addr; |
|
|
}; |
}; |
enum sort_type sort_type; |
enum sort_type sort_type; |
|
|
|
int |
compare(d1, d2) |
compare(d1, d2) |
struct rup_data *d1; |
struct rup_data *d1; |
struct rup_data *d2; |
struct rup_data *d2; |
|
|
} |
} |
|
|
clnt_stat = clnt_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS, |
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) { |
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) { |
fprintf(stderr, "%s: %s", __progname, clnt_sperrno(clnt_stat)); |
fprintf(stderr, "%s: %s", __progname, clnt_sperrno(clnt_stat)); |
exit(1); |
exit(1); |
|
|
} |
} |
} |
} |
|
|
|
int |
main(argc, argv) |
main(argc, argv) |
int argc; |
int argc; |
char *argv[]; |
char *argv[]; |
|
|
} |
} |
|
|
|
|
|
void |
usage() |
usage() |
{ |
{ |
fprintf(stderr, "Usage: rup [-dhlt] [hosts ...]\n"); |
fprintf(stderr, "Usage: rup [-dhlt] [hosts ...]\n"); |