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