2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
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.
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.
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/>.
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.
22 #ifndef _LIBNFS_RAW_H_
23 #define _LIBNFS_RAW_H_
26 #include <nfsc/libnfs-zdr.h>
38 struct rpc_context
*rpc_init_context(void);
39 void rpc_destroy_context(struct rpc_context
*rpc
);
41 void rpc_set_auth(struct rpc_context
*rpc
, struct AUTH
*auth
);
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
);
47 int rpc_queue_length(struct rpc_context
*rpc
);
49 /* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL
50 * calls on a NFS context.
52 struct rpc_context
*nfs_get_rpc_context(struct nfs_context
*nfs
);
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
58 struct nfs_fh3
*nfs_get_fh(struct nfsfh
*nfsfh
);
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.
64 void rpc_set_next_xid(struct rpc_context
*rpc
, uint32_t xid
);
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.
72 * oldfd = rpc_get_fd(rpc);
74 * rpc_set_fd(rpc, newfd);
78 void rpc_set_fd(struct rpc_context
*rpc
, int fd
);
80 #define RPC_STATUS_SUCCESS 0
81 #define RPC_STATUS_ERROR 1
82 #define RPC_STATUS_CANCEL 2
85 * Async connection to the tcp port at server:port.
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.
90 * When the callback is invoked, status indicates the result:
91 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
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.
98 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
100 * Async function to connect to a specific RPC program/version
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.
105 * When the callback is invoked, status indicates the result:
106 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
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.
113 int rpc_connect_program_async(struct rpc_context
*rpc
, const char *server
, int program
, int version
, rpc_cb cb
, void *private_data
);
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.
118 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
122 * PORTMAP v2 FUNCTIONS
126 * Call PORTMAPPER2/NULL
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.
131 * When the callback is invoked, status indicates the result:
132 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
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.
139 EXTERN
int rpc_pmap2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
143 * Call PORTMAPPER2/GETPORT.
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.
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.
156 EXTERN
int rpc_pmap2_getport_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, rpc_cb cb
, void *private_data
);
159 * Call PORTMAPPER2/SET
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.
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.
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
);
175 * Call PORTMAPPER2/UNSET
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.
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.
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
);
191 * Call PORTMAPPER2/DUMP.
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.
196 * When the callback is invoked, status indicates the result:
197 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
198 * data is struct pmap2_dump_result.
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.
204 EXTERN
int rpc_pmap2_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
207 * Call PORTMAPPER2/CALLIT.
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.
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 'pmap2_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.
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
);
223 * PORTMAP v3 FUNCTIONS
227 * Call PORTMAPPER3/NULL
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.
232 * When the callback is invoked, status indicates the result:
233 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
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.
240 EXTERN
int rpc_pmap3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
243 * Call PORTMAPPER3/SET.
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.
248 * When the callback is invoked, status indicates the result:
249 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
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.
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
);
260 * Call PORTMAPPER3/UNSET.
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.
265 * When the callback is invoked, status indicates the result:
266 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
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.
273 EXTERN
int rpc_pmap3_unset_async(struct rpc_context
*rpc
, struct pmap3_mapping
*map
, rpc_cb cb
, void *private_data
);
276 * Call PORTMAPPER3/GETADDR.
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.
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_string_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.
289 EXTERN
int rpc_pmap3_getaddr_async(struct rpc_context
*rpc
, struct pmap3_mapping
*map
, rpc_cb cb
, void *private_data
);
292 * Call PORTMAPPER3/DUMP.
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.
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.
305 EXTERN
int rpc_pmap3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
308 * Call PORTMAPPER3/CALLIT.
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.
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.
321 EXTERN
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
);
324 * Call PORTMAPPER3/GETTIME.
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.
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.
337 EXTERN
int rpc_pmap3_gettime_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
340 * Call PORTMAPPER3/UADDR2TADDR.
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.
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.
353 EXTERN
int rpc_pmap3_uaddr2taddr_async(struct rpc_context
*rpc
, char *uaddr
, rpc_cb cb
, void *private_data
);
356 * Call PORTMAPPER3/TADDR2UADDR.
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.
361 * When the callback is invoked, status indicates the result:
362 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
363 * data is a struct pmap3_string_result *.
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.
370 EXTERN
int rpc_pmap3_taddr2uaddr_async(struct rpc_context
*rpc
, struct pmap3_netbuf
*netbuf
, rpc_cb cb
, void *private_data
);
375 char *mountstat3_to_str(int stat
);
376 int mountstat3_to_errno(int error
);
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.
384 * When the callback is invoked, status indicates the result:
385 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
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.
392 EXTERN
int rpc_mount3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
393 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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.
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.
409 EXTERN
int rpc_mount3_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
410 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
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.
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.
426 EXTERN
int rpc_mount3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
427 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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.
435 * When the callback is invoked, status indicates the result:
436 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
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.
443 EXTERN
int rpc_mount3_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
444 EXTERN
int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
447 * Call MOUNT3/UMNTALL
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.
452 * When the callback is invoked, status indicates the result:
453 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
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.
460 EXTERN
int rpc_mount3_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
461 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
465 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
466 * returned structures.
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.
472 * When the callback is invoked, status indicates the result:
473 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
474 * data is a pointer to an exports pointer:
475 * exports export = *(exports *)data;
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.
481 EXTERN
int rpc_mount3_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
482 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
485 * MOUNT v1 FUNCTIONS (Used with NFSv2)
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.
493 * When the callback is invoked, status indicates the result:
494 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
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.
501 EXTERN
int rpc_mount1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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.
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.
517 EXTERN
int rpc_mount1_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
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.
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.
533 EXTERN
int rpc_mount1_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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.
541 * When the callback is invoked, status indicates the result:
542 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
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.
549 EXTERN
int rpc_mount1_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
552 * Call MOUNT1/UMNTALL
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.
557 * When the callback is invoked, status indicates the result:
558 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
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.
565 EXTERN
int rpc_mount1_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
569 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
570 * returned structures.
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.
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.
585 EXTERN
int rpc_mount1_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
592 char *nfsstat3_to_str(int error
);
593 int nfsstat3_to_errno(int error
);
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.
601 * When the callback is invoked, status indicates the result:
602 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
609 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
610 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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.
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.
627 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
628 EXTERN
int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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.
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.
644 struct PATHCONF3args
;
645 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
646 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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.
654 * When the callback is invoked, status indicates the result:
655 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
663 EXTERN
int rpc_nfs3_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
664 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
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.
672 * When the callback is invoked, status indicates the result:
673 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
681 EXTERN
int rpc_nfs3_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
682 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
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.
690 * When the callback is invoked, status indicates the result:
691 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
699 EXTERN
int rpc_nfs3_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
700 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
);
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.
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.
717 EXTERN
int rpc_nfs3_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
718 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
);
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.
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.
735 EXTERN
int rpc_nfs3_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
736 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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.
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.
753 EXTERN
int rpc_nfs3_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
754 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
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.
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.
771 EXTERN
int rpc_nfs3_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
772 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
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.
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.
789 EXTERN
int rpc_nfs3_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
790 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
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.
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.
807 EXTERN
int rpc_nfs3_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
808 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
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.
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.
825 EXTERN
int rpc_nfs3_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
826 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
);
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.
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.
843 EXTERN
int rpc_nfs3_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
844 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
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.
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.
861 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
862 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
);
865 * Call NFS3/READDIRPLUS
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.
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.
878 struct READDIRPLUS3args
;
879 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
880 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
);
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.
888 * When the callback is invoked, status indicates the result:
889 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
897 EXTERN
int rpc_nfs3_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
898 EXTERN
int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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.
906 * When the callback is invoked, status indicates the result:
907 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
915 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
916 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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.
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.
932 struct READLINK3args
;
933 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
934 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
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.
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.
951 EXTERN
int rpc_nfs3_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
952 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
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.
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.
969 EXTERN
int rpc_nfs3_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
970 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
);
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.
978 * When the callback is invoked, status indicates the result:
979 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
987 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
988 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
);
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.
1000 * When the callback is invoked, status indicates the result:
1001 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
1008 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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.
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.
1024 struct GETATTR2args
;
1025 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
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.
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.
1041 struct SETATTR2args
;
1042 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
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.
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.
1059 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*args
, void *private_data
);
1062 * Call NFS2/READLINK
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.
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.
1075 struct READLINK2args
;
1076 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
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.
1084 * When the callback is invoked, status indicates the result:
1085 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
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.
1093 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
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.
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.
1110 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
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.
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.
1127 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
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.
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.
1144 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
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.
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.
1161 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
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.
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.
1178 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
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.
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.
1194 struct SYMLINK2args
;
1195 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
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.
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.
1212 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
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.
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.
1229 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
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.
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.
1245 struct READDIR2args
;
1246 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
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.
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.
1263 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
1268 char *rquotastat_to_str(int error
);
1269 int rquotastat_to_errno(int error
);
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.
1277 * When the callback is invoked, status indicates the result:
1278 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
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.
1285 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1288 * Call RQUOTA1/GETQUOTA
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.
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.
1301 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1304 * Call RQUOTA1/GETACTIVEQUOTA
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.
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.
1317 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
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.
1328 * When the callback is invoked, status indicates the result:
1329 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
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.
1336 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1339 * Call RQUOTA2/GETQUOTA
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.
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.
1352 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1355 * Call RQUOTA2/GETACTIVEQUOTA
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.
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.
1368 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1381 * Call the NULL procedure for the NFSACL
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.
1387 * When the callback is invoked, status indicates the result:
1388 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
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.
1395 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1398 * Call NFSACL/GETACL
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.
1404 * When the callback is invoked, status indicates the result:
1405 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1406 * data is a GETACL3res pointer
1407 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1408 * data is the error string.
1409 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1413 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1418 * Call NFSACL/SETACL
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.
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.
1433 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1441 char *nlmstat4_to_str(int stat
);
1445 * Call the NULL procedure for the NLM protocol
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.
1451 * When the callback is invoked, status indicates the result:
1452 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
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.
1459 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1463 * Call the TEST procedure for the NLM protocol
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.
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.
1477 struct NLM4_TESTargs
;
1478 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1482 * Call the LOCK procedure for the NLM protocol
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.
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.
1496 struct NLM4_LOCKargs
;
1497 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1501 * Call the CANCEL procedure for the NLM protocol
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.
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.
1515 struct NLM4_CANCargs
;
1516 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1520 * Call the UNLOCK procedure for the NLM protocol
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.
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.
1534 struct NLM4_UNLOCKargs
;
1535 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1540 char *nsmstat1_to_str(int stat
);
1544 * Call the NULL procedure for the NSM protocol
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.
1550 * When the callback is invoked, status indicates the result:
1551 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
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.
1558 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1562 * Call the STAT procedure for the NSM protocol
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.
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.
1576 struct NSM1_STATargs
;
1577 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1581 * Call the MON procedure for the NSM protocol
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.
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.
1595 struct NSM1_MONargs
;
1596 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1600 * Call the UNMON procedure for the NSM protocol
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.
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.
1614 struct NSM1_UNMONargs
;
1615 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1619 * Call the UNMONALL procedure for the NSM protocol
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.
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.
1633 struct NSM1_UNMONALLargs
;
1634 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1637 * Call NSM/SIMUCRASH
1638 * Call the SIMUCRASH procedure for the NSM protocol
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.
1644 * When the callback is invoked, status indicates the result:
1645 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
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.
1652 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1656 * Call the NOTIFY procedure for the NSM protocol
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.
1662 * When the callback is invoked, status indicates the result:
1663 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
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.
1670 struct NSM1_NOTIFYargs
;
1671 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);