1rusers(3RPC)                 RPC Library Functions                rusers(3RPC)
2
3
4

NAME

6       rusers, rnusers - return information about users on remote machines
7

SYNOPSIS

9       cc [ flag ... ] file ... -lrpcsvc [ library ... ]
10       #include <rpc/rpc.h>
11       #include <rpcsvc/rusers.h>
12
13       enum clnt_stat rusers(char *host, struct utmpidlearr *up);
14
15
16       int rnusers(char *host);
17
18

PROTOCOL

20       /usr/include/rpcsvc/rusers.x
21

DESCRIPTION

23       These  routines  require  that the rpc.rusersd(1M) daemon be configured
24       and available on the remote system indicated by host. The rusers() pro‐
25       tocol  is  used  to  retrieve  information about users logged in on the
26       remote system.
27
28
29       rusers() fills the utmpidlearr structure  with  data  about  host,  and
30       returns  0  if  successful.  up  must point to an allocated utmpidlearr
31       structure. If rusers() returns successful it will have  allocated  data
32       structures  within  the  up  structure,  which  should  be  freed  with
33       xdr_free(3NSL) when you no longer need them:
34
35         xdr_free(xdr_utimpidlearr, up);
36
37
38
39
40       On error, the returned value can be interpreted as an   enum  clnt_stat
41       and can be displayed with clnt_perror(3NSL) or  clnt_sperrno(3NSL).
42
43
44       See  the  header   <rpcsvc/rusers.h> for a definition of struct  utmpi‐
45       dlearr.
46
47
48       rnusers() returns the number of users logged on to host (−1 if it  can‐
49       not determine that number).
50
51
52       The following  XDR routines are available in librpcsvc:
53
54         xdr_utmpidlearr
55
56
57

ATTRIBUTES

59       See attributes(5) for descriptions of the following attributes:
60
61
62
63
64       ┌─────────────────────────────┬─────────────────────────────┐
65       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
66       ├─────────────────────────────┼─────────────────────────────┤
67       │MT-Level                     │MT-Safe                      │
68       └─────────────────────────────┴─────────────────────────────┘
69

SEE ALSO

71       rusers(1),   rpc.rusersd(1M),   rpc_clnt_calls(3NSL),   xdr_free(3NSL),
72       attributes(5)
73
74
75
76SunOS 5.11                        30 Dec 1996                     rusers(3RPC)
Impressum