'\" te .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] .TH RUSERS 3RPC "Dec 30, 1996" .SH NAME rusers, rnusers \- return information about users on remote machines .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lrpcsvc\fR [ \fIlibrary\fR ... ] #include #include \fBenum clnt_stat\fR \fBrusers\fR(\fBchar *\fR\fIhost\fR, \fBstruct utmpidlearr *\fR\fIup\fR); .fi .LP .nf \fBint\fR \fBrnusers\fR(\fBchar *\fR\fIhost\fR); .fi .SH PROTOCOL .sp .LP \fB/usr/include/rpcsvc/rusers.x\fR .SH DESCRIPTION .sp .LP These routines require that the \fBrpc.rusersd\fR(8) daemon be configured and available on the remote system indicated by \fIhost\fR. The \fBrusers()\fR protocol is used to retrieve information about users logged in on the remote system. .sp .LP \fBrusers()\fR fills the \fButmpidlearr\fR structure with data about \fIhost\fR, and returns \fB0\fR if successful. \fIup\fR must point to an allocated \fButmpidlearr\fR structure. If \fBrusers()\fR returns successful it will have allocated data structures within the \fIup\fR structure, which should be freed with \fBxdr_free\fR(3NSL) when you no longer need them: .sp .in +2 .nf xdr_free(xdr_utimpidlearr, up); .fi .in -2 .sp .sp .LP On error, the returned value can be interpreted as an \fBenum\fR \fBclnt_stat\fR and can be displayed with \fBclnt_perror\fR(3NSL) or \fBclnt_sperrno\fR(3NSL). .sp .LP See the header \fB\fR for a definition of struct \fButmpidlearr\fR. .sp .LP \fBrnusers()\fR returns the number of users logged on to \fIhost\fR (\fB\(mi1\fR if it cannot determine that number). .sp .LP The following \fBXDR\fR routines are available in \fBlibrpcsvc\fR: .sp .in +2 .nf xdr_utmpidlearr .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level MT-Safe .TE .SH SEE ALSO .sp .LP .BR rusers (1), .BR rpc_clnt_calls (3NSL), .BR xdr_free (3NSL), .BR attributes (7), .BR rpc.rusersd (8)