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