2 .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RUSERS 3RPC "Dec 30, 1996"
8 rusers, rnusers \- return information about users on remote machines
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lrpcsvc\fR [ \fIlibrary\fR ... ]
14 #include <rpcsvc/rusers.h>
16 \fBenum clnt_stat\fR \fBrusers\fR(\fBchar *\fR\fIhost\fR, \fBstruct utmpidlearr *\fR\fIup\fR);
21 \fBint\fR \fBrnusers\fR(\fBchar *\fR\fIhost\fR);
27 \fB/usr/include/rpcsvc/rusers.x\fR
31 These routines require that the \fBrpc.rusersd\fR(1M) daemon be configured and
32 available on the remote system indicated by \fIhost\fR. The \fBrusers()\fR
33 protocol is used to retrieve information about users logged in on the remote
37 \fBrusers()\fR fills the \fButmpidlearr\fR structure with data about
38 \fIhost\fR, and returns \fB0\fR if successful. \fIup\fR must point to an
39 allocated \fButmpidlearr\fR structure. If \fBrusers()\fR returns successful it
40 will have allocated data structures within the \fIup\fR structure, which should
41 be freed with \fBxdr_free\fR(3NSL) when you no longer need them:
45 xdr_free(xdr_utimpidlearr, up);
52 On error, the returned value can be interpreted as an \fBenum\fR
53 \fBclnt_stat\fR and can be displayed with \fBclnt_perror\fR(3NSL) or
54 \fBclnt_sperrno\fR(3NSL).
57 See the header \fB<rpcsvc/rusers.h>\fR for a definition of struct
61 \fBrnusers()\fR returns the number of users logged on to \fIhost\fR
62 (\fB\(mi1\fR if it cannot determine that number).
65 The following \fBXDR\fR routines are available in \fBlibrpcsvc\fR:
77 See \fBattributes\fR(5) for descriptions of the following attributes:
85 ATTRIBUTE TYPE ATTRIBUTE VALUE
93 \fBrusers\fR(1), \fBrpc.rusersd\fR(1M), \fBrpc_clnt_calls\fR(3NSL),
94 \fBxdr_free\fR(3NSL), \fBattributes\fR(5)