| 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 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | #define	LM_MAXSTRLEN 1024 |
| 16 | |
| 17 | enum klm_stats { |
| 18 | 	klm_granted = 0, |
| 19 | 	klm_denied = 1, |
| 20 | 	klm_denied_nolocks = 2, |
| 21 | 	klm_working = 3 |
| 22 | }; |
| 23 | typedef enum klm_stats klm_stats; |
| 24 | |
| 25 | struct klm_lock { |
| 26 | 	char *server_name; |
| 27 | 	netobj fh; |
| 28 | 	int pid; |
| 29 | 	u_int l_offset; |
| 30 | 	u_int l_len; |
| 31 | }; |
| 32 | typedef struct klm_lock klm_lock; |
| 33 | |
| 34 | struct klm_holder { |
| 35 | 	bool_t exclusive; |
| 36 | 	int svid; |
| 37 | 	u_int l_offset; |
| 38 | 	u_int l_len; |
| 39 | }; |
| 40 | typedef struct klm_holder klm_holder; |
| 41 | |
| 42 | struct klm_stat { |
| 43 | 	klm_stats stat; |
| 44 | }; |
| 45 | typedef struct klm_stat klm_stat; |
| 46 | |
| 47 | struct klm_testrply { |
| 48 | 	klm_stats stat; |
| 49 | 	union { |
| 50 | 		struct klm_holder holder; |
| 51 | 	} klm_testrply_u; |
| 52 | }; |
| 53 | typedef struct klm_testrply klm_testrply; |
| 54 | |
| 55 | struct klm_lockargs { |
| 56 | 	bool_t block; |
| 57 | 	bool_t exclusive; |
| 58 | 	struct klm_lock alock; |
| 59 | }; |
| 60 | typedef struct klm_lockargs klm_lockargs; |
| 61 | |
| 62 | struct klm_testargs { |
| 63 | 	bool_t exclusive; |
| 64 | 	struct klm_lock alock; |
| 65 | }; |
| 66 | typedef struct klm_testargs klm_testargs; |
| 67 | |
| 68 | struct klm_unlockargs { |
| 69 | 	struct klm_lock alock; |
| 70 | }; |
| 71 | typedef struct klm_unlockargs klm_unlockargs; |
| 72 | |
| 73 | #define	KLM_PROG ((unsigned long)(100020)) |
| 74 | #define	KLM_VERS ((unsigned long)(1)) |
| 75 | |
| 76 | extern void klm_prog_1(struct svc_req *rqstp, SVCXPRT *transp); |
| 77 | #define	KLM_TEST ((unsigned long)(1)) |
| 78 | extern klm_testrply * klm_test_1(struct klm_testargs *, CLIENT *); |
| 79 | extern klm_testrply * klm_test_1_svc(struct klm_testargs *, struct svc_req *); |
| 80 | #define	KLM_LOCK ((unsigned long)(2)) |
| 81 | extern klm_stat * klm_lock_1(struct klm_lockargs *, CLIENT *); |
| 82 | extern klm_stat * klm_lock_1_svc(struct klm_lockargs *, struct svc_req *); |
| 83 | #define	KLM_CANCEL ((unsigned long)(3)) |
| 84 | extern klm_stat * klm_cancel_1(struct klm_lockargs *, CLIENT *); |
| 85 | extern klm_stat * klm_cancel_1_svc(struct klm_lockargs *, struct svc_req *); |
| 86 | #define	KLM_UNLOCK ((unsigned long)(4)) |
| 87 | extern klm_stat * klm_unlock_1(struct klm_unlockargs *, CLIENT *); |
| 88 | extern klm_stat * klm_unlock_1_svc(struct klm_unlockargs *, struct svc_req *); |
| 89 | extern int klm_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); |
| 90 | |
| 91 | /* the xdr functions */ |
| 92 | extern bool_t xdr_klm_stats(XDR *, klm_stats*); |
| 93 | extern bool_t xdr_klm_lock(XDR *, klm_lock*); |
| 94 | extern bool_t xdr_klm_holder(XDR *, klm_holder*); |
| 95 | extern bool_t xdr_klm_stat(XDR *, klm_stat*); |
| 96 | extern bool_t xdr_klm_testrply(XDR *, klm_testrply*); |
| 97 | extern bool_t xdr_klm_lockargs(XDR *, klm_lockargs*); |
| 98 | extern bool_t xdr_klm_testargs(XDR *, klm_testargs*); |
| 99 | extern bool_t xdr_klm_unlockargs(XDR *, klm_unlockargs*); |
| 100 | |
| 101 | #ifdef __cplusplus |
| 102 | } |
| 103 | #endif |
| 104 | |
| 105 | #endif /* !_KLM_PROT_H_RPCGEN */ |