rnusers.x revision 26208
11832Swollman/* 21832Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 31832Swollman * unrestricted use provided that this legend is included on all tape 41832Swollman * media and as a part of the software program in whole or part. Users 51832Swollman * may copy or modify Sun RPC without charge, but are not authorized 61832Swollman * to license or distribute it to anyone else except as part of a product or 71832Swollman * program developed by the user. 81832Swollman * 91832Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 101832Swollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 111832Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 121832Swollman * 131832Swollman * Sun RPC is provided with no support and without any obligation on the 141832Swollman * part of Sun Microsystems, Inc. to assist in its use, correction, 151832Swollman * modification or enhancement. 161832Swollman * 171832Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 181832Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 191832Swollman * OR ANY PART THEREOF. 201832Swollman * 211832Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 221832Swollman * or profits or other special, indirect and consequential damages, even if 231832Swollman * Sun has been advised of the possibility of such damages. 241832Swollman * 251832Swollman * Sun Microsystems, Inc. 261832Swollman * 2550 Garcia Avenue 271832Swollman * Mountain View, California 94043 281832Swollman */ 291832Swollman 301832Swollman/* 311832Swollman * Find out about remote users 321832Swollman */ 331832Swollman 341832Swollman#ifndef RPC_HDR 351832Swollman%#ifndef lint 361832Swollman%/*static char sccsid[] = "from: @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/ 371832Swollman%/*static char sccsid[] = "from: @(#)rnusers.x 2.1 88/08/01 4.0 RPCSRC";*/ 3826208Swpaul%static char rcsid[] = "$Id: rnusers.x,v 1.1 1994/08/04 19:01:50 wollman Exp $"; 391832Swollman%#endif /* not lint */ 401832Swollman#endif 411832Swollman 421832Swollmanconst MAXUSERS = 100; 431832Swollmanconst MAXUTLEN = 256; 441832Swollman 451832Swollmanstruct utmp { 461832Swollman string ut_line<MAXUTLEN>; 471832Swollman string ut_name<MAXUTLEN>; 481832Swollman string ut_host<MAXUTLEN>; 491832Swollman int ut_time; 501832Swollman}; 511832Swollman 521832Swollman 531832Swollmanstruct utmpidle { 541832Swollman utmp ui_utmp; 551832Swollman unsigned int ui_idle; 561832Swollman}; 571832Swollman 581832Swollmantypedef utmp utmparr<MAXUSERS>; 591832Swollman 601832Swollmantypedef utmpidle utmpidlearr<MAXUSERS>; 611832Swollman 6226208Swpaulconst RUSERS_MAXUSERLEN = 32; 6326208Swpaulconst RUSERS_MAXLINELEN = 32; 6426208Swpaulconst RUSERS_MAXHOSTLEN = 257; 6526208Swpaul 6626208Swpaulstruct rusers_utmp { 6726208Swpaul string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */ 6826208Swpaul string ut_line<RUSERS_MAXLINELEN>; /* device */ 6926208Swpaul string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */ 7026208Swpaul int ut_type; /* type of entry */ 7126208Swpaul int ut_time; /* time entry was made */ 7226208Swpaul unsigned int ut_idle; /* minutes idle */ 7326208Swpaul}; 7426208Swpaul 7526208Swpaultypedef rusers_utmp utmp_array<>; 7626208Swpaul 771832Swollmanprogram RUSERSPROG { 781832Swollman /* 791832Swollman * Old version does not include idle information 801832Swollman */ 811832Swollman version RUSERSVERS_ORIG { 821832Swollman int 831832Swollman RUSERSPROC_NUM(void) = 1; 841832Swollman 851832Swollman utmparr 861832Swollman RUSERSPROC_NAMES(void) = 2; 871832Swollman 881832Swollman utmparr 891832Swollman RUSERSPROC_ALLNAMES(void) = 3; 901832Swollman } = 1; 911832Swollman 921832Swollman /* 931832Swollman * Includes idle information 941832Swollman */ 951832Swollman version RUSERSVERS_IDLE { 961832Swollman int 971832Swollman RUSERSPROC_NUM(void) = 1; 981832Swollman 991832Swollman utmpidlearr 1001832Swollman RUSERSPROC_NAMES(void) = 2; 1011832Swollman 1021832Swollman utmpidlearr 1031832Swollman RUSERSPROC_ALLNAMES(void) = 3; 1041832Swollman } = 2; 10526208Swpaul 10626208Swpaul /* 10726208Swpaul * Version 3 rusers procedures (from Solaris). 10826208Swpaul * (Thanks a lot Sun.) 10926208Swpaul */ 11026208Swpaul version RUSERSVERS_3 { 11126208Swpaul int 11226208Swpaul RUSERSPROC_NUM(void) = 1; 11326208Swpaul 11426208Swpaul utmp_array 11526208Swpaul RUSERSPROC_NAMES(void) = 2; 11626208Swpaul 11726208Swpaul utmp_array 11826208Swpaul RUSERSPROC_ALLNAMES(void) = 3; 11926208Swpaul } = 3; 12026208Swpaul 1211832Swollman} = 100002; 12226208Swpaul 123