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