Commit | Line | Data |
---|---|---|
84004dbf RS |
1 | /* |
2 | Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com> | |
3 | ||
4 | This program is free software; you can redistribute it and/or modify | |
5 | it under the terms of the GNU Lesser General Public License as published by | |
6 | the Free Software Foundation; either version 2.1 of the License, or | |
7 | (at your option) any later version. | |
8 | ||
9 | This program is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | GNU Lesser General Public License for more details. | |
13 | ||
14 | You should have received a copy of the GNU Lesser General Public License | |
15 | along with this program; if not, see <http://www.gnu.org/licenses/>. | |
16 | */ | |
17 | /* | |
18 | * This is the lowlevel interface to access NFS resources. | |
19 | * Through this interface you have access to the full gamut of nfs and nfs related | |
20 | * protocol as well as the XDR encoded/decoded structures. | |
21 | */ | |
f9bb21ad RS |
22 | #ifndef _LIBNFS_RAW_H_ |
23 | #define _LIBNFS_RAW_H_ | |
24 | ||
84004dbf | 25 | #include <stdint.h> |
e803ae57 | 26 | #include <nfsc/libnfs-zdr.h> |
84004dbf | 27 | |
4641d36e AR |
28 | #ifdef __cplusplus |
29 | extern "C" { | |
30 | #endif | |
31 | ||
84004dbf RS |
32 | struct rpc_data { |
33 | int size; | |
34 | unsigned char *data; | |
35 | }; | |
36 | ||
37 | struct rpc_context; | |
38 | struct rpc_context *rpc_init_context(void); | |
39 | void rpc_destroy_context(struct rpc_context *rpc); | |
40 | ||
67ba2239 | 41 | void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth); |
84004dbf RS |
42 | |
43 | int rpc_get_fd(struct rpc_context *rpc); | |
44 | int rpc_which_events(struct rpc_context *rpc); | |
45 | int rpc_service(struct rpc_context *rpc, int revents); | |
46 | char *rpc_get_error(struct rpc_context *rpc); | |
83aa785d | 47 | int rpc_queue_length(struct rpc_context *rpc); |
84004dbf | 48 | |
fa3c25be RS |
49 | /* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL |
50 | * calls on a NFS context. | |
51 | */ | |
52 | struct rpc_context *nfs_get_rpc_context(struct nfs_context *nfs); | |
53 | ||
54 | /* This function returns the nfs_fh3 structure from a nfsfh structure. | |
55 | This allows to use a file onened with nfs_open() together with low-level | |
56 | rpc functions that thake a nfs filehandle | |
57 | */ | |
58 | struct nfs_fh3 *nfs_get_fh(struct nfsfh *nfsfh); | |
84004dbf | 59 | |
3b943d2f RS |
60 | /* Control what the next XID value to be used on the context will be. |
61 | This can be used when multiple contexts are used to the same server | |
62 | to avoid that the two contexts have xid collissions. | |
63 | */ | |
64 | void rpc_set_next_xid(struct rpc_context *rpc, uint32_t xid); | |
65 | ||
6ec481d3 RS |
66 | /* This function can be used to set the file descriptor used for |
67 | * the RPC context. It is primarily useful when emulating dup2() | |
68 | * and similar or where you want full control of the filedescriptor numbers | |
69 | * used by the rpc socket. | |
70 | * | |
71 | * ... | |
72 | * oldfd = rpc_get_fd(rpc); | |
73 | * dup2(oldfd, newfd); | |
74 | * rpc_set_fd(rpc, newfd); | |
75 | * close(oldfd); | |
76 | * ... | |
77 | */ | |
78 | void rpc_set_fd(struct rpc_context *rpc, int fd); | |
79 | ||
84004dbf RS |
80 | #define RPC_STATUS_SUCCESS 0 |
81 | #define RPC_STATUS_ERROR 1 | |
82 | #define RPC_STATUS_CANCEL 2 | |
83 | ||
84004dbf RS |
84 | /* |
85 | * Async connection to the tcp port at server:port. | |
86 | * Function returns | |
87 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
88 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
89 | * | |
90 | * When the callback is invoked, status indicates the result: | |
91 | * RPC_STATUS_SUCCESS : The tcp connection was successfully established. | |
92 | * data is NULL. | |
93 | * RPC_STATUS_ERROR : The connection failed to establish. | |
94 | * data is the erro string. | |
95 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
96 | * : data is NULL. | |
97 | */ | |
98 | int rpc_connect_async(struct rpc_context *rpc, const char *server, int port, rpc_cb cb, void *private_data); | |
8733f38d RS |
99 | /* |
100 | * Async function to connect to a specific RPC program/version | |
101 | * Function returns | |
102 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
103 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
104 | * | |
105 | * When the callback is invoked, status indicates the result: | |
106 | * RPC_STATUS_SUCCESS : The tcp connection was successfully established. | |
107 | * data is NULL. | |
108 | * RPC_STATUS_ERROR : The connection failed to establish. | |
109 | * data is the erro string. | |
110 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
111 | * : data is NULL. | |
112 | */ | |
f694a287 | 113 | int rpc_connect_program_async(struct rpc_context *rpc, const char *server, int program, int version, rpc_cb cb, void *private_data); |
84004dbf RS |
114 | /* |
115 | * When disconnecting a connection in flight. All commands in flight will be called with the callback | |
116 | * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection. | |
117 | */ | |
118 | int rpc_disconnect(struct rpc_context *rpc, char *error); | |
119 | ||
84004dbf | 120 | |
3751901f | 121 | /* |
0f0e352f | 122 | * PORTMAP v2 FUNCTIONS |
84004dbf RS |
123 | */ |
124 | ||
125 | /* | |
0f0e352f | 126 | * Call PORTMAPPER2/NULL |
84004dbf RS |
127 | * Function returns |
128 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
129 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
130 | * | |
131 | * When the callback is invoked, status indicates the result: | |
132 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
133 | * data is NULL. | |
134 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
135 | * data is the error string. | |
136 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
137 | * data is NULL. | |
138 | */ | |
0f0e352f | 139 | EXTERN int rpc_pmap2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
140 | |
141 | ||
142 | /* | |
0f0e352f | 143 | * Call PORTMAPPER2/GETPORT. |
84004dbf RS |
144 | * Function returns |
145 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
146 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
147 | * | |
148 | * When the callback is invoked, status indicates the result: | |
149 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
150 | * data is a (uint32_t *), containing the port returned. | |
151 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
152 | * data is the error string. | |
153 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
154 | * data is NULL. | |
155 | */ | |
0f0e352f | 156 | EXTERN int rpc_pmap2_getport_async(struct rpc_context *rpc, int program, int version, int protocol, rpc_cb cb, void *private_data); |
84004dbf | 157 | |
1fbe4080 | 158 | /* |
0f0e352f | 159 | * Call PORTMAPPER2/SET |
1fbe4080 RS |
160 | * Function returns |
161 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
162 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
163 | * | |
164 | * When the callback is invoked, status indicates the result: | |
165 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
166 | * data is a (uint32_t *), containing status | |
167 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
168 | * data is the error string. | |
169 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
170 | * data is NULL. | |
171 | */ | |
0f0e352f | 172 | EXTERN int rpc_pmap2_set_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data); |
1fbe4080 RS |
173 | |
174 | /* | |
0f0e352f | 175 | * Call PORTMAPPER2/UNSET |
1fbe4080 RS |
176 | * Function returns |
177 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
178 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
179 | * | |
180 | * When the callback is invoked, status indicates the result: | |
181 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
182 | * data is a (uint32_t *), containing status | |
183 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
184 | * data is the error string. | |
185 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
186 | * data is NULL. | |
187 | */ | |
0f0e352f | 188 | EXTERN int rpc_pmap2_unset_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data); |
84004dbf | 189 | |
8ae943f6 | 190 | /* |
0f0e352f | 191 | * Call PORTMAPPER2/DUMP. |
8ae943f6 RS |
192 | * Function returns |
193 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
194 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
195 | * | |
196 | * When the callback is invoked, status indicates the result: | |
197 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
4edd7830 | 198 | * data is struct pmap2_dump_result. |
8ae943f6 RS |
199 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. |
200 | * data is the error string. | |
201 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
202 | * data is NULL. | |
203 | */ | |
0f0e352f | 204 | EXTERN int rpc_pmap2_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
8ae943f6 | 205 | |
fd59fd0d | 206 | /* |
0f0e352f | 207 | * Call PORTMAPPER2/CALLIT. |
fd59fd0d RS |
208 | * Function returns |
209 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
210 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
211 | * | |
212 | * When the callback is invoked, status indicates the result: | |
213 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon | |
214 | * data is a 'pmap_call_result' pointer. | |
215 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
216 | * data is the error string. | |
217 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
218 | * data is NULL. | |
219 | */ | |
0f0e352f | 220 | EXTERN int rpc_pmap2_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data); |
84004dbf | 221 | |
4edd7830 RS |
222 | /* |
223 | * PORTMAP v3 FUNCTIONS | |
224 | */ | |
225 | ||
226 | /* | |
227 | * Call PORTMAPPER3/NULL | |
228 | * Function returns | |
229 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
230 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
231 | * | |
232 | * When the callback is invoked, status indicates the result: | |
233 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
234 | * data is NULL. | |
235 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
236 | * data is the error string. | |
237 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
238 | * data is NULL. | |
239 | */ | |
240 | EXTERN int rpc_pmap3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
241 | ||
d731e94c RS |
242 | /* |
243 | * Call PORTMAPPER3/SET. | |
244 | * Function returns | |
245 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
246 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
247 | * | |
248 | * When the callback is invoked, status indicates the result: | |
249 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
250 | * data is uint32_t * | |
251 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
252 | * data is the error string. | |
253 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
254 | * data is NULL. | |
255 | */ | |
256 | struct pmap3_mapping; | |
257 | EXTERN int rpc_pmap3_set_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data); | |
258 | ||
259 | /* | |
260 | * Call PORTMAPPER3/UNSET. | |
261 | * Function returns | |
262 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
263 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
264 | * | |
265 | * When the callback is invoked, status indicates the result: | |
266 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
267 | * data is uint32_t * | |
268 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
269 | * data is the error string. | |
270 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
271 | * data is NULL. | |
272 | */ | |
273 | EXTERN int rpc_pmap3_unset_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data); | |
274 | ||
7fbedfde RS |
275 | /* |
276 | * Call PORTMAPPER3/GETADDR. | |
277 | * Function returns | |
278 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
279 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
280 | * | |
281 | * When the callback is invoked, status indicates the result: | |
282 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
283 | * data is struct pmap3_getaddr_result. | |
284 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
285 | * data is the error string. | |
286 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
287 | * data is NULL. | |
288 | */ | |
7fbedfde RS |
289 | EXTERN int rpc_pmap3_getaddr_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data); |
290 | ||
4edd7830 RS |
291 | /* |
292 | * Call PORTMAPPER3/DUMP. | |
293 | * Function returns | |
294 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
295 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
296 | * | |
297 | * When the callback is invoked, status indicates the result: | |
298 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
299 | * data is struct pmap3_dump_result. | |
300 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
301 | * data is the error string. | |
302 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
303 | * data is NULL. | |
304 | */ | |
305 | EXTERN int rpc_pmap3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
306 | ||
5245608a RS |
307 | /* |
308 | * Call PORTMAPPER3/GETTIME. | |
309 | * Function returns | |
310 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
311 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
312 | * | |
313 | * When the callback is invoked, status indicates the result: | |
314 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
315 | * data is a uint32_t *. | |
316 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
317 | * data is the error string. | |
318 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
319 | * data is NULL. | |
320 | */ | |
321 | EXTERN int rpc_pmap3_gettime_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
4edd7830 | 322 | |
3751901f | 323 | /* |
04e90341 | 324 | * MOUNT v3 FUNCTIONS |
84004dbf RS |
325 | */ |
326 | char *mountstat3_to_str(int stat); | |
327 | int mountstat3_to_errno(int error); | |
328 | ||
329 | /* | |
04e90341 | 330 | * Call MOUNT3/NULL |
84004dbf RS |
331 | * Function returns |
332 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
333 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
334 | * | |
335 | * When the callback is invoked, status indicates the result: | |
336 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
337 | * data is NULL. | |
338 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
339 | * data is the error string. | |
340 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
341 | * data is NULL. | |
342 | */ | |
04e90341 | 343 | EXTERN int rpc_mount3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 344 | EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
345 | |
346 | /* | |
04e90341 | 347 | * Call MOUNT3/MNT |
84004dbf RS |
348 | * Function returns |
349 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
350 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
351 | * | |
352 | * When the callback is invoked, status indicates the result: | |
353 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
354 | * data is union mountres3. | |
355 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
356 | * data is the error string. | |
357 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
358 | * data is NULL. | |
359 | */ | |
e94d5a7d AR |
360 | EXTERN int rpc_mount3_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
361 | EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); | |
84004dbf RS |
362 | |
363 | /* | |
04e90341 | 364 | * Call MOUNT3/DUMP |
84004dbf RS |
365 | * Function returns |
366 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
367 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
368 | * | |
369 | * When the callback is invoked, status indicates the result: | |
370 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
371 | * data is a mountlist. | |
372 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
373 | * data is the error string. | |
374 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
375 | * data is NULL. | |
376 | */ | |
04e90341 | 377 | EXTERN int rpc_mount3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 378 | EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
379 | |
380 | /* | |
04e90341 | 381 | * Call MOUNT3/UMNT |
84004dbf RS |
382 | * Function returns |
383 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
384 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
385 | * | |
386 | * When the callback is invoked, status indicates the result: | |
387 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
388 | * data NULL. | |
389 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
390 | * data is the error string. | |
391 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
392 | * data is NULL. | |
393 | */ | |
e94d5a7d AR |
394 | EXTERN int rpc_mount3_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
395 | EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); | |
84004dbf RS |
396 | |
397 | /* | |
04e90341 | 398 | * Call MOUNT3/UMNTALL |
84004dbf RS |
399 | * Function returns |
400 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
401 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
402 | * | |
403 | * When the callback is invoked, status indicates the result: | |
404 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
405 | * data NULL. | |
406 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
407 | * data is the error string. | |
408 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
409 | * data is NULL. | |
410 | */ | |
04e90341 | 411 | EXTERN int rpc_mount3_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 412 | EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
413 | |
414 | /* | |
04e90341 | 415 | * Call MOUNT3/EXPORT |
7f0242ca RS |
416 | * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the |
417 | * returned structures. | |
418 | * | |
84004dbf RS |
419 | * Function returns |
420 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
421 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
422 | * | |
423 | * When the callback is invoked, status indicates the result: | |
424 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
7f0242ca RS |
425 | * data is a pointer to an exports pointer: |
426 | * exports export = *(exports *)data; | |
84004dbf RS |
427 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. |
428 | * data is the error string. | |
429 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
430 | * data is NULL. | |
431 | */ | |
04e90341 | 432 | EXTERN int rpc_mount3_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 433 | EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf | 434 | |
3751901f | 435 | /* |
04e90341 RS |
436 | * MOUNT v1 FUNCTIONS (Used with NFSv2) |
437 | */ | |
438 | /* | |
439 | * Call MOUNT1/NULL | |
440 | * Function returns | |
441 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
442 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
443 | * | |
444 | * When the callback is invoked, status indicates the result: | |
445 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
446 | * data is NULL. | |
447 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
448 | * data is the error string. | |
449 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
450 | * data is NULL. | |
451 | */ | |
452 | EXTERN int rpc_mount1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
453 | ||
454 | /* | |
455 | * Call MOUNT1/MNT | |
456 | * Function returns | |
457 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
458 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
459 | * | |
460 | * When the callback is invoked, status indicates the result: | |
461 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
462 | * data is union mountres1. | |
463 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
464 | * data is the error string. | |
465 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
466 | * data is NULL. | |
467 | */ | |
e94d5a7d | 468 | EXTERN int rpc_mount1_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
04e90341 RS |
469 | |
470 | /* | |
471 | * Call MOUNT1/DUMP | |
472 | * Function returns | |
473 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
474 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
475 | * | |
476 | * When the callback is invoked, status indicates the result: | |
477 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
478 | * data is a mountlist. | |
479 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
480 | * data is the error string. | |
481 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
482 | * data is NULL. | |
483 | */ | |
484 | EXTERN int rpc_mount1_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
84004dbf | 485 | |
04e90341 RS |
486 | /* |
487 | * Call MOUNT1/UMNT | |
488 | * Function returns | |
489 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
490 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
491 | * | |
492 | * When the callback is invoked, status indicates the result: | |
493 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
494 | * data NULL. | |
495 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
496 | * data is the error string. | |
497 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
498 | * data is NULL. | |
499 | */ | |
e94d5a7d | 500 | EXTERN int rpc_mount1_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
04e90341 RS |
501 | |
502 | /* | |
503 | * Call MOUNT1/UMNTALL | |
504 | * Function returns | |
505 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
506 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
507 | * | |
508 | * When the callback is invoked, status indicates the result: | |
509 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
510 | * data NULL. | |
511 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
512 | * data is the error string. | |
513 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
514 | * data is NULL. | |
515 | */ | |
516 | EXTERN int rpc_mount1_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
517 | ||
518 | /* | |
519 | * Call MOUNT1/EXPORT | |
520 | * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the | |
521 | * returned structures. | |
522 | * | |
523 | * Function returns | |
524 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
525 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
526 | * | |
527 | * When the callback is invoked, status indicates the result: | |
528 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
529 | * data is a pointer to an exports pointer: | |
530 | * exports export = *(exports *)data; | |
531 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
532 | * data is the error string. | |
533 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
534 | * data is NULL. | |
535 | */ | |
536 | EXTERN int rpc_mount1_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
84004dbf RS |
537 | |
538 | ||
3751901f | 539 | /* |
463d59bf | 540 | * NFS v3 FUNCTIONS |
84004dbf RS |
541 | */ |
542 | struct nfs_fh3; | |
543 | char *nfsstat3_to_str(int error); | |
544 | int nfsstat3_to_errno(int error); | |
545 | ||
546 | /* | |
463d59bf | 547 | * Call NFS3/NULL |
84004dbf RS |
548 | * Function returns |
549 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
550 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
551 | * | |
552 | * When the callback is invoked, status indicates the result: | |
553 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
554 | * data is NULL. | |
555 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
556 | * data is the error string. | |
557 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
558 | * data is NULL. | |
559 | */ | |
463d59bf | 560 | EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 561 | EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
562 | |
563 | /* | |
463d59bf | 564 | * Call NFS3/GETATTR |
84004dbf RS |
565 | * Function returns |
566 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
567 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
568 | * | |
569 | * When the callback is invoked, status indicates the result: | |
570 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
571 | * data is GETATTR3res | |
572 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
573 | * data is the error string. | |
574 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
575 | * data is NULL. | |
576 | */ | |
463d59bf RS |
577 | struct GETATTR3args; |
578 | EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data); | |
21668dce | 579 | EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
84004dbf | 580 | |
6f914247 | 581 | /* |
463d59bf | 582 | * Call NFS3/PATHCONF |
6f914247 RS |
583 | * Function returns |
584 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
585 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
586 | * | |
587 | * When the callback is invoked, status indicates the result: | |
588 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
589 | * data is PATHCONF3res | |
590 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
591 | * data is the error string. | |
592 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
593 | * data is NULL. | |
594 | */ | |
463d59bf RS |
595 | struct PATHCONF3args; |
596 | EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data); | |
21668dce | 597 | EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
6f914247 | 598 | |
84004dbf | 599 | /* |
463d59bf | 600 | * Call NFS3/LOOKUP |
84004dbf RS |
601 | * Function returns |
602 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
603 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
604 | * | |
605 | * When the callback is invoked, status indicates the result: | |
606 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
607 | * data is LOOKUP3res | |
608 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
609 | * data is the error string. | |
610 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
611 | * data is NULL. | |
612 | */ | |
463d59bf RS |
613 | struct LOOKUP3args; |
614 | EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data); | |
21668dce | 615 | EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data); |
84004dbf RS |
616 | |
617 | /* | |
463d59bf | 618 | * Call NFS3/ACCESS |
84004dbf RS |
619 | * Function returns |
620 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
621 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
622 | * | |
623 | * When the callback is invoked, status indicates the result: | |
624 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
625 | * data is ACCESS3res | |
626 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
627 | * data is the error string. | |
628 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
629 | * data is NULL. | |
630 | */ | |
463d59bf RS |
631 | struct ACCESS3args; |
632 | EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data); | |
21668dce | 633 | EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data); |
84004dbf RS |
634 | |
635 | /* | |
463d59bf | 636 | * Call NFS3/READ |
84004dbf RS |
637 | * Function returns |
638 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
639 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
640 | * | |
641 | * When the callback is invoked, status indicates the result: | |
642 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
b426ef04 | 643 | * data is READ3res |
84004dbf RS |
644 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. |
645 | * data is the error string. | |
646 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
647 | * data is NULL. | |
648 | */ | |
463d59bf RS |
649 | struct READ3args; |
650 | EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data); | |
21668dce | 651 | EXTERN int rpc_nfs_read_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, uint64_t offset, uint64_t count, void *private_data); |
84004dbf RS |
652 | |
653 | /* | |
463d59bf | 654 | * Call NFS3/WRITE |
84004dbf RS |
655 | * Function returns |
656 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
657 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
658 | * | |
659 | * When the callback is invoked, status indicates the result: | |
660 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
661 | * data is WRITE3res * | |
662 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
663 | * data is the error string. | |
664 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
665 | * data is NULL. | |
666 | */ | |
463d59bf RS |
667 | struct WRITE3args; |
668 | EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data); | |
21668dce | 669 | EXTERN int rpc_nfs_write_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *buf, uint64_t offset, uint64_t count, int stable_how, void *private_data); |
84004dbf RS |
670 | |
671 | /* | |
463d59bf | 672 | * Call NFS3/COMMIT |
84004dbf RS |
673 | * Function returns |
674 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
675 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
676 | * | |
677 | * When the callback is invoked, status indicates the result: | |
678 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
679 | * data is COMMIT3res * | |
680 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
681 | * data is the error string. | |
682 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
683 | * data is NULL. | |
684 | */ | |
463d59bf RS |
685 | struct COMMIT3args; |
686 | EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data); | |
21668dce | 687 | EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
84004dbf | 688 | |
84004dbf | 689 | /* |
463d59bf | 690 | * Call NFS3/SETATTR |
84004dbf RS |
691 | * Function returns |
692 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
693 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
694 | * | |
695 | * When the callback is invoked, status indicates the result: | |
696 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
697 | * data is SETATTR3res * | |
698 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
699 | * data is the error string. | |
700 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
701 | * data is NULL. | |
702 | */ | |
703 | struct SETATTR3args; | |
463d59bf | 704 | EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data); |
21668dce | 705 | EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data); |
84004dbf | 706 | |
84004dbf | 707 | /* |
463d59bf | 708 | * Call NFS3/MKDIR |
84004dbf RS |
709 | * Function returns |
710 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
711 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
712 | * | |
713 | * When the callback is invoked, status indicates the result: | |
714 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
715 | * data is MKDIR3res * | |
716 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
717 | * data is the error string. | |
718 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
719 | * data is NULL. | |
720 | */ | |
7edc9026 | 721 | struct MKDIR3args; |
463d59bf | 722 | EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data); |
21668dce | 723 | EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data); |
84004dbf | 724 | |
84004dbf | 725 | /* |
463d59bf | 726 | * Call NFS3/RMDIR |
84004dbf RS |
727 | * Function returns |
728 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
729 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
730 | * | |
731 | * When the callback is invoked, status indicates the result: | |
732 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
733 | * data is RMDIR3res * | |
734 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
735 | * data is the error string. | |
736 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
737 | * data is NULL. | |
738 | */ | |
463d59bf RS |
739 | struct RMDIR3args; |
740 | EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data); | |
21668dce | 741 | EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data); |
84004dbf | 742 | |
84004dbf | 743 | /* |
463d59bf | 744 | * Call NFS3/CREATE |
84004dbf RS |
745 | * Function returns |
746 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
747 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
748 | * | |
749 | * When the callback is invoked, status indicates the result: | |
750 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
751 | * data is CREATE3res * | |
752 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
753 | * data is the error string. | |
754 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
755 | * data is NULL. | |
756 | */ | |
c985c015 | 757 | struct CREATE3args; |
463d59bf | 758 | EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data); |
21668dce | 759 | EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data); |
84004dbf | 760 | |
1ec6b50a | 761 | /* |
463d59bf | 762 | * Call NFS3/MKNOD |
1ec6b50a RS |
763 | * Function returns |
764 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
765 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
766 | * | |
767 | * When the callback is invoked, status indicates the result: | |
768 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
769 | * data is MKNOD3res * | |
770 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
771 | * data is the error string. | |
772 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
773 | * data is NULL. | |
774 | */ | |
463d59bf RS |
775 | struct MKNOD3args; |
776 | EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data); | |
21668dce | 777 | EXTERN int rpc_nfs_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *file, int mode, int major, int minor, void *private_data); |
84004dbf | 778 | |
84004dbf | 779 | /* |
463d59bf | 780 | * Call NFS3/REMOVE |
84004dbf RS |
781 | * Function returns |
782 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
783 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
784 | * | |
785 | * When the callback is invoked, status indicates the result: | |
786 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
787 | * data is REMOVE3res * | |
788 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
789 | * data is the error string. | |
790 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
791 | * data is NULL. | |
792 | */ | |
463d59bf RS |
793 | struct REMOVE3args; |
794 | EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data); | |
21668dce | 795 | EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data); |
84004dbf | 796 | |
84004dbf | 797 | /* |
463d59bf | 798 | * Call NFS3/READDIR |
84004dbf RS |
799 | * Function returns |
800 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
801 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
802 | * | |
803 | * When the callback is invoked, status indicates the result: | |
804 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
805 | * data is READDIR3res * | |
806 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
807 | * data is the error string. | |
808 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
809 | * data is NULL. | |
810 | */ | |
463d59bf RS |
811 | struct READDIR3args; |
812 | EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data); | |
21668dce | 813 | EXTERN int rpc_nfs_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, uint64_t cookie, char *cookieverf, int count, void *private_data); |
84004dbf | 814 | |
f390f181 | 815 | /* |
463d59bf | 816 | * Call NFS3/READDIRPLUS |
f390f181 RS |
817 | * Function returns |
818 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
819 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
820 | * | |
821 | * When the callback is invoked, status indicates the result: | |
822 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
823 | * data is READDIRPLUS3res * | |
824 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
825 | * data is the error string. | |
826 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
827 | * data is NULL. | |
828 | */ | |
463d59bf RS |
829 | struct READDIRPLUS3args; |
830 | EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data); | |
21668dce | 831 | EXTERN int rpc_nfs_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, uint64_t cookie, char *cookieverf, int count, void *private_data); |
f390f181 | 832 | |
84004dbf | 833 | /* |
463d59bf | 834 | * Call NFS3/FSSTAT |
84004dbf RS |
835 | * Function returns |
836 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
837 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
838 | * | |
839 | * When the callback is invoked, status indicates the result: | |
840 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
841 | * data is FSSTAT3res | |
842 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
843 | * data is the error string. | |
844 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
845 | * data is NULL. | |
846 | */ | |
463d59bf RS |
847 | struct FSSTAT3args; |
848 | EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data); | |
21668dce | 849 | EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
84004dbf | 850 | |
1058201e | 851 | /* |
463d59bf | 852 | * Call NFS3/FSINFO |
1058201e RS |
853 | * Function returns |
854 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
855 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
856 | * | |
857 | * When the callback is invoked, status indicates the result: | |
858 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
859 | * data is FSINFO3res | |
860 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
861 | * data is the error string. | |
862 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
863 | * data is NULL. | |
864 | */ | |
463d59bf RS |
865 | struct FSINFO3args; |
866 | EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data); | |
21668dce | 867 | EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
1058201e | 868 | |
84004dbf | 869 | /* |
463d59bf | 870 | * Call NFS3/READLINK |
84004dbf RS |
871 | * Function returns |
872 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
873 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
874 | * | |
875 | * When the callback is invoked, status indicates the result: | |
876 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
877 | * data is READLINK3res * | |
878 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
879 | * data is the error string. | |
880 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
881 | * data is NULL. | |
882 | */ | |
16104b27 | 883 | struct READLINK3args; |
463d59bf | 884 | EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data); |
21668dce | 885 | EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data); |
84004dbf | 886 | |
84004dbf | 887 | /* |
463d59bf | 888 | * Call NFS3/SYMLINK |
84004dbf RS |
889 | * Function returns |
890 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
891 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
892 | * | |
893 | * When the callback is invoked, status indicates the result: | |
894 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
895 | * data is SYMLINK3res * | |
896 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
897 | * data is the error string. | |
898 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
899 | * data is NULL. | |
900 | */ | |
8e255816 | 901 | struct SYMLINK3args; |
463d59bf | 902 | EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data); |
21668dce | 903 | EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data); |
84004dbf | 904 | |
84004dbf | 905 | /* |
463d59bf | 906 | * Call NFS3/RENAME |
84004dbf RS |
907 | * Function returns |
908 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
909 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
910 | * | |
911 | * When the callback is invoked, status indicates the result: | |
912 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
913 | * data is RENAME3res * | |
914 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
915 | * data is the error string. | |
916 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
917 | * data is NULL. | |
918 | */ | |
463d59bf RS |
919 | struct RENAME3args; |
920 | EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data); | |
21668dce | 921 | EXTERN int rpc_nfs_rename_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *olddir, char *oldname, struct nfs_fh3 *newdir, char *newname, void *private_data); |
84004dbf | 922 | |
84004dbf | 923 | /* |
463d59bf | 924 | * Call NFS3/LINK |
84004dbf RS |
925 | * Function returns |
926 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
927 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
928 | * | |
929 | * When the callback is invoked, status indicates the result: | |
930 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
931 | * data is LINK3res * | |
932 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
933 | * data is the error string. | |
934 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
935 | * data is NULL. | |
936 | */ | |
463d59bf RS |
937 | struct LINK3args; |
938 | EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data); | |
21668dce | 939 | EXTERN int rpc_nfs_link_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *file, struct nfs_fh3 *newdir, char *newname, void *private_data); |
84004dbf | 940 | |
3751901f | 941 | /* |
f38aacf8 RS |
942 | * NFS v2 FUNCTIONS |
943 | */ | |
944 | ||
945 | /* | |
946 | * Call NFS2/NULL | |
947 | * Function returns | |
948 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
949 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
950 | * | |
951 | * When the callback is invoked, status indicates the result: | |
952 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
953 | * data is NULL. | |
954 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
955 | * data is the error string. | |
956 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
957 | * data is NULL. | |
958 | */ | |
959 | EXTERN int rpc_nfs2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
960 | ||
961 | /* | |
962 | * Call NFS2/GETATTR | |
963 | * Function returns | |
964 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
965 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
966 | * | |
967 | * When the callback is invoked, status indicates the result: | |
968 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
969 | * data is GETATTR2res | |
970 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
971 | * data is the error string. | |
972 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
973 | * data is NULL. | |
974 | */ | |
975 | struct GETATTR2args; | |
976 | EXTERN int rpc_nfs2_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR2args *args, void *private_data); | |
977 | ||
978 | /* | |
979 | * Call NFS2/SETATTR | |
980 | * Function returns | |
981 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
982 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
983 | * | |
984 | * When the callback is invoked, status indicates the result: | |
985 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
986 | * data is SETATTR2res * | |
987 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
988 | * data is the error string. | |
989 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
990 | * data is NULL. | |
991 | */ | |
992 | struct SETATTR2args; | |
993 | EXTERN int rpc_nfs2_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR2args *args, void *private_data); | |
994 | ||
995 | /* | |
996 | * Call NFS2/LOOKUP | |
997 | * Function returns | |
998 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
999 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1000 | * | |
1001 | * When the callback is invoked, status indicates the result: | |
1002 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1003 | * data is LOOKUP2res | |
1004 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1005 | * data is the error string. | |
1006 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1007 | * data is NULL. | |
1008 | */ | |
1009 | struct LOOKUP2args; | |
1010 | EXTERN int rpc_nfs2_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP2args *args, void *private_data); | |
1011 | ||
1012 | /* | |
1013 | * Call NFS2/READLINK | |
1014 | * Function returns | |
1015 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1016 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1017 | * | |
1018 | * When the callback is invoked, status indicates the result: | |
1019 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1020 | * data is READLINK2res * | |
1021 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1022 | * data is the error string. | |
1023 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1024 | * data is NULL. | |
1025 | */ | |
1026 | struct READLINK2args; | |
1027 | EXTERN int rpc_nfs32_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK2args *args, void *private_data); | |
1028 | ||
1029 | /* | |
1030 | * Call NFS2/READ | |
1031 | * Function returns | |
1032 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1033 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1034 | * | |
1035 | * When the callback is invoked, status indicates the result: | |
1036 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1037 | * data is READ2res | |
1038 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1039 | * data is the error string. | |
1040 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1041 | * data is NULL. | |
1042 | */ | |
1043 | struct READ2args; | |
1044 | EXTERN int rpc_nfs2_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ2args *args, void *private_data); | |
1045 | ||
1046 | /* | |
1047 | * Call NFS2/WRITE | |
1048 | * Function returns | |
1049 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1050 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1051 | * | |
1052 | * When the callback is invoked, status indicates the result: | |
1053 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1054 | * data is WRITE2res * | |
1055 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1056 | * data is the error string. | |
1057 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1058 | * data is NULL. | |
1059 | */ | |
1060 | struct WRITE2args; | |
1061 | EXTERN int rpc_nfs2_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE2args *args, void *private_data); | |
1062 | ||
1063 | /* | |
1064 | * Call NFS2/CREATE | |
1065 | * Function returns | |
1066 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1067 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1068 | * | |
1069 | * When the callback is invoked, status indicates the result: | |
1070 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1071 | * data is CREATE2res * | |
1072 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1073 | * data is the error string. | |
1074 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1075 | * data is NULL. | |
1076 | */ | |
1077 | struct CREATE2args; | |
1078 | EXTERN int rpc_nfs2_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE2args *args, void *private_data); | |
1079 | ||
1080 | /* | |
1081 | * Call NFS2/REMOVE | |
1082 | * Function returns | |
1083 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1084 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1085 | * | |
1086 | * When the callback is invoked, status indicates the result: | |
1087 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1088 | * data is REMOVE2res * | |
1089 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1090 | * data is the error string. | |
1091 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1092 | * data is NULL. | |
1093 | */ | |
1094 | struct REMOVE2args; | |
1095 | EXTERN int rpc_nfs2_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE2args *args, void *private_data); | |
1096 | ||
1097 | /* | |
1098 | * Call NFS2/RENAME | |
1099 | * Function returns | |
1100 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1101 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1102 | * | |
1103 | * When the callback is invoked, status indicates the result: | |
1104 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1105 | * data is RENAME2res * | |
1106 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1107 | * data is the error string. | |
1108 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1109 | * data is NULL. | |
1110 | */ | |
1111 | struct RENAME2args; | |
1112 | EXTERN int rpc_nfs2_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME2args *args, void *private_data); | |
1113 | ||
1114 | /* | |
1115 | * Call NFS2/LINK | |
1116 | * Function returns | |
1117 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1118 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1119 | * | |
1120 | * When the callback is invoked, status indicates the result: | |
1121 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1122 | * data is LINK2res * | |
1123 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1124 | * data is the error string. | |
1125 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1126 | * data is NULL. | |
1127 | */ | |
1128 | struct LINK2args; | |
1129 | EXTERN int rpc_nfs2_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK2args *args, void *private_data); | |
1130 | ||
1131 | /* | |
1132 | * Call NFS2/SYMLINK | |
1133 | * Function returns | |
1134 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1135 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1136 | * | |
1137 | * When the callback is invoked, status indicates the result: | |
1138 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1139 | * data is SYMLINK2res * | |
1140 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1141 | * data is the error string. | |
1142 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1143 | * data is NULL. | |
1144 | */ | |
1145 | struct SYMLINK2args; | |
1146 | EXTERN int rpc_nfs2_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK2args *args, void *private_data); | |
1147 | ||
1148 | /* | |
1149 | * Call NFS2/MKDIR | |
1150 | * Function returns | |
1151 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1152 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1153 | * | |
1154 | * When the callback is invoked, status indicates the result: | |
1155 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1156 | * data is MKDIR2res * | |
1157 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1158 | * data is the error string. | |
1159 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1160 | * data is NULL. | |
1161 | */ | |
1162 | struct MKDIR2args; | |
1163 | EXTERN int rpc_nfs2_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR2args *args, void *private_data); | |
1164 | ||
1165 | /* | |
1166 | * Call NFS2/RMDIR | |
1167 | * Function returns | |
1168 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1169 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1170 | * | |
1171 | * When the callback is invoked, status indicates the result: | |
1172 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1173 | * data is RMDIR2res * | |
1174 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1175 | * data is the error string. | |
1176 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1177 | * data is NULL. | |
1178 | */ | |
1179 | struct RMDIR2args; | |
1180 | EXTERN int rpc_nfs2_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR2args *args, void *private_data); | |
1181 | ||
1182 | /* | |
1183 | * Call NFS2/READDIR | |
1184 | * Function returns | |
1185 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1186 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1187 | * | |
1188 | * When the callback is invoked, status indicates the result: | |
1189 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1190 | * data is READDIR2res * | |
1191 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1192 | * data is the error string. | |
1193 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1194 | * data is NULL. | |
1195 | */ | |
1196 | struct READDIR2args; | |
1197 | EXTERN int rpc_nfs2_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR2args *args, void *private_data); | |
1198 | ||
1199 | /* | |
1200 | * Call NFS2/STATFS | |
1201 | * Function returns | |
1202 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1203 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1204 | * | |
1205 | * When the callback is invoked, status indicates the result: | |
1206 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1207 | * data is STATFS2res * | |
1208 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1209 | * data is the error string. | |
1210 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1211 | * data is NULL. | |
1212 | */ | |
1213 | struct STATFS2args; | |
1214 | EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data); | |
84004dbf | 1215 | |
3751901f | 1216 | /* |
05a777d9 RS |
1217 | * RQUOTA FUNCTIONS |
1218 | */ | |
1219 | char *rquotastat_to_str(int error); | |
1220 | int rquotastat_to_errno(int error); | |
1221 | ||
1222 | /* | |
1223 | * Call RQUOTA1/NULL | |
1224 | * Function returns | |
1225 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1226 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1227 | * | |
1228 | * When the callback is invoked, status indicates the result: | |
1229 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1230 | * data is NULL. | |
1231 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1232 | * data is the error string. | |
1233 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1234 | * data is NULL. | |
1235 | */ | |
21668dce | 1236 | EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
05a777d9 RS |
1237 | |
1238 | /* | |
1239 | * Call RQUOTA1/GETQUOTA | |
1240 | * Function returns | |
1241 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1242 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1243 | * | |
1244 | * When the callback is invoked, status indicates the result: | |
1245 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1246 | * data is a RQUOTA1res structure. | |
1247 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1248 | * data is the error string. | |
1249 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1250 | * data is NULL. | |
1251 | */ | |
e94d5a7d | 1252 | EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data); |
19e74f5a RS |
1253 | |
1254 | /* | |
1255 | * Call RQUOTA1/GETACTIVEQUOTA | |
1256 | * Function returns | |
1257 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1258 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1259 | * | |
1260 | * When the callback is invoked, status indicates the result: | |
1261 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1262 | * data is a RQUOTA1res structure. | |
1263 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1264 | * data is the error string. | |
1265 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1266 | * data is NULL. | |
1267 | */ | |
e94d5a7d | 1268 | EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data); |
77c23b46 RS |
1269 | |
1270 | ||
1271 | ||
1272 | ||
1273 | /* | |
1274 | * Call RQUOTA2/NULL | |
1275 | * Function returns | |
1276 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1277 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1278 | * | |
1279 | * When the callback is invoked, status indicates the result: | |
1280 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1281 | * data is NULL. | |
1282 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1283 | * data is the error string. | |
1284 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1285 | * data is NULL. | |
1286 | */ | |
1287 | int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
1288 | ||
1289 | /* | |
1290 | * Call RQUOTA2/GETQUOTA | |
1291 | * Function returns | |
1292 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1293 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1294 | * | |
1295 | * When the callback is invoked, status indicates the result: | |
1296 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1297 | * data is a RQUOTA1res structure. | |
1298 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1299 | * data is the error string. | |
1300 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1301 | * data is NULL. | |
1302 | */ | |
e94d5a7d | 1303 | int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data); |
77c23b46 RS |
1304 | |
1305 | /* | |
1306 | * Call RQUOTA2/GETACTIVEQUOTA | |
1307 | * Function returns | |
1308 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1309 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1310 | * | |
1311 | * When the callback is invoked, status indicates the result: | |
1312 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1313 | * data is a RQUOTA1res structure. | |
1314 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1315 | * data is the error string. | |
1316 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1317 | * data is NULL. | |
1318 | */ | |
e94d5a7d | 1319 | int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data); |
3847f8f6 RS |
1320 | |
1321 | ||
1322 | ||
6916a665 RS |
1323 | |
1324 | ||
1325 | ||
1326 | /* | |
3751901f | 1327 | * NFSACL functions |
6916a665 RS |
1328 | */ |
1329 | ||
3847f8f6 RS |
1330 | /* |
1331 | * Call NFSACL/NULL | |
1332 | * Call the NULL procedure for the NFSACL | |
1333 | * | |
1334 | * Function returns | |
1335 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1336 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1337 | * | |
1338 | * When the callback is invoked, status indicates the result: | |
1339 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1340 | * data is NULL | |
1341 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1342 | * data is the error string. | |
1343 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1344 | * data is NULL. | |
1345 | */ | |
21668dce | 1346 | EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
3847f8f6 RS |
1347 | |
1348 | /* | |
1349 | * Call NFSACL/GETACL | |
1350 | * | |
1351 | * Function returns | |
1352 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1353 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1354 | * | |
1355 | * When the callback is invoked, status indicates the result: | |
fa3c25be | 1356 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. |
3847f8f6 | 1357 | * data is a GETACL3res pointer |
fa3c25be | 1358 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. |
3847f8f6 RS |
1359 | * data is the error string. |
1360 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1361 | * data is NULL. | |
1362 | */ | |
0118a5f0 | 1363 | struct GETACL3args; |
21668dce | 1364 | EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data); |
3847f8f6 | 1365 | |
fa3c25be RS |
1366 | |
1367 | ||
1368 | /* | |
1369 | * Call NFSACL/SETACL | |
1370 | * | |
1371 | * Function returns | |
1372 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1373 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1374 | * | |
1375 | * When the callback is invoked, status indicates the result: | |
1376 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1377 | * data is a SETACL3res pointer | |
1378 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1379 | * data is the error string. | |
1380 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1381 | * data is NULL. | |
1382 | */ | |
1383 | struct SETACL3args; | |
21668dce | 1384 | EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data); |
6916a665 RS |
1385 | |
1386 | ||
1387 | ||
1388 | ||
1389 | /* | |
1390 | * NLM functions | |
1391 | */ | |
1392 | char *nlmstat4_to_str(int stat); | |
3751901f | 1393 | |
6916a665 RS |
1394 | /* |
1395 | * Call NLM/NULL | |
1396 | * Call the NULL procedure for the NLM protocol | |
1397 | * | |
1398 | * Function returns | |
1399 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1400 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1401 | * | |
1402 | * When the callback is invoked, status indicates the result: | |
1403 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1404 | * data is NULL | |
1405 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1406 | * data is the error string. | |
1407 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1408 | * data is NULL. | |
1409 | */ | |
463d59bf | 1410 | EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
e01ed6a2 RS |
1411 | |
1412 | /* | |
1413 | * Call NLM/TEST | |
1414 | * Call the TEST procedure for the NLM protocol | |
1415 | * | |
1416 | * Function returns | |
1417 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1418 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1419 | * | |
1420 | * When the callback is invoked, status indicates the result: | |
1421 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1422 | * data is NLM4_TESTres | |
1423 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1424 | * data is the error string. | |
1425 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1426 | * data is NULL. | |
1427 | */ | |
1428 | struct NLM4_TESTargs; | |
463d59bf | 1429 | EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data); |
e01ed6a2 | 1430 | |
a171d4da RS |
1431 | /* |
1432 | * Call NLM/LOCK | |
1433 | * Call the LOCK procedure for the NLM protocol | |
1434 | * | |
1435 | * Function returns | |
1436 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1437 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1438 | * | |
1439 | * When the callback is invoked, status indicates the result: | |
1440 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1441 | * data is NLM4_LOCKres | |
1442 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1443 | * data is the error string. | |
1444 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1445 | * data is NULL. | |
1446 | */ | |
1447 | struct NLM4_LOCKargs; | |
463d59bf | 1448 | EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data); |
a171d4da RS |
1449 | |
1450 | /* | |
1451 | * Call NLM/CANCEL | |
1452 | * Call the CANCEL procedure for the NLM protocol | |
1453 | * | |
1454 | * Function returns | |
1455 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1456 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1457 | * | |
1458 | * When the callback is invoked, status indicates the result: | |
1459 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1460 | * data is NLM4_CANCres | |
1461 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1462 | * data is the error string. | |
1463 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1464 | * data is NULL. | |
1465 | */ | |
1466 | struct NLM4_CANCargs; | |
463d59bf | 1467 | EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data); |
a171d4da RS |
1468 | |
1469 | /* | |
1470 | * Call NLM/UNLOCK | |
1471 | * Call the UNLOCK procedure for the NLM protocol | |
1472 | * | |
1473 | * Function returns | |
1474 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1475 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1476 | * | |
1477 | * When the callback is invoked, status indicates the result: | |
1478 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1479 | * data is NLM4_UNLOCKres | |
1480 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1481 | * data is the error string. | |
1482 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1483 | * data is NULL. | |
1484 | */ | |
1485 | struct NLM4_UNLOCKargs; | |
463d59bf | 1486 | EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data); |
f9bb21ad | 1487 | |
ed09b567 RS |
1488 | /* |
1489 | * NSM functions | |
1490 | */ | |
1491 | char *nsmstat1_to_str(int stat); | |
3751901f | 1492 | |
ed09b567 RS |
1493 | /* |
1494 | * Call NSM/NULL | |
1495 | * Call the NULL procedure for the NSM protocol | |
1496 | * | |
1497 | * Function returns | |
1498 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1499 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1500 | * | |
1501 | * When the callback is invoked, status indicates the result: | |
1502 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1503 | * data is NULL | |
1504 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1505 | * data is the error string. | |
1506 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1507 | * data is NULL. | |
1508 | */ | |
463d59bf | 1509 | EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
ed09b567 | 1510 | |
1e7a5136 RS |
1511 | /* |
1512 | * Call NSM/STAT | |
1513 | * Call the STAT procedure for the NSM protocol | |
1514 | * | |
1515 | * Function returns | |
1516 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1517 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1518 | * | |
1519 | * When the callback is invoked, status indicates the result: | |
1520 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1521 | * data is NSM1_STATres | |
1522 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1523 | * data is the error string. | |
1524 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1525 | * data is NULL. | |
1526 | */ | |
1527 | struct NSM1_STATargs; | |
463d59bf | 1528 | EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data); |
1e7a5136 RS |
1529 | |
1530 | /* | |
1531 | * Call NSM/MON | |
1532 | * Call the MON procedure for the NSM protocol | |
1533 | * | |
1534 | * Function returns | |
1535 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1536 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1537 | * | |
1538 | * When the callback is invoked, status indicates the result: | |
1539 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1540 | * data is NSM1_MONres | |
1541 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1542 | * data is the error string. | |
1543 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1544 | * data is NULL. | |
1545 | */ | |
1546 | struct NSM1_MONargs; | |
463d59bf | 1547 | EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data); |
1e7a5136 RS |
1548 | |
1549 | /* | |
1550 | * Call NSM/UNMON | |
1551 | * Call the UNMON procedure for the NSM protocol | |
1552 | * | |
1553 | * Function returns | |
1554 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1555 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1556 | * | |
1557 | * When the callback is invoked, status indicates the result: | |
1558 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1559 | * data is NSM1_UNMONres | |
1560 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1561 | * data is the error string. | |
1562 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1563 | * data is NULL. | |
1564 | */ | |
1565 | struct NSM1_UNMONargs; | |
463d59bf | 1566 | EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data); |
1e7a5136 RS |
1567 | |
1568 | /* | |
1569 | * Call NSM/UNMONALL | |
1570 | * Call the UNMONALL procedure for the NSM protocol | |
1571 | * | |
1572 | * Function returns | |
1573 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1574 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1575 | * | |
1576 | * When the callback is invoked, status indicates the result: | |
1577 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1578 | * data is NSM1_UNMONALLres | |
1579 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1580 | * data is the error string. | |
1581 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1582 | * data is NULL. | |
1583 | */ | |
1584 | struct NSM1_UNMONALLargs; | |
463d59bf | 1585 | EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data); |
1e7a5136 RS |
1586 | |
1587 | /* | |
1588 | * Call NSM/SIMUCRASH | |
1589 | * Call the SIMUCRASH procedure for the NSM protocol | |
1590 | * | |
1591 | * Function returns | |
1592 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1593 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1594 | * | |
1595 | * When the callback is invoked, status indicates the result: | |
1596 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1597 | * data is NULL | |
1598 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1599 | * data is the error string. | |
1600 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1601 | * data is NULL. | |
1602 | */ | |
463d59bf | 1603 | EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
1e7a5136 RS |
1604 | |
1605 | /* | |
1606 | * Call NSM/NOTIFY | |
1607 | * Call the NOTIFY procedure for the NSM protocol | |
1608 | * | |
1609 | * Function returns | |
1610 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1611 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1612 | * | |
1613 | * When the callback is invoked, status indicates the result: | |
1614 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1615 | * data is NULL | |
1616 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1617 | * data is the error string. | |
1618 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1619 | * data is NULL. | |
1620 | */ | |
1621 | struct NSM1_NOTIFYargs; | |
463d59bf | 1622 | EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data); |
ed09b567 | 1623 | |
4641d36e AR |
1624 | #ifdef __cplusplus |
1625 | } | |
1626 | #endif | |
1627 | ||
f9bb21ad | 1628 | #endif |