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