1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _KLM_PROT_H_RPCGEN 7 #define _KLM_PROT_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 #define LM_MAXSTRLEN 1024 17 18 enum klm_stats { 19 klm_granted = 0, 20 klm_denied = 1, 21 klm_denied_nolocks = 2, 22 klm_working = 3, 23 }; 24 typedef enum klm_stats klm_stats; 25 26 struct klm_lock { 27 char *server_name; 28 netobj fh; 29 int pid; 30 u_int l_offset; 31 u_int l_len; 32 }; 33 typedef struct klm_lock klm_lock; 34 35 struct klm_holder { 36 bool_t exclusive; 37 int svid; 38 u_int l_offset; 39 u_int l_len; 40 }; 41 typedef struct klm_holder klm_holder; 42 43 struct klm_stat { 44 klm_stats stat; 45 }; 46 typedef struct klm_stat klm_stat; 47 48 struct klm_testrply { 49 klm_stats stat; 50 union { 51 struct klm_holder holder; 52 } klm_testrply_u; 53 }; 54 typedef struct klm_testrply klm_testrply; 55 56 struct klm_lockargs { 57 bool_t block; 58 bool_t exclusive; 59 struct klm_lock alock; 60 }; 61 typedef struct klm_lockargs klm_lockargs; 62 63 struct klm_testargs { 64 bool_t exclusive; 65 struct klm_lock alock; 66 }; 67 typedef struct klm_testargs klm_testargs; 68 69 struct klm_unlockargs { 70 struct klm_lock alock; 71 }; 72 typedef struct klm_unlockargs klm_unlockargs; 73 74 #define KLM_PROG 100020 75 #define KLM_VERS 1 76 77 #if defined(__STDC__) || defined(__cplusplus) 78 #define KLM_TEST 1 79 extern klm_testrply * klm_test_1(struct klm_testargs *, CLIENT *); 80 extern klm_testrply * klm_test_1_svc(struct klm_testargs *, struct svc_req *); 81 #define KLM_LOCK 2 82 extern klm_stat * klm_lock_1(struct klm_lockargs *, CLIENT *); 83 extern klm_stat * klm_lock_1_svc(struct klm_lockargs *, struct svc_req *); 84 #define KLM_CANCEL 3 85 extern klm_stat * klm_cancel_1(struct klm_lockargs *, CLIENT *); 86 extern klm_stat * klm_cancel_1_svc(struct klm_lockargs *, struct svc_req *); 87 #define KLM_UNLOCK 4 88 extern klm_stat * klm_unlock_1(struct klm_unlockargs *, CLIENT *); 89 extern klm_stat * klm_unlock_1_svc(struct klm_unlockargs *, struct svc_req *); 90 extern int klm_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t); 91 92 #else /* K&R C */ 93 #define KLM_TEST 1 94 extern klm_testrply * klm_test_1(); 95 extern klm_testrply * klm_test_1_svc(); 96 #define KLM_LOCK 2 97 extern klm_stat * klm_lock_1(); 98 extern klm_stat * klm_lock_1_svc(); 99 #define KLM_CANCEL 3 100 extern klm_stat * klm_cancel_1(); 101 extern klm_stat * klm_cancel_1_svc(); 102 #define KLM_UNLOCK 4 103 extern klm_stat * klm_unlock_1(); 104 extern klm_stat * klm_unlock_1_svc(); 105 extern int klm_prog_1_freeresult (); 106 #endif /* K&R C */ 107 108 /* the xdr functions */ 109 110 #if defined(__STDC__) || defined(__cplusplus) 111 extern bool_t xdr_klm_stats (XDR *, klm_stats*); 112 extern bool_t xdr_klm_lock (XDR *, klm_lock*); 113 extern bool_t xdr_klm_holder (XDR *, klm_holder*); 114 extern bool_t xdr_klm_stat (XDR *, klm_stat*); 115 extern bool_t xdr_klm_testrply (XDR *, klm_testrply*); 116 extern bool_t xdr_klm_lockargs (XDR *, klm_lockargs*); 117 extern bool_t xdr_klm_testargs (XDR *, klm_testargs*); 118 extern bool_t xdr_klm_unlockargs (XDR *, klm_unlockargs*); 119 120 #else /* K&R C */ 121 extern bool_t xdr_klm_stats (); 122 extern bool_t xdr_klm_lock (); 123 extern bool_t xdr_klm_holder (); 124 extern bool_t xdr_klm_stat (); 125 extern bool_t xdr_klm_testrply (); 126 extern bool_t xdr_klm_lockargs (); 127 extern bool_t xdr_klm_testargs (); 128 extern bool_t xdr_klm_unlockargs (); 129 130 #endif /* K&R C */ 131 132 #ifdef __cplusplus 133 } 134 #endif 135 136 #endif /* !_KLM_PROT_H_RPCGEN */ 137