4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1991 Sun Microsystems, Inc.
24 * #ident "%Z%%M% %I% %E% SMI"
28 % * Find out about remote users
31 const RUSERS_MAXUSERLEN = 32;
32 const RUSERS_MAXLINELEN = 32;
33 const RUSERS_MAXHOSTLEN = 257;
36 string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */
37 string ut_line<RUSERS_MAXLINELEN>; /* device */
38 string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */
39 int ut_type; /* type of entry */
40 int ut_time; /* time entry was made */
41 unsigned int ut_idle; /* minutes idle */
44 typedef rusers_utmp utmp_array<>;
49 % * Values for ut_type field above.
52 const RUSERS_EMPTY = 0;
53 const RUSERS_RUN_LVL = 1;
54 const RUSERS_BOOT_TIME = 2;
55 const RUSERS_OLD_TIME = 3;
56 const RUSERS_NEW_TIME = 4;
57 const RUSERS_INIT_PROCESS = 5;
58 const RUSERS_LOGIN_PROCESS = 6;
59 const RUSERS_USER_PROCESS = 7;
60 const RUSERS_DEAD_PROCESS = 8;
61 const RUSERS_ACCOUNTING = 9;
65 version RUSERSVERS_3 {
67 RUSERSPROC_NUM(void) = 1;
70 RUSERSPROC_NAMES(void) = 2;
73 RUSERSPROC_ALLNAMES(void) = 3;
83 % * The following structures are used by version 2 of the rusersd protocol.
84 % * They were not developed with rpcgen, so they do not appear as RPCL.
87 %#define RUSERSVERS_IDLE 2
88 %#define RUSERSVERS 3 /* current version */
92 % * This is the structure used in version 2 of the rusersd RPC service.
93 % * It corresponds to the utmp structure for BSD sytems.
96 % char ut_line[8]; /* tty name */
97 % char ut_name[8]; /* user id */
98 % char ut_host[16]; /* host name, if remote */
99 % time_t ut_time; /* time on */
103 % struct ru_utmp ui_utmp;
107 %struct utmpidlearr {
108 % struct utmpidle **uia_arr;
112 %int xdr_utmpidlearr();
114 %enum clnt_stat rusers(char *host, struct utmpidlearr *up);
115 %int rnusers(char *host);