1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _RSTAT_V2_H_RPCGEN 7 #define _RSTAT_V2_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 /* 16 * Version 2 rstat; for backwards compatibility only. 17 */ 18 /* 19 * Copyright (c) 1985, 1990, 1991 by Sun Microsystems, Inc. 20 */ 21 /* from rstat_v2.x */ 22 23 #pragma ident "%Z%%M% %I% %E% SMI" 24 25 #define RSTAT_V2_CPUSTATES 4 26 #define RSTAT_V2_DK_NDRIVE 4 27 #define RSTAT_V2_CPU_USER 0 28 #define RSTAT_V2_CPU_NICE 1 29 #define RSTAT_V2_CPU_SYS 2 30 #define RSTAT_V2_CPU_IDLE 3 31 32 struct rstat_v2_timeval { 33 int tv_sec; 34 int tv_usec; 35 }; 36 typedef struct rstat_v2_timeval rstat_v2_timeval; 37 38 struct statsswtch { 39 int cp_time[RSTAT_V2_CPUSTATES]; 40 int dk_xfer[RSTAT_V2_DK_NDRIVE]; 41 int v_pgpgin; 42 int v_pgpgout; 43 int v_pswpin; 44 int v_pswpout; 45 int v_intr; 46 int if_ipackets; 47 int if_ierrors; 48 int if_oerrors; 49 int if_collisions; 50 int v_swtch; 51 int avenrun[3]; 52 rstat_v2_timeval boottime; 53 }; 54 typedef struct statsswtch statsswtch; 55 56 #define RSTATPROG 100001 57 #define RSTATVERS_SWTCH 2 58 59 #if defined(__STDC__) || defined(__cplusplus) 60 #define RSTATPROC_STATS 1 61 extern statsswtch * rstatproc_stats_2(void *, CLIENT *); 62 extern statsswtch * rstatproc_stats_2_svc(void *, struct svc_req *); 63 #define RSTATPROC_HAVEDISK 2 64 extern u_int * rstatproc_havedisk_2(void *, CLIENT *); 65 extern u_int * rstatproc_havedisk_2_svc(void *, struct svc_req *); 66 extern int rstatprog_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 67 68 #else /* K&R C */ 69 #define RSTATPROC_STATS 1 70 extern statsswtch * rstatproc_stats_2(); 71 extern statsswtch * rstatproc_stats_2_svc(); 72 #define RSTATPROC_HAVEDISK 2 73 extern u_int * rstatproc_havedisk_2(); 74 extern u_int * rstatproc_havedisk_2_svc(); 75 extern int rstatprog_2_freeresult(); 76 #endif /* K&R C */ 77 78 /* the xdr functions */ 79 80 #if defined(__STDC__) || defined(__cplusplus) 81 extern bool_t xdr_rstat_v2_timeval(XDR *, rstat_v2_timeval*); 82 extern bool_t xdr_statsswtch(XDR *, statsswtch*); 83 84 #else /* K&R C */ 85 extern bool_t xdr_rstat_v2_timeval(); 86 extern bool_t xdr_statsswtch(); 87 88 #endif /* K&R C */ 89 90 #ifdef __cplusplus 91 } 92 #endif 93 94 #endif /* !_RSTAT_V2_H_RPCGEN */ 95