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