Home | History | Annotate | Download | only in rpcsvc
      1 /*
      2  * Please do not edit this file.
      3  * It was generated using rpcgen.
      4  */
      5 
      6 #ifndef _RUSERS_H_RPCGEN
      7 #define _RUSERS_H_RPCGEN
      8 
      9 #include <rpc/rpc.h>
     10 
     11 
     12 #ifdef __cplusplus
     13 extern "C" {
     14 #endif
     15 
     16 /*
     17  * Find out about remote users
     18  */
     19 #define RUSERS_MAXUSERLEN 32
     20 #define RUSERS_MAXLINELEN 32
     21 #define RUSERS_MAXHOSTLEN 257
     22 
     23 struct rusers_utmp {
     24 	char *ut_user;
     25 	char *ut_line;
     26 	char *ut_host;
     27 	int ut_type;
     28 	int ut_time;
     29 	u_int ut_idle;
     30 };
     31 typedef struct rusers_utmp rusers_utmp;
     32 
     33 typedef struct {
     34 	u_int utmp_array_len;
     35 	rusers_utmp *utmp_array_val;
     36 } utmp_array;
     37 
     38 /*
     39  * Values for ut_type field above.
     40  */
     41 #define RUSERS_EMPTY 0
     42 #define RUSERS_RUN_LVL 1
     43 #define RUSERS_BOOT_TIME 2
     44 #define RUSERS_OLD_TIME 3
     45 #define RUSERS_NEW_TIME 4
     46 #define RUSERS_INIT_PROCESS 5
     47 #define RUSERS_LOGIN_PROCESS 6
     48 #define RUSERS_USER_PROCESS 7
     49 #define RUSERS_DEAD_PROCESS 8
     50 #define RUSERS_ACCOUNTING 9
     51 
     52 
     53 #ifdef __cplusplus
     54 extern "C" {
     55 #endif
     56 
     57 #include <rpc/xdr.h>
     58 
     59 /*
     60  * The following structures are used by version 2 of the rusersd protocol.
     61  * They were not developed with rpcgen, so they do not appear as RPCL.
     62  */
     63 
     64 #define RUSERSVERS_IDLE 2
     65 #define RUSERSVERS 3 /* current version */
     66 #define MAXUSERS 100
     67 
     68 /*
     69  * This is the structure used in version 2 of the rusersd RPC service.
     70  * It corresponds to the utmp structure for BSD systems.
     71  */
     72 struct ru_utmp {
     73  char ut_line[8]; /* tty name */
     74  char ut_name[8]; /* user id */
     75  char ut_host[16]; /* host name, if remote */
     76  long int ut_time; /* time on */
     77 };
     78 
     79 struct utmparr {
     80  struct ru_utmp **uta_arr;
     81  int uta_cnt;
     82 };
     83 typedef struct utmparr utmparr;
     84 
     85 extern bool_t xdr_utmparr (XDR *xdrs, struct utmparr *objp) __THROW;
     86 
     87 struct utmpidle {
     88  struct ru_utmp ui_utmp;
     89  unsigned int ui_idle;
     90 };
     91 
     92 struct utmpidlearr {
     93  struct utmpidle **uia_arr;
     94  int uia_cnt;
     95 };
     96 
     97 extern bool_t xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp) __THROW;
     98 
     99 #ifdef __cplusplus
    100 }
    101 #endif
    102 
    103 #define RUSERSPROG 100002
    104 #define RUSERSVERS_3 3
    105 
    106 #if defined(__STDC__) || defined(__cplusplus)
    107 #define RUSERSPROC_NUM 1
    108 extern  int * rusersproc_num_3(void *, CLIENT *);
    109 extern  int * rusersproc_num_3_svc(void *, struct svc_req *);
    110 #define RUSERSPROC_NAMES 2
    111 extern  utmp_array * rusersproc_names_3(void *, CLIENT *);
    112 extern  utmp_array * rusersproc_names_3_svc(void *, struct svc_req *);
    113 #define RUSERSPROC_ALLNAMES 3
    114 extern  utmp_array * rusersproc_allnames_3(void *, CLIENT *);
    115 extern  utmp_array * rusersproc_allnames_3_svc(void *, struct svc_req *);
    116 extern int rusersprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
    117 
    118 #else /* K&R C */
    119 #define RUSERSPROC_NUM 1
    120 extern  int * rusersproc_num_3();
    121 extern  int * rusersproc_num_3_svc();
    122 #define RUSERSPROC_NAMES 2
    123 extern  utmp_array * rusersproc_names_3();
    124 extern  utmp_array * rusersproc_names_3_svc();
    125 #define RUSERSPROC_ALLNAMES 3
    126 extern  utmp_array * rusersproc_allnames_3();
    127 extern  utmp_array * rusersproc_allnames_3_svc();
    128 extern int rusersprog_3_freeresult ();
    129 #endif /* K&R C */
    130 
    131 /* the xdr functions */
    132 
    133 #if defined(__STDC__) || defined(__cplusplus)
    134 extern  bool_t xdr_rusers_utmp (XDR *, rusers_utmp*);
    135 extern  bool_t xdr_utmp_array (XDR *, utmp_array*);
    136 
    137 #else /* K&R C */
    138 extern bool_t xdr_rusers_utmp ();
    139 extern bool_t xdr_utmp_array ();
    140 
    141 #endif /* K&R C */
    142 
    143 #ifdef __cplusplus
    144 }
    145 #endif
    146 
    147 #endif /* !_RUSERS_H_RPCGEN */
    148