1/*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
5/* $FreeBSD$ */
6
7#ifndef _NLM_PROT_H_RPCGEN
8#define	_NLM_PROT_H_RPCGEN
9
10#include <rpc/rpc.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#define LM_MAXSTRLEN 1024
17#define MAXNAMELEN LM_MAXSTRLEN+1
18
19enum nlm_stats {
20	nlm_granted = 0,
21	nlm_denied = 1,
22	nlm_denied_nolocks = 2,
23	nlm_blocked = 3,
24	nlm_denied_grace_period = 4,
25	nlm_deadlck = 5
26};
27typedef enum nlm_stats nlm_stats;
28
29struct nlm_holder {
30	bool_t exclusive;
31	int svid;
32	netobj oh;
33	u_int l_offset;
34	u_int l_len;
35};
36typedef struct nlm_holder nlm_holder;
37
38struct nlm_testrply {
39	nlm_stats stat;
40	union {
41		struct nlm_holder holder;
42	} nlm_testrply_u;
43};
44typedef struct nlm_testrply nlm_testrply;
45
46struct nlm_stat {
47	nlm_stats stat;
48};
49typedef struct nlm_stat nlm_stat;
50
51struct nlm_res {
52	netobj cookie;
53	nlm_stat stat;
54};
55typedef struct nlm_res nlm_res;
56
57struct nlm_testres {
58	netobj cookie;
59	nlm_testrply stat;
60};
61typedef struct nlm_testres nlm_testres;
62
63struct nlm_lock {
64	char *caller_name;
65	netobj fh;
66	netobj oh;
67	int svid;
68	u_int l_offset;
69	u_int l_len;
70};
71typedef struct nlm_lock nlm_lock;
72
73struct nlm_lockargs {
74	netobj cookie;
75	bool_t block;
76	bool_t exclusive;
77	struct nlm_lock alock;
78	bool_t reclaim;
79	int state;
80};
81typedef struct nlm_lockargs nlm_lockargs;
82
83struct nlm_cancargs {
84	netobj cookie;
85	bool_t block;
86	bool_t exclusive;
87	struct nlm_lock alock;
88};
89typedef struct nlm_cancargs nlm_cancargs;
90
91struct nlm_testargs {
92	netobj cookie;
93	bool_t exclusive;
94	struct nlm_lock alock;
95};
96typedef struct nlm_testargs nlm_testargs;
97
98struct nlm_unlockargs {
99	netobj cookie;
100	struct nlm_lock alock;
101};
102typedef struct nlm_unlockargs nlm_unlockargs;
103/*
104 * The following enums are actually bit encoded for efficient
105 * boolean algebra.... DON'T change them.....
106 */
107
108enum fsh_mode {
109	fsm_DN = 0,
110	fsm_DR = 1,
111	fsm_DW = 2,
112	fsm_DRW = 3
113};
114typedef enum fsh_mode fsh_mode;
115
116enum fsh_access {
117	fsa_NONE = 0,
118	fsa_R = 1,
119	fsa_W = 2,
120	fsa_RW = 3
121};
122typedef enum fsh_access fsh_access;
123
124struct nlm_share {
125	char *caller_name;
126	netobj fh;
127	netobj oh;
128	fsh_mode mode;
129	fsh_access access;
130};
131typedef struct nlm_share nlm_share;
132
133struct nlm_shareargs {
134	netobj cookie;
135	nlm_share share;
136	bool_t reclaim;
137};
138typedef struct nlm_shareargs nlm_shareargs;
139
140struct nlm_shareres {
141	netobj cookie;
142	nlm_stats stat;
143	int sequence;
144};
145typedef struct nlm_shareres nlm_shareres;
146
147struct nlm_notify {
148	char *name;
149	long state;
150};
151typedef struct nlm_notify nlm_notify;
152/* definitions for NLM version 4 */
153
154enum nlm4_stats {
155	nlm4_granted = 0,
156	nlm4_denied = 1,
157	nlm4_denied_nolocks = 2,
158	nlm4_blocked = 3,
159	nlm4_denied_grace_period = 4,
160	nlm4_deadlck = 5,
161	nlm4_rofs = 6,
162	nlm4_stale_fh = 7,
163	nlm4_fbig = 8,
164	nlm4_failed = 9
165};
166typedef enum nlm4_stats nlm4_stats;
167
168struct nlm4_stat {
169	nlm4_stats stat;
170};
171typedef struct nlm4_stat nlm4_stat;
172
173struct nlm4_holder {
174	bool_t exclusive;
175	u_int32_t svid;
176	netobj oh;
177	u_int64_t l_offset;
178	u_int64_t l_len;
179};
180typedef struct nlm4_holder nlm4_holder;
181
182struct nlm4_lock {
183	char *caller_name;
184	netobj fh;
185	netobj oh;
186	u_int32_t svid;
187	u_int64_t l_offset;
188	u_int64_t l_len;
189};
190typedef struct nlm4_lock nlm4_lock;
191
192struct nlm4_share {
193	char *caller_name;
194	netobj fh;
195	netobj oh;
196	fsh_mode mode;
197	fsh_access access;
198};
199typedef struct nlm4_share nlm4_share;
200
201struct nlm4_testrply {
202	nlm4_stats stat;
203	union {
204		struct nlm4_holder holder;
205	} nlm4_testrply_u;
206};
207typedef struct nlm4_testrply nlm4_testrply;
208
209struct nlm4_testres {
210	netobj cookie;
211	nlm4_testrply stat;
212};
213typedef struct nlm4_testres nlm4_testres;
214
215struct nlm4_testargs {
216	netobj cookie;
217	bool_t exclusive;
218	struct nlm4_lock alock;
219};
220typedef struct nlm4_testargs nlm4_testargs;
221
222struct nlm4_res {
223	netobj cookie;
224	nlm4_stat stat;
225};
226typedef struct nlm4_res nlm4_res;
227
228struct nlm4_lockargs {
229	netobj cookie;
230	bool_t block;
231	bool_t exclusive;
232	struct nlm4_lock alock;
233	bool_t reclaim;
234	int state;
235};
236typedef struct nlm4_lockargs nlm4_lockargs;
237
238struct nlm4_cancargs {
239	netobj cookie;
240	bool_t block;
241	bool_t exclusive;
242	struct nlm4_lock alock;
243};
244typedef struct nlm4_cancargs nlm4_cancargs;
245
246struct nlm4_unlockargs {
247	netobj cookie;
248	struct nlm4_lock alock;
249};
250typedef struct nlm4_unlockargs nlm4_unlockargs;
251
252struct nlm4_shareargs {
253	netobj cookie;
254	nlm4_share share;
255	bool_t reclaim;
256};
257typedef struct nlm4_shareargs nlm4_shareargs;
258
259struct nlm4_shareres {
260	netobj cookie;
261	nlm4_stats stat;
262	int sequence;
263};
264typedef struct nlm4_shareres nlm4_shareres;
265
266struct nlm_sm_status {
267	char *mon_name;
268	int state;
269	char priv[16];
270};
271typedef struct nlm_sm_status nlm_sm_status;
272
273struct nlm4_notify {
274	char *name;
275	int32_t state;
276};
277typedef struct nlm4_notify nlm4_notify;
278
279#define	NLM_PROG ((unsigned long)(100021))
280#define	NLM_SM ((unsigned long)(0))
281
282#define	NLM_SM_NOTIFY ((unsigned long)(1))
283extern  enum clnt_stat nlm_sm_notify_0(struct nlm_sm_status *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
284extern  bool_t nlm_sm_notify_0_svc(struct nlm_sm_status *, void *, struct svc_req *);
285#define	NLM_VERS ((unsigned long)(1))
286
287#define	NLM_TEST ((unsigned long)(1))
288extern  enum clnt_stat nlm_test_1(struct nlm_testargs *, nlm_testres *, CLIENT *, struct rpc_callextra *, struct timeval);
289extern  bool_t nlm_test_1_svc(struct nlm_testargs *, nlm_testres *, struct svc_req *);
290#define	NLM_LOCK ((unsigned long)(2))
291extern  enum clnt_stat nlm_lock_1(struct nlm_lockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval);
292extern  bool_t nlm_lock_1_svc(struct nlm_lockargs *, nlm_res *, struct svc_req *);
293#define	NLM_CANCEL ((unsigned long)(3))
294extern  enum clnt_stat nlm_cancel_1(struct nlm_cancargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval);
295extern  bool_t nlm_cancel_1_svc(struct nlm_cancargs *, nlm_res *, struct svc_req *);
296#define	NLM_UNLOCK ((unsigned long)(4))
297extern  enum clnt_stat nlm_unlock_1(struct nlm_unlockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval);
298extern  bool_t nlm_unlock_1_svc(struct nlm_unlockargs *, nlm_res *, struct svc_req *);
299#define	NLM_GRANTED ((unsigned long)(5))
300extern  enum clnt_stat nlm_granted_1(struct nlm_testargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval);
301extern  bool_t nlm_granted_1_svc(struct nlm_testargs *, nlm_res *, struct svc_req *);
302#define	NLM_TEST_MSG ((unsigned long)(6))
303extern  enum clnt_stat nlm_test_msg_1(struct nlm_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
304extern  bool_t nlm_test_msg_1_svc(struct nlm_testargs *, void *, struct svc_req *);
305#define	NLM_LOCK_MSG ((unsigned long)(7))
306extern  enum clnt_stat nlm_lock_msg_1(struct nlm_lockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
307extern  bool_t nlm_lock_msg_1_svc(struct nlm_lockargs *, void *, struct svc_req *);
308#define	NLM_CANCEL_MSG ((unsigned long)(8))
309extern  enum clnt_stat nlm_cancel_msg_1(struct nlm_cancargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
310extern  bool_t nlm_cancel_msg_1_svc(struct nlm_cancargs *, void *, struct svc_req *);
311#define	NLM_UNLOCK_MSG ((unsigned long)(9))
312extern  enum clnt_stat nlm_unlock_msg_1(struct nlm_unlockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
313extern  bool_t nlm_unlock_msg_1_svc(struct nlm_unlockargs *, void *, struct svc_req *);
314#define	NLM_GRANTED_MSG ((unsigned long)(10))
315extern  enum clnt_stat nlm_granted_msg_1(struct nlm_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
316extern  bool_t nlm_granted_msg_1_svc(struct nlm_testargs *, void *, struct svc_req *);
317#define	NLM_TEST_RES ((unsigned long)(11))
318extern  enum clnt_stat nlm_test_res_1(nlm_testres *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
319extern  bool_t nlm_test_res_1_svc(nlm_testres *, void *, struct svc_req *);
320#define	NLM_LOCK_RES ((unsigned long)(12))
321extern  enum clnt_stat nlm_lock_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
322extern  bool_t nlm_lock_res_1_svc(nlm_res *, void *, struct svc_req *);
323#define	NLM_CANCEL_RES ((unsigned long)(13))
324extern  enum clnt_stat nlm_cancel_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
325extern  bool_t nlm_cancel_res_1_svc(nlm_res *, void *, struct svc_req *);
326#define	NLM_UNLOCK_RES ((unsigned long)(14))
327extern  enum clnt_stat nlm_unlock_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
328extern  bool_t nlm_unlock_res_1_svc(nlm_res *, void *, struct svc_req *);
329#define	NLM_GRANTED_RES ((unsigned long)(15))
330extern  enum clnt_stat nlm_granted_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
331extern  bool_t nlm_granted_res_1_svc(nlm_res *, void *, struct svc_req *);
332extern int nlm_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
333#define	NLM_VERSX ((unsigned long)(3))
334
335#define	NLM_SHARE ((unsigned long)(20))
336extern  enum clnt_stat nlm_share_3(nlm_shareargs *, nlm_shareres *, CLIENT *, struct rpc_callextra *, struct timeval);
337extern  bool_t nlm_share_3_svc(nlm_shareargs *, nlm_shareres *, struct svc_req *);
338#define	NLM_UNSHARE ((unsigned long)(21))
339extern  enum clnt_stat nlm_unshare_3(nlm_shareargs *, nlm_shareres *, CLIENT *, struct rpc_callextra *, struct timeval);
340extern  bool_t nlm_unshare_3_svc(nlm_shareargs *, nlm_shareres *, struct svc_req *);
341#define	NLM_NM_LOCK ((unsigned long)(22))
342extern  enum clnt_stat nlm_nm_lock_3(nlm_lockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval);
343extern  bool_t nlm_nm_lock_3_svc(nlm_lockargs *, nlm_res *, struct svc_req *);
344#define	NLM_FREE_ALL ((unsigned long)(23))
345extern  enum clnt_stat nlm_free_all_3(nlm_notify *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
346extern  bool_t nlm_free_all_3_svc(nlm_notify *, void *, struct svc_req *);
347extern int nlm_prog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
348#define	NLM_VERS4 ((unsigned long)(4))
349
350#define	NLM4_TEST ((unsigned long)(1))
351extern  enum clnt_stat nlm4_test_4(nlm4_testargs *, nlm4_testres *, CLIENT *, struct rpc_callextra *, struct timeval);
352extern  bool_t nlm4_test_4_svc(nlm4_testargs *, nlm4_testres *, struct svc_req *);
353#define	NLM4_LOCK ((unsigned long)(2))
354extern  enum clnt_stat nlm4_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval);
355extern  bool_t nlm4_lock_4_svc(nlm4_lockargs *, nlm4_res *, struct svc_req *);
356#define	NLM4_CANCEL ((unsigned long)(3))
357extern  enum clnt_stat nlm4_cancel_4(nlm4_cancargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval);
358extern  bool_t nlm4_cancel_4_svc(nlm4_cancargs *, nlm4_res *, struct svc_req *);
359#define	NLM4_UNLOCK ((unsigned long)(4))
360extern  enum clnt_stat nlm4_unlock_4(nlm4_unlockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval);
361extern  bool_t nlm4_unlock_4_svc(nlm4_unlockargs *, nlm4_res *, struct svc_req *);
362#define	NLM4_GRANTED ((unsigned long)(5))
363extern  enum clnt_stat nlm4_granted_4(nlm4_testargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval);
364extern  bool_t nlm4_granted_4_svc(nlm4_testargs *, nlm4_res *, struct svc_req *);
365#define	NLM4_TEST_MSG ((unsigned long)(6))
366extern  enum clnt_stat nlm4_test_msg_4(nlm4_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
367extern  bool_t nlm4_test_msg_4_svc(nlm4_testargs *, void *, struct svc_req *);
368#define	NLM4_LOCK_MSG ((unsigned long)(7))
369extern  enum clnt_stat nlm4_lock_msg_4(nlm4_lockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
370extern  bool_t nlm4_lock_msg_4_svc(nlm4_lockargs *, void *, struct svc_req *);
371#define	NLM4_CANCEL_MSG ((unsigned long)(8))
372extern  enum clnt_stat nlm4_cancel_msg_4(nlm4_cancargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
373extern  bool_t nlm4_cancel_msg_4_svc(nlm4_cancargs *, void *, struct svc_req *);
374#define	NLM4_UNLOCK_MSG ((unsigned long)(9))
375extern  enum clnt_stat nlm4_unlock_msg_4(nlm4_unlockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
376extern  bool_t nlm4_unlock_msg_4_svc(nlm4_unlockargs *, void *, struct svc_req *);
377#define	NLM4_GRANTED_MSG ((unsigned long)(10))
378extern  enum clnt_stat nlm4_granted_msg_4(nlm4_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
379extern  bool_t nlm4_granted_msg_4_svc(nlm4_testargs *, void *, struct svc_req *);
380#define	NLM4_TEST_RES ((unsigned long)(11))
381extern  enum clnt_stat nlm4_test_res_4(nlm4_testres *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
382extern  bool_t nlm4_test_res_4_svc(nlm4_testres *, void *, struct svc_req *);
383#define	NLM4_LOCK_RES ((unsigned long)(12))
384extern  enum clnt_stat nlm4_lock_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
385extern  bool_t nlm4_lock_res_4_svc(nlm4_res *, void *, struct svc_req *);
386#define	NLM4_CANCEL_RES ((unsigned long)(13))
387extern  enum clnt_stat nlm4_cancel_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
388extern  bool_t nlm4_cancel_res_4_svc(nlm4_res *, void *, struct svc_req *);
389#define	NLM4_UNLOCK_RES ((unsigned long)(14))
390extern  enum clnt_stat nlm4_unlock_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
391extern  bool_t nlm4_unlock_res_4_svc(nlm4_res *, void *, struct svc_req *);
392#define	NLM4_GRANTED_RES ((unsigned long)(15))
393extern  enum clnt_stat nlm4_granted_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
394extern  bool_t nlm4_granted_res_4_svc(nlm4_res *, void *, struct svc_req *);
395#define	NLM4_SHARE ((unsigned long)(20))
396extern  enum clnt_stat nlm4_share_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *, struct rpc_callextra *, struct timeval);
397extern  bool_t nlm4_share_4_svc(nlm4_shareargs *, nlm4_shareres *, struct svc_req *);
398#define	NLM4_UNSHARE ((unsigned long)(21))
399extern  enum clnt_stat nlm4_unshare_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *, struct rpc_callextra *, struct timeval);
400extern  bool_t nlm4_unshare_4_svc(nlm4_shareargs *, nlm4_shareres *, struct svc_req *);
401#define	NLM4_NM_LOCK ((unsigned long)(22))
402extern  enum clnt_stat nlm4_nm_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval);
403extern  bool_t nlm4_nm_lock_4_svc(nlm4_lockargs *, nlm4_res *, struct svc_req *);
404#define	NLM4_FREE_ALL ((unsigned long)(23))
405extern  enum clnt_stat nlm4_free_all_4(nlm4_notify *, void *, CLIENT *, struct rpc_callextra *, struct timeval);
406extern  bool_t nlm4_free_all_4_svc(nlm4_notify *, void *, struct svc_req *);
407extern int nlm_prog_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
408
409/* the xdr functions */
410extern  bool_t xdr_nlm_stats(XDR *, nlm_stats*);
411extern  bool_t xdr_nlm_holder(XDR *, nlm_holder*);
412extern  bool_t xdr_nlm_testrply(XDR *, nlm_testrply*);
413extern  bool_t xdr_nlm_stat(XDR *, nlm_stat*);
414extern  bool_t xdr_nlm_res(XDR *, nlm_res*);
415extern  bool_t xdr_nlm_testres(XDR *, nlm_testres*);
416extern  bool_t xdr_nlm_lock(XDR *, nlm_lock*);
417extern  bool_t xdr_nlm_lockargs(XDR *, nlm_lockargs*);
418extern  bool_t xdr_nlm_cancargs(XDR *, nlm_cancargs*);
419extern  bool_t xdr_nlm_testargs(XDR *, nlm_testargs*);
420extern  bool_t xdr_nlm_unlockargs(XDR *, nlm_unlockargs*);
421extern  bool_t xdr_fsh_mode(XDR *, fsh_mode*);
422extern  bool_t xdr_fsh_access(XDR *, fsh_access*);
423extern  bool_t xdr_nlm_share(XDR *, nlm_share*);
424extern  bool_t xdr_nlm_shareargs(XDR *, nlm_shareargs*);
425extern  bool_t xdr_nlm_shareres(XDR *, nlm_shareres*);
426extern  bool_t xdr_nlm_notify(XDR *, nlm_notify*);
427extern  bool_t xdr_nlm4_stats(XDR *, nlm4_stats*);
428extern  bool_t xdr_nlm4_stat(XDR *, nlm4_stat*);
429extern  bool_t xdr_nlm4_holder(XDR *, nlm4_holder*);
430extern  bool_t xdr_nlm4_lock(XDR *, nlm4_lock*);
431extern  bool_t xdr_nlm4_share(XDR *, nlm4_share*);
432extern  bool_t xdr_nlm4_testrply(XDR *, nlm4_testrply*);
433extern  bool_t xdr_nlm4_testres(XDR *, nlm4_testres*);
434extern  bool_t xdr_nlm4_testargs(XDR *, nlm4_testargs*);
435extern  bool_t xdr_nlm4_res(XDR *, nlm4_res*);
436extern  bool_t xdr_nlm4_lockargs(XDR *, nlm4_lockargs*);
437extern  bool_t xdr_nlm4_cancargs(XDR *, nlm4_cancargs*);
438extern  bool_t xdr_nlm4_unlockargs(XDR *, nlm4_unlockargs*);
439extern  bool_t xdr_nlm4_shareargs(XDR *, nlm4_shareargs*);
440extern  bool_t xdr_nlm4_shareres(XDR *, nlm4_shareres*);
441extern  bool_t xdr_nlm_sm_status(XDR *, nlm_sm_status*);
442extern  bool_t xdr_nlm4_notify(XDR *, nlm4_notify*);
443
444#ifdef __cplusplus
445}
446#endif
447
448#endif /* !_NLM_PROT_H_RPCGEN */
449