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