version 1.5, 1997/01/17 07:13:15 |
version 1.6, 1997/06/20 10:07:01 |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <strings.h> |
#include <strings.h> |
#include <rpc/rpc.h> |
#include <rpc/rpc.h> |
|
#include <rpc/pmap_clnt.h> |
#include <arpa/inet.h> |
#include <arpa/inet.h> |
#include <utmp.h> |
#include <utmp.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
HOST_WIDTH+LINE_WIDTH+1, HOST_WIDTH+LINE_WIDTH+1, |
HOST_WIDTH+LINE_WIDTH+1, HOST_WIDTH+LINE_WIDTH+1, |
local, date, idle_time, remote); |
local, date, idle_time, remote); |
} else |
} else |
printf("%0.8s ", |
printf("%.8s ", |
up->uia_arr[x]->ui_utmp.ut_name); |
up->uia_arr[x]->ui_utmp.ut_name); |
} |
} |
if (!longopt) |
if (!longopt) |
|
|
bzero((char *)&up, sizeof(up)); |
bzero((char *)&up, sizeof(up)); |
clnt_stat = clnt_broadcast(RUSERSPROG, RUSERSVERS_IDLE, |
clnt_stat = clnt_broadcast(RUSERSPROG, RUSERSVERS_IDLE, |
RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr, |
RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr, |
&up, rusers_reply); |
(char *)&up, rusers_reply); |
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) { |
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) { |
fprintf(stderr, "%s: %s\n", argv0, clnt_sperrno(clnt_stat)); |
fprintf(stderr, "%s: %s\n", argv0, clnt_sperrno(clnt_stat)); |
exit(1); |
exit(1); |