libnfs: Add fstat64, analagous to stat64
[deb_libnfs.git] / include / nfsc / libnfs-raw.h
CommitLineData
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
29extern "C" {
30#endif
31
84004dbf
RS
32struct rpc_data {
33 int size;
34 unsigned char *data;
35};
36
37struct rpc_context;
38struct rpc_context *rpc_init_context(void);
39void rpc_destroy_context(struct rpc_context *rpc);
40
67ba2239 41void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
84004dbf
RS
42
43int rpc_get_fd(struct rpc_context *rpc);
44int rpc_which_events(struct rpc_context *rpc);
45int rpc_service(struct rpc_context *rpc, int revents);
46char *rpc_get_error(struct rpc_context *rpc);
83aa785d 47int 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 */
52struct 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*/
58struct 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 */
64void 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 */
78void 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 */
98int 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 113int 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 */
118int 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 139EXTERN 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 156EXTERN 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 172EXTERN 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 188EXTERN 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 204EXTERN 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
b71f7e82 214 * data is a 'pmap2_call_result' pointer.
fd59fd0d
RS
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 220EXTERN 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 */
240EXTERN 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 */
256struct pmap3_mapping;
257EXTERN 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 */
273EXTERN 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.
24f45c54 283 * data is struct pmap3_string_result.
7fbedfde
RS
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
289EXTERN 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 */
305EXTERN int rpc_pmap3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
306
b71f7e82
RS
307/*
308 * Call PORTMAPPER3/CALLIT.
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 'pmap3_call_result' pointer.
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 */
321EXTERN int rpc_pmap3_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data);
322
5245608a
RS
323/*
324 * Call PORTMAPPER3/GETTIME.
325 * Function returns
326 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
327 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
328 *
329 * When the callback is invoked, status indicates the result:
330 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
331 * data is a uint32_t *.
332 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
333 * data is the error string.
334 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
335 * data is NULL.
336 */
337EXTERN int rpc_pmap3_gettime_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
4edd7830 338
729266a7
RS
339/*
340 * Call PORTMAPPER3/UADDR2TADDR.
341 * Function returns
342 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
343 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
344 *
345 * When the callback is invoked, status indicates the result:
346 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
347 * data is a struct pmap3_netbuf *.
348 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
349 * data is the error string.
350 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
351 * data is NULL.
352 */
353EXTERN int rpc_pmap3_uaddr2taddr_async(struct rpc_context *rpc, char *uaddr, rpc_cb cb, void *private_data);
354
29258a73
RS
355/*
356 * Call PORTMAPPER3/TADDR2UADDR.
357 * Function returns
358 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
359 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
360 *
361 * When the callback is invoked, status indicates the result:
362 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
24f45c54 363 * data is a struct pmap3_string_result *.
29258a73
RS
364 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
365 * data is the error string.
366 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
367 * data is NULL.
368 */
369struct pmap3_netbuf;
370EXTERN int rpc_pmap3_taddr2uaddr_async(struct rpc_context *rpc, struct pmap3_netbuf *netbuf, rpc_cb cb, void *private_data);
371
3751901f 372/*
04e90341 373 * MOUNT v3 FUNCTIONS
84004dbf
RS
374 */
375char *mountstat3_to_str(int stat);
376int mountstat3_to_errno(int error);
377
378/*
04e90341 379 * Call MOUNT3/NULL
84004dbf
RS
380 * Function returns
381 * 0 : The call was initiated. The callback will be invoked when the call completes.
382 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
383 *
384 * When the callback is invoked, status indicates the result:
385 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
386 * data is NULL.
387 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
388 * data is the error string.
389 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
390 * data is NULL.
391 */
04e90341 392EXTERN int rpc_mount3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 393EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
394
395/*
04e90341 396 * Call MOUNT3/MNT
84004dbf
RS
397 * Function returns
398 * 0 : The call was initiated. The callback will be invoked when the call completes.
399 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
400 *
401 * When the callback is invoked, status indicates the result:
402 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
403 * data is union mountres3.
404 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
405 * data is the error string.
406 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
407 * data is NULL.
408 */
e94d5a7d
AR
409EXTERN int rpc_mount3_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
410EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
84004dbf
RS
411
412/*
04e90341 413 * Call MOUNT3/DUMP
84004dbf
RS
414 * Function returns
415 * 0 : The call was initiated. The callback will be invoked when the call completes.
416 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
417 *
418 * When the callback is invoked, status indicates the result:
419 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
420 * data is a mountlist.
421 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
422 * data is the error string.
423 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
424 * data is NULL.
425 */
04e90341 426EXTERN int rpc_mount3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 427EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
428
429/*
04e90341 430 * Call MOUNT3/UMNT
84004dbf
RS
431 * Function returns
432 * 0 : The call was initiated. The callback will be invoked when the call completes.
433 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
434 *
435 * When the callback is invoked, status indicates the result:
436 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
437 * data NULL.
438 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
439 * data is the error string.
440 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
441 * data is NULL.
442 */
e94d5a7d
AR
443EXTERN int rpc_mount3_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
444EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
84004dbf
RS
445
446/*
04e90341 447 * Call MOUNT3/UMNTALL
84004dbf
RS
448 * Function returns
449 * 0 : The call was initiated. The callback will be invoked when the call completes.
450 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
451 *
452 * When the callback is invoked, status indicates the result:
453 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
454 * data NULL.
455 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
456 * data is the error string.
457 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
458 * data is NULL.
459 */
04e90341 460EXTERN int rpc_mount3_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 461EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
462
463/*
04e90341 464 * Call MOUNT3/EXPORT
7f0242ca
RS
465 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
466 * returned structures.
467 *
84004dbf
RS
468 * Function returns
469 * 0 : The call was initiated. The callback will be invoked when the call completes.
470 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
471 *
472 * When the callback is invoked, status indicates the result:
473 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
7f0242ca
RS
474 * data is a pointer to an exports pointer:
475 * exports export = *(exports *)data;
84004dbf
RS
476 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
477 * data is the error string.
478 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
479 * data is NULL.
480 */
04e90341 481EXTERN int rpc_mount3_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 482EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf 483
3751901f 484/*
04e90341
RS
485 * MOUNT v1 FUNCTIONS (Used with NFSv2)
486 */
487/*
488 * Call MOUNT1/NULL
489 * Function returns
490 * 0 : The call was initiated. The callback will be invoked when the call completes.
491 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
492 *
493 * When the callback is invoked, status indicates the result:
494 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
495 * data is NULL.
496 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
497 * data is the error string.
498 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
499 * data is NULL.
500 */
501EXTERN int rpc_mount1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
502
503/*
504 * Call MOUNT1/MNT
505 * Function returns
506 * 0 : The call was initiated. The callback will be invoked when the call completes.
507 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
508 *
509 * When the callback is invoked, status indicates the result:
510 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
511 * data is union mountres1.
512 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
513 * data is the error string.
514 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
515 * data is NULL.
516 */
e94d5a7d 517EXTERN int rpc_mount1_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
04e90341
RS
518
519/*
520 * Call MOUNT1/DUMP
521 * Function returns
522 * 0 : The call was initiated. The callback will be invoked when the call completes.
523 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
524 *
525 * When the callback is invoked, status indicates the result:
526 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
527 * data is a mountlist.
528 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
529 * data is the error string.
530 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
531 * data is NULL.
532 */
533EXTERN int rpc_mount1_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf 534
04e90341
RS
535/*
536 * Call MOUNT1/UMNT
537 * Function returns
538 * 0 : The call was initiated. The callback will be invoked when the call completes.
539 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
540 *
541 * When the callback is invoked, status indicates the result:
542 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
543 * data NULL.
544 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
545 * data is the error string.
546 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
547 * data is NULL.
548 */
e94d5a7d 549EXTERN int rpc_mount1_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
04e90341
RS
550
551/*
552 * Call MOUNT1/UMNTALL
553 * Function returns
554 * 0 : The call was initiated. The callback will be invoked when the call completes.
555 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
556 *
557 * When the callback is invoked, status indicates the result:
558 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
559 * data NULL.
560 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
561 * data is the error string.
562 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
563 * data is NULL.
564 */
565EXTERN int rpc_mount1_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
566
567/*
568 * Call MOUNT1/EXPORT
569 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
570 * returned structures.
571 *
572 * Function returns
573 * 0 : The call was initiated. The callback will be invoked when the call completes.
574 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
575 *
576 * When the callback is invoked, status indicates the result:
577 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
578 * data is a pointer to an exports pointer:
579 * exports export = *(exports *)data;
580 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
581 * data is the error string.
582 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
583 * data is NULL.
584 */
585EXTERN int rpc_mount1_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
586
587
3751901f 588/*
463d59bf 589 * NFS v3 FUNCTIONS
84004dbf
RS
590 */
591struct nfs_fh3;
592char *nfsstat3_to_str(int error);
593int nfsstat3_to_errno(int error);
594
595/*
463d59bf 596 * Call NFS3/NULL
84004dbf
RS
597 * Function returns
598 * 0 : The call was initiated. The callback will be invoked when the call completes.
599 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
600 *
601 * When the callback is invoked, status indicates the result:
602 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
603 * data is NULL.
604 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
605 * data is the error string.
606 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
607 * data is NULL.
608 */
463d59bf 609EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 610EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
611
612/*
463d59bf 613 * Call NFS3/GETATTR
84004dbf
RS
614 * Function returns
615 * 0 : The call was initiated. The callback will be invoked when the call completes.
616 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
617 *
618 * When the callback is invoked, status indicates the result:
619 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
620 * data is GETATTR3res
621 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
622 * data is the error string.
623 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
624 * data is NULL.
625 */
463d59bf
RS
626struct GETATTR3args;
627EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data);
21668dce 628EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 629
6f914247 630/*
463d59bf 631 * Call NFS3/PATHCONF
6f914247
RS
632 * Function returns
633 * 0 : The call was initiated. The callback will be invoked when the call completes.
634 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
635 *
636 * When the callback is invoked, status indicates the result:
637 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
638 * data is PATHCONF3res
639 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
640 * data is the error string.
641 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
642 * data is NULL.
643 */
463d59bf
RS
644struct PATHCONF3args;
645EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data);
21668dce 646EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
6f914247 647
84004dbf 648/*
463d59bf 649 * Call NFS3/LOOKUP
84004dbf
RS
650 * Function returns
651 * 0 : The call was initiated. The callback will be invoked when the call completes.
652 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
653 *
654 * When the callback is invoked, status indicates the result:
655 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
656 * data is LOOKUP3res
657 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
658 * data is the error string.
659 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
660 * data is NULL.
661 */
463d59bf
RS
662struct LOOKUP3args;
663EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data);
21668dce 664EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf
RS
665
666/*
463d59bf 667 * Call NFS3/ACCESS
84004dbf
RS
668 * Function returns
669 * 0 : The call was initiated. The callback will be invoked when the call completes.
670 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
671 *
672 * When the callback is invoked, status indicates the result:
673 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
674 * data is ACCESS3res
675 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
676 * data is the error string.
677 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
678 * data is NULL.
679 */
463d59bf
RS
680struct ACCESS3args;
681EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data);
21668dce 682EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data);
84004dbf
RS
683
684/*
463d59bf 685 * Call NFS3/READ
84004dbf
RS
686 * Function returns
687 * 0 : The call was initiated. The callback will be invoked when the call completes.
688 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
689 *
690 * When the callback is invoked, status indicates the result:
691 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
b426ef04 692 * data is READ3res
84004dbf
RS
693 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
694 * data is the error string.
695 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
696 * data is NULL.
697 */
463d59bf
RS
698struct READ3args;
699EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data);
21668dce 700EXTERN 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
701
702/*
463d59bf 703 * Call NFS3/WRITE
84004dbf
RS
704 * Function returns
705 * 0 : The call was initiated. The callback will be invoked when the call completes.
706 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
707 *
708 * When the callback is invoked, status indicates the result:
709 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
710 * data is WRITE3res *
711 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
712 * data is the error string.
713 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
714 * data is NULL.
715 */
463d59bf
RS
716struct WRITE3args;
717EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data);
21668dce 718EXTERN 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
719
720/*
463d59bf 721 * Call NFS3/COMMIT
84004dbf
RS
722 * Function returns
723 * 0 : The call was initiated. The callback will be invoked when the call completes.
724 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
725 *
726 * When the callback is invoked, status indicates the result:
727 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
728 * data is COMMIT3res *
729 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
730 * data is the error string.
731 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
732 * data is NULL.
733 */
463d59bf
RS
734struct COMMIT3args;
735EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data);
21668dce 736EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 737
84004dbf 738/*
463d59bf 739 * Call NFS3/SETATTR
84004dbf
RS
740 * Function returns
741 * 0 : The call was initiated. The callback will be invoked when the call completes.
742 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
743 *
744 * When the callback is invoked, status indicates the result:
745 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
746 * data is SETATTR3res *
747 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
748 * data is the error string.
749 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
750 * data is NULL.
751 */
752struct SETATTR3args;
463d59bf 753EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
21668dce 754EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
84004dbf 755
84004dbf 756/*
463d59bf 757 * Call NFS3/MKDIR
84004dbf
RS
758 * Function returns
759 * 0 : The call was initiated. The callback will be invoked when the call completes.
760 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
761 *
762 * When the callback is invoked, status indicates the result:
763 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
764 * data is MKDIR3res *
765 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
766 * data is the error string.
767 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
768 * data is NULL.
769 */
7edc9026 770struct MKDIR3args;
463d59bf 771EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
21668dce 772EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
84004dbf 773
84004dbf 774/*
463d59bf 775 * Call NFS3/RMDIR
84004dbf
RS
776 * Function returns
777 * 0 : The call was initiated. The callback will be invoked when the call completes.
778 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
779 *
780 * When the callback is invoked, status indicates the result:
781 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
782 * data is RMDIR3res *
783 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
784 * data is the error string.
785 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
786 * data is NULL.
787 */
463d59bf
RS
788struct RMDIR3args;
789EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data);
21668dce 790EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data);
84004dbf 791
84004dbf 792/*
463d59bf 793 * Call NFS3/CREATE
84004dbf
RS
794 * Function returns
795 * 0 : The call was initiated. The callback will be invoked when the call completes.
796 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
797 *
798 * When the callback is invoked, status indicates the result:
799 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
800 * data is CREATE3res *
801 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
802 * data is the error string.
803 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
804 * data is NULL.
805 */
c985c015 806struct CREATE3args;
463d59bf 807EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
21668dce 808EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
84004dbf 809
1ec6b50a 810/*
463d59bf 811 * Call NFS3/MKNOD
1ec6b50a
RS
812 * Function returns
813 * 0 : The call was initiated. The callback will be invoked when the call completes.
814 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
815 *
816 * When the callback is invoked, status indicates the result:
817 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
818 * data is MKNOD3res *
819 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
820 * data is the error string.
821 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
822 * data is NULL.
823 */
463d59bf
RS
824struct MKNOD3args;
825EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data);
21668dce 826EXTERN 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 827
84004dbf 828/*
463d59bf 829 * Call NFS3/REMOVE
84004dbf
RS
830 * Function returns
831 * 0 : The call was initiated. The callback will be invoked when the call completes.
832 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
833 *
834 * When the callback is invoked, status indicates the result:
835 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
836 * data is REMOVE3res *
837 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
838 * data is the error string.
839 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
840 * data is NULL.
841 */
463d59bf
RS
842struct REMOVE3args;
843EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data);
21668dce 844EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf 845
84004dbf 846/*
463d59bf 847 * Call NFS3/READDIR
84004dbf
RS
848 * Function returns
849 * 0 : The call was initiated. The callback will be invoked when the call completes.
850 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
851 *
852 * When the callback is invoked, status indicates the result:
853 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
854 * data is READDIR3res *
855 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
856 * data is the error string.
857 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
858 * data is NULL.
859 */
463d59bf
RS
860struct READDIR3args;
861EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data);
21668dce 862EXTERN 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 863
f390f181 864/*
463d59bf 865 * Call NFS3/READDIRPLUS
f390f181
RS
866 * Function returns
867 * 0 : The call was initiated. The callback will be invoked when the call completes.
868 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
869 *
870 * When the callback is invoked, status indicates the result:
871 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
872 * data is READDIRPLUS3res *
873 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
874 * data is the error string.
875 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
876 * data is NULL.
877 */
463d59bf
RS
878struct READDIRPLUS3args;
879EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data);
21668dce 880EXTERN 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 881
84004dbf 882/*
463d59bf 883 * Call NFS3/FSSTAT
84004dbf
RS
884 * Function returns
885 * 0 : The call was initiated. The callback will be invoked when the call completes.
886 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
887 *
888 * When the callback is invoked, status indicates the result:
889 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
890 * data is FSSTAT3res
891 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
892 * data is the error string.
893 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
894 * data is NULL.
895 */
463d59bf
RS
896struct FSSTAT3args;
897EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data);
21668dce 898EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 899
1058201e 900/*
463d59bf 901 * Call NFS3/FSINFO
1058201e
RS
902 * Function returns
903 * 0 : The call was initiated. The callback will be invoked when the call completes.
904 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
905 *
906 * When the callback is invoked, status indicates the result:
907 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
908 * data is FSINFO3res
909 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
910 * data is the error string.
911 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
912 * data is NULL.
913 */
463d59bf
RS
914struct FSINFO3args;
915EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data);
21668dce 916EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
1058201e 917
84004dbf 918/*
463d59bf 919 * Call NFS3/READLINK
84004dbf
RS
920 * Function returns
921 * 0 : The call was initiated. The callback will be invoked when the call completes.
922 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
923 *
924 * When the callback is invoked, status indicates the result:
925 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
926 * data is READLINK3res *
927 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
928 * data is the error string.
929 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
930 * data is NULL.
931 */
16104b27 932struct READLINK3args;
463d59bf 933EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
21668dce 934EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
84004dbf 935
84004dbf 936/*
463d59bf 937 * Call NFS3/SYMLINK
84004dbf
RS
938 * Function returns
939 * 0 : The call was initiated. The callback will be invoked when the call completes.
940 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
941 *
942 * When the callback is invoked, status indicates the result:
943 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
944 * data is SYMLINK3res *
945 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
946 * data is the error string.
947 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
948 * data is NULL.
949 */
8e255816 950struct SYMLINK3args;
463d59bf 951EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
21668dce 952EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
84004dbf 953
84004dbf 954/*
463d59bf 955 * Call NFS3/RENAME
84004dbf
RS
956 * Function returns
957 * 0 : The call was initiated. The callback will be invoked when the call completes.
958 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
959 *
960 * When the callback is invoked, status indicates the result:
961 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
962 * data is RENAME3res *
963 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
964 * data is the error string.
965 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
966 * data is NULL.
967 */
463d59bf
RS
968struct RENAME3args;
969EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data);
21668dce 970EXTERN 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 971
84004dbf 972/*
463d59bf 973 * Call NFS3/LINK
84004dbf
RS
974 * Function returns
975 * 0 : The call was initiated. The callback will be invoked when the call completes.
976 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
977 *
978 * When the callback is invoked, status indicates the result:
979 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
980 * data is LINK3res *
981 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
982 * data is the error string.
983 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
984 * data is NULL.
985 */
463d59bf
RS
986struct LINK3args;
987EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data);
21668dce 988EXTERN 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 989
3751901f 990/*
f38aacf8
RS
991 * NFS v2 FUNCTIONS
992 */
993
994/*
995 * Call NFS2/NULL
996 * Function returns
997 * 0 : The call was initiated. The callback will be invoked when the call completes.
998 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
999 *
1000 * When the callback is invoked, status indicates the result:
1001 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1002 * data is NULL.
1003 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1004 * data is the error string.
1005 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1006 * data is NULL.
1007 */
1008EXTERN int rpc_nfs2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1009
1010/*
1011 * Call NFS2/GETATTR
1012 * Function returns
1013 * 0 : The call was initiated. The callback will be invoked when the call completes.
1014 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1015 *
1016 * When the callback is invoked, status indicates the result:
1017 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1018 * data is GETATTR2res
1019 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1020 * data is the error string.
1021 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1022 * data is NULL.
1023 */
1024struct GETATTR2args;
1025EXTERN int rpc_nfs2_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR2args *args, void *private_data);
1026
1027/*
1028 * Call NFS2/SETATTR
1029 * Function returns
1030 * 0 : The call was initiated. The callback will be invoked when the call completes.
1031 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1032 *
1033 * When the callback is invoked, status indicates the result:
1034 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1035 * data is SETATTR2res *
1036 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1037 * data is the error string.
1038 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1039 * data is NULL.
1040 */
1041struct SETATTR2args;
1042EXTERN int rpc_nfs2_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR2args *args, void *private_data);
1043
1044/*
1045 * Call NFS2/LOOKUP
1046 * Function returns
1047 * 0 : The call was initiated. The callback will be invoked when the call completes.
1048 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1049 *
1050 * When the callback is invoked, status indicates the result:
1051 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1052 * data is LOOKUP2res
1053 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1054 * data is the error string.
1055 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1056 * data is NULL.
1057 */
1058struct LOOKUP2args;
1059EXTERN int rpc_nfs2_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP2args *args, void *private_data);
1060
1061/*
1062 * Call NFS2/READLINK
1063 * Function returns
1064 * 0 : The call was initiated. The callback will be invoked when the call completes.
1065 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1066 *
1067 * When the callback is invoked, status indicates the result:
1068 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1069 * data is READLINK2res *
1070 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1071 * data is the error string.
1072 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1073 * data is NULL.
1074 */
1075struct READLINK2args;
1076EXTERN int rpc_nfs32_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK2args *args, void *private_data);
1077
1078/*
1079 * Call NFS2/READ
1080 * Function returns
1081 * 0 : The call was initiated. The callback will be invoked when the call completes.
1082 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1083 *
1084 * When the callback is invoked, status indicates the result:
1085 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1086 * data is READ2res
1087 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1088 * data is the error string.
1089 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1090 * data is NULL.
1091 */
1092struct READ2args;
1093EXTERN int rpc_nfs2_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ2args *args, void *private_data);
1094
1095/*
1096 * Call NFS2/WRITE
1097 * Function returns
1098 * 0 : The call was initiated. The callback will be invoked when the call completes.
1099 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1100 *
1101 * When the callback is invoked, status indicates the result:
1102 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1103 * data is WRITE2res *
1104 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1105 * data is the error string.
1106 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1107 * data is NULL.
1108 */
1109struct WRITE2args;
1110EXTERN int rpc_nfs2_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE2args *args, void *private_data);
1111
1112/*
1113 * Call NFS2/CREATE
1114 * Function returns
1115 * 0 : The call was initiated. The callback will be invoked when the call completes.
1116 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1117 *
1118 * When the callback is invoked, status indicates the result:
1119 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1120 * data is CREATE2res *
1121 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1122 * data is the error string.
1123 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1124 * data is NULL.
1125 */
1126struct CREATE2args;
1127EXTERN int rpc_nfs2_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE2args *args, void *private_data);
1128
1129/*
1130 * Call NFS2/REMOVE
1131 * Function returns
1132 * 0 : The call was initiated. The callback will be invoked when the call completes.
1133 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1134 *
1135 * When the callback is invoked, status indicates the result:
1136 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1137 * data is REMOVE2res *
1138 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1139 * data is the error string.
1140 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1141 * data is NULL.
1142 */
1143struct REMOVE2args;
1144EXTERN int rpc_nfs2_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE2args *args, void *private_data);
1145
1146/*
1147 * Call NFS2/RENAME
1148 * Function returns
1149 * 0 : The call was initiated. The callback will be invoked when the call completes.
1150 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1151 *
1152 * When the callback is invoked, status indicates the result:
1153 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1154 * data is RENAME2res *
1155 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1156 * data is the error string.
1157 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1158 * data is NULL.
1159 */
1160struct RENAME2args;
1161EXTERN int rpc_nfs2_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME2args *args, void *private_data);
1162
1163/*
1164 * Call NFS2/LINK
1165 * Function returns
1166 * 0 : The call was initiated. The callback will be invoked when the call completes.
1167 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1168 *
1169 * When the callback is invoked, status indicates the result:
1170 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1171 * data is LINK2res *
1172 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1173 * data is the error string.
1174 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1175 * data is NULL.
1176 */
1177struct LINK2args;
1178EXTERN int rpc_nfs2_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK2args *args, void *private_data);
1179
1180/*
1181 * Call NFS2/SYMLINK
1182 * Function returns
1183 * 0 : The call was initiated. The callback will be invoked when the call completes.
1184 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1185 *
1186 * When the callback is invoked, status indicates the result:
1187 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1188 * data is SYMLINK2res *
1189 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1190 * data is the error string.
1191 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1192 * data is NULL.
1193 */
1194struct SYMLINK2args;
1195EXTERN int rpc_nfs2_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK2args *args, void *private_data);
1196
1197/*
1198 * Call NFS2/MKDIR
1199 * Function returns
1200 * 0 : The call was initiated. The callback will be invoked when the call completes.
1201 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1202 *
1203 * When the callback is invoked, status indicates the result:
1204 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1205 * data is MKDIR2res *
1206 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1207 * data is the error string.
1208 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1209 * data is NULL.
1210 */
1211struct MKDIR2args;
1212EXTERN int rpc_nfs2_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR2args *args, void *private_data);
1213
1214/*
1215 * Call NFS2/RMDIR
1216 * Function returns
1217 * 0 : The call was initiated. The callback will be invoked when the call completes.
1218 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1219 *
1220 * When the callback is invoked, status indicates the result:
1221 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1222 * data is RMDIR2res *
1223 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1224 * data is the error string.
1225 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1226 * data is NULL.
1227 */
1228struct RMDIR2args;
1229EXTERN int rpc_nfs2_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR2args *args, void *private_data);
1230
1231/*
1232 * Call NFS2/READDIR
1233 * Function returns
1234 * 0 : The call was initiated. The callback will be invoked when the call completes.
1235 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1236 *
1237 * When the callback is invoked, status indicates the result:
1238 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1239 * data is READDIR2res *
1240 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1241 * data is the error string.
1242 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1243 * data is NULL.
1244 */
1245struct READDIR2args;
1246EXTERN int rpc_nfs2_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR2args *args, void *private_data);
1247
1248/*
1249 * Call NFS2/STATFS
1250 * Function returns
1251 * 0 : The call was initiated. The callback will be invoked when the call completes.
1252 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1253 *
1254 * When the callback is invoked, status indicates the result:
1255 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1256 * data is STATFS2res *
1257 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1258 * data is the error string.
1259 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1260 * data is NULL.
1261 */
1262struct STATFS2args;
1263EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data);
84004dbf 1264
3751901f 1265/*
05a777d9
RS
1266 * RQUOTA FUNCTIONS
1267 */
1268char *rquotastat_to_str(int error);
1269int rquotastat_to_errno(int error);
1270
1271/*
1272 * Call RQUOTA1/NULL
1273 * Function returns
1274 * 0 : The call was initiated. The callback will be invoked when the call completes.
1275 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1276 *
1277 * When the callback is invoked, status indicates the result:
1278 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1279 * data is NULL.
1280 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1281 * data is the error string.
1282 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1283 * data is NULL.
1284 */
21668dce 1285EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
05a777d9
RS
1286
1287/*
1288 * Call RQUOTA1/GETQUOTA
1289 * Function returns
1290 * 0 : The call was initiated. The callback will be invoked when the call completes.
1291 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1292 *
1293 * When the callback is invoked, status indicates the result:
1294 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1295 * data is a RQUOTA1res structure.
1296 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1297 * data is the error string.
1298 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1299 * data is NULL.
1300 */
e94d5a7d 1301EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
19e74f5a
RS
1302
1303/*
1304 * Call RQUOTA1/GETACTIVEQUOTA
1305 * Function returns
1306 * 0 : The call was initiated. The callback will be invoked when the call completes.
1307 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1308 *
1309 * When the callback is invoked, status indicates the result:
1310 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1311 * data is a RQUOTA1res structure.
1312 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1313 * data is the error string.
1314 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1315 * data is NULL.
1316 */
e94d5a7d 1317EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
77c23b46
RS
1318
1319
1320
1321
1322/*
1323 * Call RQUOTA2/NULL
1324 * Function returns
1325 * 0 : The call was initiated. The callback will be invoked when the call completes.
1326 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1327 *
1328 * When the callback is invoked, status indicates the result:
1329 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1330 * data is NULL.
1331 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1332 * data is the error string.
1333 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1334 * data is NULL.
1335 */
1336int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1337
1338/*
1339 * Call RQUOTA2/GETQUOTA
1340 * Function returns
1341 * 0 : The call was initiated. The callback will be invoked when the call completes.
1342 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1343 *
1344 * When the callback is invoked, status indicates the result:
1345 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1346 * data is a RQUOTA1res structure.
1347 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1348 * data is the error string.
1349 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1350 * data is NULL.
1351 */
e94d5a7d 1352int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
77c23b46
RS
1353
1354/*
1355 * Call RQUOTA2/GETACTIVEQUOTA
1356 * Function returns
1357 * 0 : The call was initiated. The callback will be invoked when the call completes.
1358 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1359 *
1360 * When the callback is invoked, status indicates the result:
1361 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1362 * data is a RQUOTA1res structure.
1363 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1364 * data is the error string.
1365 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1366 * data is NULL.
1367 */
e94d5a7d 1368int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
3847f8f6
RS
1369
1370
1371
6916a665
RS
1372
1373
1374
1375/*
3751901f 1376 * NFSACL functions
6916a665
RS
1377 */
1378
3847f8f6
RS
1379/*
1380 * Call NFSACL/NULL
1381 * Call the NULL procedure for the NFSACL
1382 *
1383 * Function returns
1384 * 0 : The call was initiated. The callback will be invoked when the call completes.
1385 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1386 *
1387 * When the callback is invoked, status indicates the result:
1388 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1389 * data is NULL
1390 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1391 * data is the error string.
1392 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1393 * data is NULL.
1394 */
21668dce 1395EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
3847f8f6
RS
1396
1397/*
1398 * Call NFSACL/GETACL
1399 *
1400 * Function returns
1401 * 0 : The call was initiated. The callback will be invoked when the call completes.
1402 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1403 *
1404 * When the callback is invoked, status indicates the result:
fa3c25be 1405 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
3847f8f6 1406 * data is a GETACL3res pointer
fa3c25be 1407 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
3847f8f6
RS
1408 * data is the error string.
1409 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1410 * data is NULL.
1411 */
0118a5f0 1412struct GETACL3args;
21668dce 1413EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
3847f8f6 1414
fa3c25be
RS
1415
1416
1417/*
1418 * Call NFSACL/SETACL
1419 *
1420 * Function returns
1421 * 0 : The call was initiated. The callback will be invoked when the call completes.
1422 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1423 *
1424 * When the callback is invoked, status indicates the result:
1425 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1426 * data is a SETACL3res pointer
1427 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1428 * data is the error string.
1429 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1430 * data is NULL.
1431 */
1432struct SETACL3args;
21668dce 1433EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
6916a665
RS
1434
1435
1436
1437
1438/*
1439 * NLM functions
1440 */
1441char *nlmstat4_to_str(int stat);
3751901f 1442
6916a665
RS
1443/*
1444 * Call NLM/NULL
1445 * Call the NULL procedure for the NLM protocol
1446 *
1447 * Function returns
1448 * 0 : The call was initiated. The callback will be invoked when the call completes.
1449 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1450 *
1451 * When the callback is invoked, status indicates the result:
1452 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1453 * data is NULL
1454 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1455 * data is the error string.
1456 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1457 * data is NULL.
1458 */
463d59bf 1459EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
e01ed6a2
RS
1460
1461/*
1462 * Call NLM/TEST
1463 * Call the TEST procedure for the NLM protocol
1464 *
1465 * Function returns
1466 * 0 : The call was initiated. The callback will be invoked when the call completes.
1467 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1468 *
1469 * When the callback is invoked, status indicates the result:
1470 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1471 * data is NLM4_TESTres
1472 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1473 * data is the error string.
1474 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1475 * data is NULL.
1476 */
1477struct NLM4_TESTargs;
463d59bf 1478EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
e01ed6a2 1479
a171d4da
RS
1480/*
1481 * Call NLM/LOCK
1482 * Call the LOCK procedure for the NLM protocol
1483 *
1484 * Function returns
1485 * 0 : The call was initiated. The callback will be invoked when the call completes.
1486 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1487 *
1488 * When the callback is invoked, status indicates the result:
1489 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1490 * data is NLM4_LOCKres
1491 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1492 * data is the error string.
1493 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1494 * data is NULL.
1495 */
1496struct NLM4_LOCKargs;
463d59bf 1497EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
a171d4da
RS
1498
1499/*
1500 * Call NLM/CANCEL
1501 * Call the CANCEL procedure for the NLM protocol
1502 *
1503 * Function returns
1504 * 0 : The call was initiated. The callback will be invoked when the call completes.
1505 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1506 *
1507 * When the callback is invoked, status indicates the result:
1508 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1509 * data is NLM4_CANCres
1510 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1511 * data is the error string.
1512 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1513 * data is NULL.
1514 */
1515struct NLM4_CANCargs;
463d59bf 1516EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
a171d4da
RS
1517
1518/*
1519 * Call NLM/UNLOCK
1520 * Call the UNLOCK procedure for the NLM protocol
1521 *
1522 * Function returns
1523 * 0 : The call was initiated. The callback will be invoked when the call completes.
1524 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1525 *
1526 * When the callback is invoked, status indicates the result:
1527 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1528 * data is NLM4_UNLOCKres
1529 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1530 * data is the error string.
1531 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1532 * data is NULL.
1533 */
1534struct NLM4_UNLOCKargs;
463d59bf 1535EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
f9bb21ad 1536
ed09b567
RS
1537/*
1538 * NSM functions
1539 */
1540char *nsmstat1_to_str(int stat);
3751901f 1541
ed09b567
RS
1542/*
1543 * Call NSM/NULL
1544 * Call the NULL procedure for the NSM protocol
1545 *
1546 * Function returns
1547 * 0 : The call was initiated. The callback will be invoked when the call completes.
1548 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1549 *
1550 * When the callback is invoked, status indicates the result:
1551 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1552 * data is NULL
1553 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1554 * data is the error string.
1555 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1556 * data is NULL.
1557 */
463d59bf 1558EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
ed09b567 1559
1e7a5136
RS
1560/*
1561 * Call NSM/STAT
1562 * Call the STAT procedure for the NSM protocol
1563 *
1564 * Function returns
1565 * 0 : The call was initiated. The callback will be invoked when the call completes.
1566 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1567 *
1568 * When the callback is invoked, status indicates the result:
1569 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1570 * data is NSM1_STATres
1571 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1572 * data is the error string.
1573 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1574 * data is NULL.
1575 */
1576struct NSM1_STATargs;
463d59bf 1577EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
1e7a5136
RS
1578
1579/*
1580 * Call NSM/MON
1581 * Call the MON procedure for the NSM protocol
1582 *
1583 * Function returns
1584 * 0 : The call was initiated. The callback will be invoked when the call completes.
1585 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1586 *
1587 * When the callback is invoked, status indicates the result:
1588 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1589 * data is NSM1_MONres
1590 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1591 * data is the error string.
1592 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1593 * data is NULL.
1594 */
1595struct NSM1_MONargs;
463d59bf 1596EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
1e7a5136
RS
1597
1598/*
1599 * Call NSM/UNMON
1600 * Call the UNMON procedure for the NSM protocol
1601 *
1602 * Function returns
1603 * 0 : The call was initiated. The callback will be invoked when the call completes.
1604 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1605 *
1606 * When the callback is invoked, status indicates the result:
1607 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1608 * data is NSM1_UNMONres
1609 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1610 * data is the error string.
1611 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1612 * data is NULL.
1613 */
1614struct NSM1_UNMONargs;
463d59bf 1615EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
1e7a5136
RS
1616
1617/*
1618 * Call NSM/UNMONALL
1619 * Call the UNMONALL procedure for the NSM protocol
1620 *
1621 * Function returns
1622 * 0 : The call was initiated. The callback will be invoked when the call completes.
1623 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1624 *
1625 * When the callback is invoked, status indicates the result:
1626 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1627 * data is NSM1_UNMONALLres
1628 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1629 * data is the error string.
1630 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1631 * data is NULL.
1632 */
1633struct NSM1_UNMONALLargs;
463d59bf 1634EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
1e7a5136
RS
1635
1636/*
1637 * Call NSM/SIMUCRASH
1638 * Call the SIMUCRASH procedure for the NSM protocol
1639 *
1640 * Function returns
1641 * 0 : The call was initiated. The callback will be invoked when the call completes.
1642 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1643 *
1644 * When the callback is invoked, status indicates the result:
1645 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1646 * data is NULL
1647 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1648 * data is the error string.
1649 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1650 * data is NULL.
1651 */
463d59bf 1652EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1e7a5136
RS
1653
1654/*
1655 * Call NSM/NOTIFY
1656 * Call the NOTIFY procedure for the NSM protocol
1657 *
1658 * Function returns
1659 * 0 : The call was initiated. The callback will be invoked when the call completes.
1660 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1661 *
1662 * When the callback is invoked, status indicates the result:
1663 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1664 * data is NULL
1665 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1666 * data is the error string.
1667 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1668 * data is NULL.
1669 */
1670struct NSM1_NOTIFYargs;
463d59bf 1671EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
ed09b567 1672
4641d36e
AR
1673#ifdef __cplusplus
1674}
1675#endif
1676
f9bb21ad 1677#endif