Take maintenance for libnfs
[deb_libnfs.git] / nlm / libnfs-raw-nlm.h
CommitLineData
ee872606
RRS
1/*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
5
6#ifndef _NLM_H_RPCGEN
7#define _NLM_H_RPCGEN
8
9#include <nfsc/libnfs-zdr.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#if defined(ANDROID)
16typedef long long int quad_t;
17typedef long long unsigned u_quad_t;
18#endif
19#if defined(WIN32)
20typedef long long int quad_t;
21typedef long long unsigned u_quad_t;
22#endif
23
24struct nlm_fh4 {
25 struct {
26 u_int data_len;
27 char *data_val;
28 } data;
29};
30typedef struct nlm_fh4 nlm_fh4;
31
32typedef char *nlm4_oh;
33
34struct nlm_cookie {
35 struct {
36 u_int data_len;
37 char *data_val;
38 } data;
39};
40typedef struct nlm_cookie nlm_cookie;
41
42enum nlmstat4 {
43 NLM4_GRANTED = 0,
44 NLM4_DENIED = 1,
45 NLM4_DENIED_NOLOCKS = 2,
46 NLM4_BLOCKED = 3,
47 NLM4_DENIED_GRACE_PERIOD = 4,
48 NLM4_DEADLCK = 5,
49 NLM4_ROFS = 6,
50 NLM4_STALE_FH = 7,
51 NLM4_FBIG = 8,
52 NLM4_FAILED = 9,
53};
54typedef enum nlmstat4 nlmstat4;
55
56struct nlm4_holder {
57 bool_t exclusive;
58 u_int svid;
59 nlm4_oh oh;
60 u_quad_t l_offset;
61 u_quad_t l_len;
62};
63typedef struct nlm4_holder nlm4_holder;
64#define NLM_MAXNAME 256
65
66struct nlm4_lock {
67 char *caller_name;
68 struct nlm_fh4 fh;
69 nlm4_oh oh;
70 u_int svid;
71 u_quad_t l_offset;
72 u_quad_t l_len;
73};
74typedef struct nlm4_lock nlm4_lock;
75
76struct nlm4_share {
77 char *caller_name;
78 struct nlm_fh4 fh;
79 nlm4_oh oh;
80 u_int mode;
81 u_int access;
82};
83typedef struct nlm4_share nlm4_share;
84
85struct nlm4_testres_denied {
86 nlm4_holder holder;
87};
88typedef struct nlm4_testres_denied nlm4_testres_denied;
89
90struct nlm4_testreply {
91 nlmstat4 status;
92 union {
93 nlm4_testres_denied lock;
94 } nlm4_testreply_u;
95};
96typedef struct nlm4_testreply nlm4_testreply;
97
98struct NLM4_TESTres {
99 nlm_cookie cookie;
100 nlm4_testreply reply;
101};
102typedef struct NLM4_TESTres NLM4_TESTres;
103
104struct NLM4_TESTargs {
105 nlm_cookie cookie;
106 bool_t exclusive;
107 nlm4_lock lock;
108};
109typedef struct NLM4_TESTargs NLM4_TESTargs;
110
111struct NLM4_CANCres {
112 nlm_cookie cookie;
113 nlmstat4 status;
114};
115typedef struct NLM4_CANCres NLM4_CANCres;
116
117struct NLM4_CANCargs {
118 nlm_cookie cookie;
119 bool_t block;
120 bool_t exclusive;
121 nlm4_lock lock;
122};
123typedef struct NLM4_CANCargs NLM4_CANCargs;
124
125struct NLM4_UNLOCKres {
126 nlm_cookie cookie;
127 nlmstat4 status;
128};
129typedef struct NLM4_UNLOCKres NLM4_UNLOCKres;
130
131struct NLM4_UNLOCKargs {
132 nlm_cookie cookie;
133 nlm4_lock lock;
134};
135typedef struct NLM4_UNLOCKargs NLM4_UNLOCKargs;
136
137struct NLM4_LOCKres {
138 nlm_cookie cookie;
139 nlmstat4 status;
140};
141typedef struct NLM4_LOCKres NLM4_LOCKres;
142
143struct NLM4_LOCKargs {
144 nlm_cookie cookie;
145 bool_t block;
146 bool_t exclusive;
147 nlm4_lock lock;
148 bool_t reclaim;
149 int state;
150};
151typedef struct NLM4_LOCKargs NLM4_LOCKargs;
152
153struct NLM4_GRANTEDargs {
154 nlm_cookie cookie;
155 bool_t exclusive;
156 nlm4_lock lock;
157};
158typedef struct NLM4_GRANTEDargs NLM4_GRANTEDargs;
159
160struct NLM4_GRANTEDres {
161 nlm_cookie cookie;
162 nlmstat4 status;
163};
164typedef struct NLM4_GRANTEDres NLM4_GRANTEDres;
165
166#define NLM_PROGRAM 100021
167#define NLM_V4 4
168
169#if defined(__STDC__) || defined(__cplusplus)
170#define NLM4_NULL 0
171extern void * nlm4_null_4(void *, CLIENT *);
172extern void * nlm4_null_4_svc(void *, struct svc_req *);
173#define NLM4_TEST 1
174extern NLM4_TESTres * nlm4_test_4(NLM4_TESTargs *, CLIENT *);
175extern NLM4_TESTres * nlm4_test_4_svc(NLM4_TESTargs *, struct svc_req *);
176#define NLM4_LOCK 2
177extern NLM4_LOCKres * nlm4_lock_4(NLM4_LOCKargs *, CLIENT *);
178extern NLM4_LOCKres * nlm4_lock_4_svc(NLM4_LOCKargs *, struct svc_req *);
179#define NLM4_CANCEL 3
180extern NLM4_CANCres * nlm4_cancel_4(NLM4_CANCargs *, CLIENT *);
181extern NLM4_CANCres * nlm4_cancel_4_svc(NLM4_CANCargs *, struct svc_req *);
182#define NLM4_UNLOCK 4
183extern NLM4_UNLOCKres * nlm4_unlock_4(NLM4_UNLOCKargs *, CLIENT *);
184extern NLM4_UNLOCKres * nlm4_unlock_4_svc(NLM4_UNLOCKargs *, struct svc_req *);
185#define NLM4_GRANT 5
186extern NLM4_GRANTEDres * nlm4_grant_4(NLM4_GRANTEDargs *, CLIENT *);
187extern NLM4_GRANTEDres * nlm4_grant_4_svc(NLM4_GRANTEDargs *, struct svc_req *);
188#define NLM4_TEST_MSG 6
189extern void * nlm4_test_msg_4(NLM4_TESTargs *, CLIENT *);
190extern void * nlm4_test_msg_4_svc(NLM4_TESTargs *, struct svc_req *);
191#define NLM4_LOCK_MSG 7
192extern void * nlm4_lock_msg_4(NLM4_LOCKargs *, CLIENT *);
193extern void * nlm4_lock_msg_4_svc(NLM4_LOCKargs *, struct svc_req *);
194#define NLM4_CANCEL_MSG 8
195extern void * nlm4_cancel_msg_4(NLM4_CANCargs *, CLIENT *);
196extern void * nlm4_cancel_msg_4_svc(NLM4_CANCargs *, struct svc_req *);
197#define NLM4_UNLOCK_MSG 9
198extern void * nlm4_unlock_msg_4(NLM4_UNLOCKargs *, CLIENT *);
199extern void * nlm4_unlock_msg_4_svc(NLM4_UNLOCKargs *, struct svc_req *);
200#define NLM4_GRANT_MSG 10
201extern void * nlm4_grant_msg_4(NLM4_GRANTEDargs *, CLIENT *);
202extern void * nlm4_grant_msg_4_svc(NLM4_GRANTEDargs *, struct svc_req *);
203#define NLM4_TEST_RES 11
204extern void * nlm4_test_res_4(NLM4_TESTres *, CLIENT *);
205extern void * nlm4_test_res_4_svc(NLM4_TESTres *, struct svc_req *);
206#define NLM4_LOCK_RES 12
207extern void * nlm4_lock_res_4(NLM4_LOCKres *, CLIENT *);
208extern void * nlm4_lock_res_4_svc(NLM4_LOCKres *, struct svc_req *);
209#define NLM4_CANCEL_RES 13
210extern void * nlm4_cancel_res_4(NLM4_CANCres *, CLIENT *);
211extern void * nlm4_cancel_res_4_svc(NLM4_CANCres *, struct svc_req *);
212#define NLM4_UNLOCK_RES 14
213extern void * nlm4_unlock_res_4(NLM4_UNLOCKres *, CLIENT *);
214extern void * nlm4_unlock_res_4_svc(NLM4_UNLOCKres *, struct svc_req *);
215#define NLM4_GRANT_RES 15
216extern void * nlm4_grant_res_4(NLM4_GRANTEDres *, CLIENT *);
217extern void * nlm4_grant_res_4_svc(NLM4_GRANTEDres *, struct svc_req *);
218extern int nlm_program_4_freeresult (SVCXPRT *, zdrproc_t, caddr_t);
219
220#else /* K&R C */
221#define NLM4_NULL 0
222extern void * nlm4_null_4();
223extern void * nlm4_null_4_svc();
224#define NLM4_TEST 1
225extern NLM4_TESTres * nlm4_test_4();
226extern NLM4_TESTres * nlm4_test_4_svc();
227#define NLM4_LOCK 2
228extern NLM4_LOCKres * nlm4_lock_4();
229extern NLM4_LOCKres * nlm4_lock_4_svc();
230#define NLM4_CANCEL 3
231extern NLM4_CANCres * nlm4_cancel_4();
232extern NLM4_CANCres * nlm4_cancel_4_svc();
233#define NLM4_UNLOCK 4
234extern NLM4_UNLOCKres * nlm4_unlock_4();
235extern NLM4_UNLOCKres * nlm4_unlock_4_svc();
236#define NLM4_GRANT 5
237extern NLM4_GRANTEDres * nlm4_grant_4();
238extern NLM4_GRANTEDres * nlm4_grant_4_svc();
239#define NLM4_TEST_MSG 6
240extern void * nlm4_test_msg_4();
241extern void * nlm4_test_msg_4_svc();
242#define NLM4_LOCK_MSG 7
243extern void * nlm4_lock_msg_4();
244extern void * nlm4_lock_msg_4_svc();
245#define NLM4_CANCEL_MSG 8
246extern void * nlm4_cancel_msg_4();
247extern void * nlm4_cancel_msg_4_svc();
248#define NLM4_UNLOCK_MSG 9
249extern void * nlm4_unlock_msg_4();
250extern void * nlm4_unlock_msg_4_svc();
251#define NLM4_GRANT_MSG 10
252extern void * nlm4_grant_msg_4();
253extern void * nlm4_grant_msg_4_svc();
254#define NLM4_TEST_RES 11
255extern void * nlm4_test_res_4();
256extern void * nlm4_test_res_4_svc();
257#define NLM4_LOCK_RES 12
258extern void * nlm4_lock_res_4();
259extern void * nlm4_lock_res_4_svc();
260#define NLM4_CANCEL_RES 13
261extern void * nlm4_cancel_res_4();
262extern void * nlm4_cancel_res_4_svc();
263#define NLM4_UNLOCK_RES 14
264extern void * nlm4_unlock_res_4();
265extern void * nlm4_unlock_res_4_svc();
266#define NLM4_GRANT_RES 15
267extern void * nlm4_grant_res_4();
268extern void * nlm4_grant_res_4_svc();
269extern int nlm_program_4_freeresult ();
270#endif /* K&R C */
271
272/* the zdr functions */
273
274#if defined(__STDC__) || defined(__cplusplus)
275extern bool_t zdr_nlm_fh4 (ZDR *, nlm_fh4*);
276extern bool_t zdr_nlm4_oh (ZDR *, nlm4_oh*);
277extern bool_t zdr_nlm_cookie (ZDR *, nlm_cookie*);
278extern bool_t zdr_nlmstat4 (ZDR *, nlmstat4*);
279extern bool_t zdr_nlm4_holder (ZDR *, nlm4_holder*);
280extern bool_t zdr_nlm4_lock (ZDR *, nlm4_lock*);
281extern bool_t zdr_nlm4_share (ZDR *, nlm4_share*);
282extern bool_t zdr_nlm4_testres_denied (ZDR *, nlm4_testres_denied*);
283extern bool_t zdr_nlm4_testreply (ZDR *, nlm4_testreply*);
284extern bool_t zdr_NLM4_TESTres (ZDR *, NLM4_TESTres*);
285extern bool_t zdr_NLM4_TESTargs (ZDR *, NLM4_TESTargs*);
286extern bool_t zdr_NLM4_CANCres (ZDR *, NLM4_CANCres*);
287extern bool_t zdr_NLM4_CANCargs (ZDR *, NLM4_CANCargs*);
288extern bool_t zdr_NLM4_UNLOCKres (ZDR *, NLM4_UNLOCKres*);
289extern bool_t zdr_NLM4_UNLOCKargs (ZDR *, NLM4_UNLOCKargs*);
290extern bool_t zdr_NLM4_LOCKres (ZDR *, NLM4_LOCKres*);
291extern bool_t zdr_NLM4_LOCKargs (ZDR *, NLM4_LOCKargs*);
292extern bool_t zdr_NLM4_GRANTEDargs (ZDR *, NLM4_GRANTEDargs*);
293extern bool_t zdr_NLM4_GRANTEDres (ZDR *, NLM4_GRANTEDres*);
294
295#else /* K&R C */
296extern bool_t zdr_nlm_fh4 ();
297extern bool_t zdr_nlm4_oh ();
298extern bool_t zdr_nlm_cookie ();
299extern bool_t zdr_nlmstat4 ();
300extern bool_t zdr_nlm4_holder ();
301extern bool_t zdr_nlm4_lock ();
302extern bool_t zdr_nlm4_share ();
303extern bool_t zdr_nlm4_testres_denied ();
304extern bool_t zdr_nlm4_testreply ();
305extern bool_t zdr_NLM4_TESTres ();
306extern bool_t zdr_NLM4_TESTargs ();
307extern bool_t zdr_NLM4_CANCres ();
308extern bool_t zdr_NLM4_CANCargs ();
309extern bool_t zdr_NLM4_UNLOCKres ();
310extern bool_t zdr_NLM4_UNLOCKargs ();
311extern bool_t zdr_NLM4_LOCKres ();
312extern bool_t zdr_NLM4_LOCKargs ();
313extern bool_t zdr_NLM4_GRANTEDargs ();
314extern bool_t zdr_NLM4_GRANTEDres ();
315
316#endif /* K&R C */
317
318#ifdef __cplusplus
319}
320#endif
321
322#endif /* !_NLM_H_RPCGEN */