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