1259117Shrs/*- 2259117Shrs * Copyright (c) 2010, Oracle America, Inc. 3259117Shrs * 4259117Shrs * Redistribution and use in source and binary forms, with or without 5259117Shrs * modification, are permitted provided that the following conditions are 6259117Shrs * met: 7259117Shrs * 8259117Shrs * * Redistributions of source code must retain the above copyright 9259117Shrs * notice, this list of conditions and the following disclaimer. 10259117Shrs * * Redistributions in binary form must reproduce the above 11259117Shrs * copyright notice, this list of conditions and the following 12259117Shrs * disclaimer in the documentation and/or other materials 13259117Shrs * provided with the distribution. 14259117Shrs * * Neither the name of the "Oracle America, Inc." nor the names of its 15259117Shrs * contributors may be used to endorse or promote products derived 16259117Shrs * from this software without specific prior written permission. 17259117Shrs * 18259117Shrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19259117Shrs * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20259117Shrs * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21259117Shrs * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22259117Shrs * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 23259117Shrs * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24259117Shrs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 25259117Shrs * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26259117Shrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27259117Shrs * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28259117Shrs * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29259117Shrs * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 301832Swollman */ 311832Swollman 321832Swollman/* 331832Swollman * Find out about remote users 341832Swollman */ 351832Swollman 361832Swollman#ifndef RPC_HDR 371832Swollman%#ifndef lint 381832Swollman%/*static char sccsid[] = "from: @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/ 391832Swollman%/*static char sccsid[] = "from: @(#)rnusers.x 2.1 88/08/01 4.0 RPCSRC";*/ 401832Swollman%#endif /* not lint */ 41114629Sobrien%#include <sys/cdefs.h> 42114629Sobrien%__FBSDID("$FreeBSD: releng/11.0/include/rpcsvc/rnusers.x 259117 2013-12-09 04:26:50Z hrs $"); 431832Swollman#endif 441832Swollman 451832Swollmanconst MAXUSERS = 100; 461832Swollmanconst MAXUTLEN = 256; 471832Swollman 481832Swollmanstruct utmp { 491832Swollman string ut_line<MAXUTLEN>; 501832Swollman string ut_name<MAXUTLEN>; 511832Swollman string ut_host<MAXUTLEN>; 521832Swollman int ut_time; 531832Swollman}; 541832Swollman 551832Swollman 561832Swollmanstruct utmpidle { 571832Swollman utmp ui_utmp; 581832Swollman unsigned int ui_idle; 591832Swollman}; 601832Swollman 611832Swollmantypedef utmp utmparr<MAXUSERS>; 621832Swollman 631832Swollmantypedef utmpidle utmpidlearr<MAXUSERS>; 641832Swollman 6526208Swpaulconst RUSERS_MAXUSERLEN = 32; 6626208Swpaulconst RUSERS_MAXLINELEN = 32; 6726208Swpaulconst RUSERS_MAXHOSTLEN = 257; 6826208Swpaul 6926208Swpaulstruct rusers_utmp { 7026208Swpaul string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */ 7126208Swpaul string ut_line<RUSERS_MAXLINELEN>; /* device */ 7226208Swpaul string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */ 7326208Swpaul int ut_type; /* type of entry */ 7426208Swpaul int ut_time; /* time entry was made */ 7526208Swpaul unsigned int ut_idle; /* minutes idle */ 7626208Swpaul}; 7726208Swpaul 7826208Swpaultypedef rusers_utmp utmp_array<>; 7926208Swpaul 801832Swollmanprogram RUSERSPROG { 811832Swollman /* 821832Swollman * Old version does not include idle information 831832Swollman */ 841832Swollman version RUSERSVERS_ORIG { 851832Swollman int 861832Swollman RUSERSPROC_NUM(void) = 1; 871832Swollman 881832Swollman utmparr 891832Swollman RUSERSPROC_NAMES(void) = 2; 901832Swollman 911832Swollman utmparr 921832Swollman RUSERSPROC_ALLNAMES(void) = 3; 931832Swollman } = 1; 941832Swollman 951832Swollman /* 961832Swollman * Includes idle information 971832Swollman */ 981832Swollman version RUSERSVERS_IDLE { 991832Swollman int 1001832Swollman RUSERSPROC_NUM(void) = 1; 1011832Swollman 1021832Swollman utmpidlearr 1031832Swollman RUSERSPROC_NAMES(void) = 2; 1041832Swollman 1051832Swollman utmpidlearr 1061832Swollman RUSERSPROC_ALLNAMES(void) = 3; 1071832Swollman } = 2; 10826208Swpaul 10926208Swpaul /* 11026208Swpaul * Version 3 rusers procedures (from Solaris). 11126208Swpaul * (Thanks a lot Sun.) 11226208Swpaul */ 11326208Swpaul version RUSERSVERS_3 { 11426208Swpaul int 11526208Swpaul RUSERSPROC_NUM(void) = 1; 11626208Swpaul 11726208Swpaul utmp_array 11826208Swpaul RUSERSPROC_NAMES(void) = 2; 11926208Swpaul 12026208Swpaul utmp_array 12126208Swpaul RUSERSPROC_ALLNAMES(void) = 3; 12226208Swpaul } = 3; 12326208Swpaul 1241832Swollman} = 100002; 12526208Swpaul 126