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