home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / lib / librpc / rpcsvc / rnusers.x < prev    next >
Encoding:
Text File  |  1989-07-11  |  2.1 KB  |  87 lines

  1. /* @(#)rnusers.x    2.1 88/08/01 4.0 RPCSRC */
  2. /* @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro */
  3.  
  4. /*
  5.  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  6.  * unrestricted use provided that this legend is included on all tape
  7.  * media and as a part of the software program in whole or part.  Users
  8.  * may copy or modify Sun RPC without charge, but are not authorized
  9.  * to license or distribute it to anyone else except as part of a product or
  10.  * program developed by the user.
  11.  * 
  12.  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  13.  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  14.  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  15.  * 
  16.  * Sun RPC is provided with no support and without any obligation on the
  17.  * part of Sun Microsystems, Inc. to assist in its use, correction,
  18.  * modification or enhancement.
  19.  * 
  20.  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  21.  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  22.  * OR ANY PART THEREOF.
  23.  * 
  24.  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  25.  * or profits or other special, indirect and consequential damages, even if
  26.  * Sun has been advised of the possibility of such damages.
  27.  * 
  28.  * Sun Microsystems, Inc.
  29.  * 2550 Garcia Avenue
  30.  * Mountain View, California  94043
  31.  */
  32.  
  33. /*
  34.  * Find out about remote users
  35.  */
  36.  
  37. const MAXUSERS = 100;
  38. const MAXUTLEN = 256;
  39.  
  40. struct utmp {
  41.     string ut_line<MAXUTLEN>;
  42.     string ut_name<MAXUTLEN>;
  43.     string ut_host<MAXUTLEN>;
  44.     int ut_time;
  45. };
  46.  
  47.  
  48. struct utmpidle {
  49.     utmp ui_utmp;
  50.     unsigned int ui_idle;
  51. };
  52.  
  53. typedef utmp utmparr<MAXUSERS>;
  54.  
  55. typedef utmpidle utmpidlearr<MAXUSERS>;
  56.  
  57. program RUSERSPROG {
  58.     /*
  59.      * Includes idle information
  60.      */
  61.     version RUSERSVERS_IDLE {
  62.         int
  63.         RUSERSPROC_NUM(void) = 1;
  64.  
  65.         utmpidlearr
  66.         RUSERSPROC_NAMES(void) = 2;
  67.  
  68.         utmpidlearr
  69.         RUSERSPROC_ALLNAMES(void) = 3;
  70.     } = 1;
  71.  
  72.     /*
  73.      * Old version does not include idle information
  74.      */
  75.     version RUSERSVERS_ORIG {
  76.         int
  77.         RUSERSPROC_NUM(void) = 1;
  78.  
  79.         utmparr
  80.         RUSERSPROC_NAMES(void) = 2;
  81.  
  82.         utmparr
  83.         RUSERSPROC_ALLNAMES(void) = 3;
  84.     } = 2;
  85. } = 100002;
  86.     
  87.