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 'pmap_call_result' pointer.
215 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
216 * data is the error string.
217 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
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_getaddr_result.
284 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
285 * data is the error string.
286 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
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/GETTIME.
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 uint32_t *.
316 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
317 * data is the error string.
318 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
321 EXTERN
int rpc_pmap3_gettime_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
326 char *mountstat3_to_str(int stat
);
327 int mountstat3_to_errno(int error
);
332 * 0 : The call was initiated. The callback will be invoked when the call completes.
333 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
335 * When the callback is invoked, status indicates the result:
336 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
338 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
339 * data is the error string.
340 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
343 EXTERN
int rpc_mount3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
344 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
349 * 0 : The call was initiated. The callback will be invoked when the call completes.
350 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
352 * When the callback is invoked, status indicates the result:
353 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
354 * data is union mountres3.
355 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
356 * data is the error string.
357 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
360 EXTERN
int rpc_mount3_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
361 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
366 * 0 : The call was initiated. The callback will be invoked when the call completes.
367 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
369 * When the callback is invoked, status indicates the result:
370 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
371 * data is a mountlist.
372 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
373 * data is the error string.
374 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
377 EXTERN
int rpc_mount3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
378 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
383 * 0 : The call was initiated. The callback will be invoked when the call completes.
384 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
386 * When the callback is invoked, status indicates the result:
387 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
389 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
390 * data is the error string.
391 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
394 EXTERN
int rpc_mount3_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
395 EXTERN
int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
398 * Call MOUNT3/UMNTALL
400 * 0 : The call was initiated. The callback will be invoked when the call completes.
401 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
403 * When the callback is invoked, status indicates the result:
404 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
406 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
407 * data is the error string.
408 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
411 EXTERN
int rpc_mount3_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
412 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
416 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
417 * returned structures.
420 * 0 : The call was initiated. The callback will be invoked when the call completes.
421 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
423 * When the callback is invoked, status indicates the result:
424 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
425 * data is a pointer to an exports pointer:
426 * exports export = *(exports *)data;
427 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
428 * data is the error string.
429 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
432 EXTERN
int rpc_mount3_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
433 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
436 * MOUNT v1 FUNCTIONS (Used with NFSv2)
441 * 0 : The call was initiated. The callback will be invoked when the call completes.
442 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
444 * When the callback is invoked, status indicates the result:
445 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
447 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
448 * data is the error string.
449 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
452 EXTERN
int rpc_mount1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
457 * 0 : The call was initiated. The callback will be invoked when the call completes.
458 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
460 * When the callback is invoked, status indicates the result:
461 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
462 * data is union mountres1.
463 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
464 * data is the error string.
465 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
468 EXTERN
int rpc_mount1_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
473 * 0 : The call was initiated. The callback will be invoked when the call completes.
474 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
476 * When the callback is invoked, status indicates the result:
477 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
478 * data is a mountlist.
479 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
480 * data is the error string.
481 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
484 EXTERN
int rpc_mount1_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
489 * 0 : The call was initiated. The callback will be invoked when the call completes.
490 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
492 * When the callback is invoked, status indicates the result:
493 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
495 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
496 * data is the error string.
497 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
500 EXTERN
int rpc_mount1_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
503 * Call MOUNT1/UMNTALL
505 * 0 : The call was initiated. The callback will be invoked when the call completes.
506 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
508 * When the callback is invoked, status indicates the result:
509 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
511 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
512 * data is the error string.
513 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
516 EXTERN
int rpc_mount1_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
520 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
521 * returned structures.
524 * 0 : The call was initiated. The callback will be invoked when the call completes.
525 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
527 * When the callback is invoked, status indicates the result:
528 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
529 * data is a pointer to an exports pointer:
530 * exports export = *(exports *)data;
531 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
532 * data is the error string.
533 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
536 EXTERN
int rpc_mount1_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
543 char *nfsstat3_to_str(int error
);
544 int nfsstat3_to_errno(int error
);
549 * 0 : The call was initiated. The callback will be invoked when the call completes.
550 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
552 * When the callback is invoked, status indicates the result:
553 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
555 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
556 * data is the error string.
557 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
560 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
561 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
566 * 0 : The call was initiated. The callback will be invoked when the call completes.
567 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
569 * When the callback is invoked, status indicates the result:
570 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
571 * data is GETATTR3res
572 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
573 * data is the error string.
574 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
578 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
579 EXTERN
int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
584 * 0 : The call was initiated. The callback will be invoked when the call completes.
585 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
587 * When the callback is invoked, status indicates the result:
588 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
589 * data is PATHCONF3res
590 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
591 * data is the error string.
592 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
595 struct PATHCONF3args
;
596 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
597 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
602 * 0 : The call was initiated. The callback will be invoked when the call completes.
603 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
605 * When the callback is invoked, status indicates the result:
606 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
608 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
609 * data is the error string.
610 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
614 EXTERN
int rpc_nfs3_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
615 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
620 * 0 : The call was initiated. The callback will be invoked when the call completes.
621 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
623 * When the callback is invoked, status indicates the result:
624 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
626 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
627 * data is the error string.
628 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
632 EXTERN
int rpc_nfs3_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
633 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
638 * 0 : The call was initiated. The callback will be invoked when the call completes.
639 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
641 * When the callback is invoked, status indicates the result:
642 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
644 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
645 * data is the error string.
646 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
650 EXTERN
int rpc_nfs3_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
651 EXTERN
int rpc_nfs_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint64_t offset
, uint64_t count
, void *private_data
);
656 * 0 : The call was initiated. The callback will be invoked when the call completes.
657 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
659 * When the callback is invoked, status indicates the result:
660 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
661 * data is WRITE3res *
662 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
663 * data is the error string.
664 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
668 EXTERN
int rpc_nfs3_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
669 EXTERN
int rpc_nfs_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *buf
, uint64_t offset
, uint64_t count
, int stable_how
, void *private_data
);
674 * 0 : The call was initiated. The callback will be invoked when the call completes.
675 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
677 * When the callback is invoked, status indicates the result:
678 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
679 * data is COMMIT3res *
680 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
681 * data is the error string.
682 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
686 EXTERN
int rpc_nfs3_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
687 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
692 * 0 : The call was initiated. The callback will be invoked when the call completes.
693 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
695 * When the callback is invoked, status indicates the result:
696 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
697 * data is SETATTR3res *
698 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
699 * data is the error string.
700 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
704 EXTERN
int rpc_nfs3_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
705 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
710 * 0 : The call was initiated. The callback will be invoked when the call completes.
711 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
713 * When the callback is invoked, status indicates the result:
714 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
715 * data is MKDIR3res *
716 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
717 * data is the error string.
718 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
722 EXTERN
int rpc_nfs3_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
723 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
728 * 0 : The call was initiated. The callback will be invoked when the call completes.
729 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
731 * When the callback is invoked, status indicates the result:
732 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
733 * data is RMDIR3res *
734 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
735 * data is the error string.
736 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
740 EXTERN
int rpc_nfs3_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
741 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
746 * 0 : The call was initiated. The callback will be invoked when the call completes.
747 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
749 * When the callback is invoked, status indicates the result:
750 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
751 * data is CREATE3res *
752 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
753 * data is the error string.
754 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
758 EXTERN
int rpc_nfs3_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
759 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
764 * 0 : The call was initiated. The callback will be invoked when the call completes.
765 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
767 * When the callback is invoked, status indicates the result:
768 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
769 * data is MKNOD3res *
770 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
771 * data is the error string.
772 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
776 EXTERN
int rpc_nfs3_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
777 EXTERN
int rpc_nfs_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *file
, int mode
, int major
, int minor
, void *private_data
);
782 * 0 : The call was initiated. The callback will be invoked when the call completes.
783 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
785 * When the callback is invoked, status indicates the result:
786 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
787 * data is REMOVE3res *
788 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
789 * data is the error string.
790 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
794 EXTERN
int rpc_nfs3_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
795 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
800 * 0 : The call was initiated. The callback will be invoked when the call completes.
801 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
803 * When the callback is invoked, status indicates the result:
804 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
805 * data is READDIR3res *
806 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
807 * data is the error string.
808 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
812 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
813 EXTERN
int rpc_nfs_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint64_t cookie
, char *cookieverf
, int count
, void *private_data
);
816 * Call NFS3/READDIRPLUS
818 * 0 : The call was initiated. The callback will be invoked when the call completes.
819 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
821 * When the callback is invoked, status indicates the result:
822 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
823 * data is READDIRPLUS3res *
824 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
825 * data is the error string.
826 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
829 struct READDIRPLUS3args
;
830 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
831 EXTERN
int rpc_nfs_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint64_t cookie
, char *cookieverf
, int count
, void *private_data
);
836 * 0 : The call was initiated. The callback will be invoked when the call completes.
837 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
839 * When the callback is invoked, status indicates the result:
840 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
842 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
843 * data is the error string.
844 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
848 EXTERN
int rpc_nfs3_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
849 EXTERN
int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
854 * 0 : The call was initiated. The callback will be invoked when the call completes.
855 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
857 * When the callback is invoked, status indicates the result:
858 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
860 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
861 * data is the error string.
862 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
866 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
867 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
872 * 0 : The call was initiated. The callback will be invoked when the call completes.
873 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
875 * When the callback is invoked, status indicates the result:
876 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
877 * data is READLINK3res *
878 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
879 * data is the error string.
880 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
883 struct READLINK3args
;
884 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
885 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
890 * 0 : The call was initiated. The callback will be invoked when the call completes.
891 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
893 * When the callback is invoked, status indicates the result:
894 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
895 * data is SYMLINK3res *
896 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
897 * data is the error string.
898 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
902 EXTERN
int rpc_nfs3_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
903 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
908 * 0 : The call was initiated. The callback will be invoked when the call completes.
909 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
911 * When the callback is invoked, status indicates the result:
912 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
913 * data is RENAME3res *
914 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
915 * data is the error string.
916 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
920 EXTERN
int rpc_nfs3_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
921 EXTERN
int rpc_nfs_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*olddir
, char *oldname
, struct nfs_fh3
*newdir
, char *newname
, void *private_data
);
926 * 0 : The call was initiated. The callback will be invoked when the call completes.
927 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
929 * When the callback is invoked, status indicates the result:
930 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
932 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
933 * data is the error string.
934 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
938 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
939 EXTERN
int rpc_nfs_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*file
, struct nfs_fh3
*newdir
, char *newname
, void *private_data
);
948 * 0 : The call was initiated. The callback will be invoked when the call completes.
949 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
951 * When the callback is invoked, status indicates the result:
952 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
954 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
955 * data is the error string.
956 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
959 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
964 * 0 : The call was initiated. The callback will be invoked when the call completes.
965 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
967 * When the callback is invoked, status indicates the result:
968 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
969 * data is GETATTR2res
970 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
971 * data is the error string.
972 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
976 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
981 * 0 : The call was initiated. The callback will be invoked when the call completes.
982 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
984 * When the callback is invoked, status indicates the result:
985 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
986 * data is SETATTR2res *
987 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
988 * data is the error string.
989 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
993 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
998 * 0 : The call was initiated. The callback will be invoked when the call completes.
999 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1001 * When the callback is invoked, status indicates the result:
1002 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1003 * data is LOOKUP2res
1004 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1005 * data is the error string.
1006 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1010 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*args
, void *private_data
);
1013 * Call NFS2/READLINK
1015 * 0 : The call was initiated. The callback will be invoked when the call completes.
1016 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1018 * When the callback is invoked, status indicates the result:
1019 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1020 * data is READLINK2res *
1021 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1022 * data is the error string.
1023 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1026 struct READLINK2args
;
1027 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
1032 * 0 : The call was initiated. The callback will be invoked when the call completes.
1033 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1035 * When the callback is invoked, status indicates the result:
1036 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1038 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1039 * data is the error string.
1040 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1044 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
1049 * 0 : The call was initiated. The callback will be invoked when the call completes.
1050 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1052 * When the callback is invoked, status indicates the result:
1053 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1054 * data is WRITE2res *
1055 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1056 * data is the error string.
1057 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1061 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
1066 * 0 : The call was initiated. The callback will be invoked when the call completes.
1067 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1069 * When the callback is invoked, status indicates the result:
1070 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1071 * data is CREATE2res *
1072 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1073 * data is the error string.
1074 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1078 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
1083 * 0 : The call was initiated. The callback will be invoked when the call completes.
1084 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1086 * When the callback is invoked, status indicates the result:
1087 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1088 * data is REMOVE2res *
1089 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1090 * data is the error string.
1091 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1095 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
1100 * 0 : The call was initiated. The callback will be invoked when the call completes.
1101 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1103 * When the callback is invoked, status indicates the result:
1104 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1105 * data is RENAME2res *
1106 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1107 * data is the error string.
1108 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1112 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
1117 * 0 : The call was initiated. The callback will be invoked when the call completes.
1118 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1120 * When the callback is invoked, status indicates the result:
1121 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1122 * data is LINK2res *
1123 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1124 * data is the error string.
1125 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1129 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
1134 * 0 : The call was initiated. The callback will be invoked when the call completes.
1135 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1137 * When the callback is invoked, status indicates the result:
1138 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1139 * data is SYMLINK2res *
1140 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1141 * data is the error string.
1142 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1145 struct SYMLINK2args
;
1146 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
1151 * 0 : The call was initiated. The callback will be invoked when the call completes.
1152 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1154 * When the callback is invoked, status indicates the result:
1155 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1156 * data is MKDIR2res *
1157 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1158 * data is the error string.
1159 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1163 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
1168 * 0 : The call was initiated. The callback will be invoked when the call completes.
1169 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1171 * When the callback is invoked, status indicates the result:
1172 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1173 * data is RMDIR2res *
1174 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1175 * data is the error string.
1176 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1180 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
1185 * 0 : The call was initiated. The callback will be invoked when the call completes.
1186 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1188 * When the callback is invoked, status indicates the result:
1189 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1190 * data is READDIR2res *
1191 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1192 * data is the error string.
1193 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1196 struct READDIR2args
;
1197 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
1202 * 0 : The call was initiated. The callback will be invoked when the call completes.
1203 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1205 * When the callback is invoked, status indicates the result:
1206 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1207 * data is STATFS2res *
1208 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1209 * data is the error string.
1210 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1214 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
1219 char *rquotastat_to_str(int error
);
1220 int rquotastat_to_errno(int error
);
1225 * 0 : The call was initiated. The callback will be invoked when the call completes.
1226 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1228 * When the callback is invoked, status indicates the result:
1229 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1231 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1232 * data is the error string.
1233 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1236 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1239 * Call RQUOTA1/GETQUOTA
1241 * 0 : The call was initiated. The callback will be invoked when the call completes.
1242 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1244 * When the callback is invoked, status indicates the result:
1245 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1246 * data is a RQUOTA1res structure.
1247 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1248 * data is the error string.
1249 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1252 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1255 * Call RQUOTA1/GETACTIVEQUOTA
1257 * 0 : The call was initiated. The callback will be invoked when the call completes.
1258 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1260 * When the callback is invoked, status indicates the result:
1261 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1262 * data is a RQUOTA1res structure.
1263 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1264 * data is the error string.
1265 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1268 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1276 * 0 : The call was initiated. The callback will be invoked when the call completes.
1277 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1279 * When the callback is invoked, status indicates the result:
1280 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1282 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1283 * data is the error string.
1284 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1287 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1290 * Call RQUOTA2/GETQUOTA
1292 * 0 : The call was initiated. The callback will be invoked when the call completes.
1293 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1295 * When the callback is invoked, status indicates the result:
1296 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1297 * data is a RQUOTA1res structure.
1298 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1299 * data is the error string.
1300 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1303 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1306 * Call RQUOTA2/GETACTIVEQUOTA
1308 * 0 : The call was initiated. The callback will be invoked when the call completes.
1309 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1311 * When the callback is invoked, status indicates the result:
1312 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1313 * data is a RQUOTA1res structure.
1314 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1315 * data is the error string.
1316 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1319 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1332 * Call the NULL procedure for the NFSACL
1335 * 0 : The call was initiated. The callback will be invoked when the call completes.
1336 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1338 * When the callback is invoked, status indicates the result:
1339 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1341 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1342 * data is the error string.
1343 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1346 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1349 * Call NFSACL/GETACL
1352 * 0 : The call was initiated. The callback will be invoked when the call completes.
1353 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1355 * When the callback is invoked, status indicates the result:
1356 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1357 * data is a GETACL3res pointer
1358 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1359 * data is the error string.
1360 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1364 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1369 * Call NFSACL/SETACL
1372 * 0 : The call was initiated. The callback will be invoked when the call completes.
1373 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1375 * When the callback is invoked, status indicates the result:
1376 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1377 * data is a SETACL3res pointer
1378 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1379 * data is the error string.
1380 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1384 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1392 char *nlmstat4_to_str(int stat
);
1396 * Call the NULL procedure for the NLM protocol
1399 * 0 : The call was initiated. The callback will be invoked when the call completes.
1400 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1402 * When the callback is invoked, status indicates the result:
1403 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1405 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1406 * data is the error string.
1407 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1410 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1414 * Call the TEST procedure for the NLM protocol
1417 * 0 : The call was initiated. The callback will be invoked when the call completes.
1418 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1420 * When the callback is invoked, status indicates the result:
1421 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1422 * data is NLM4_TESTres
1423 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1424 * data is the error string.
1425 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1428 struct NLM4_TESTargs
;
1429 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1433 * Call the LOCK procedure for the NLM protocol
1436 * 0 : The call was initiated. The callback will be invoked when the call completes.
1437 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1439 * When the callback is invoked, status indicates the result:
1440 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1441 * data is NLM4_LOCKres
1442 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1443 * data is the error string.
1444 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1447 struct NLM4_LOCKargs
;
1448 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1452 * Call the CANCEL procedure for the NLM protocol
1455 * 0 : The call was initiated. The callback will be invoked when the call completes.
1456 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1458 * When the callback is invoked, status indicates the result:
1459 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1460 * data is NLM4_CANCres
1461 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1462 * data is the error string.
1463 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1466 struct NLM4_CANCargs
;
1467 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1471 * Call the UNLOCK procedure for the NLM protocol
1474 * 0 : The call was initiated. The callback will be invoked when the call completes.
1475 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1477 * When the callback is invoked, status indicates the result:
1478 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1479 * data is NLM4_UNLOCKres
1480 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1481 * data is the error string.
1482 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1485 struct NLM4_UNLOCKargs
;
1486 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1491 char *nsmstat1_to_str(int stat
);
1495 * Call the NULL procedure for the NSM protocol
1498 * 0 : The call was initiated. The callback will be invoked when the call completes.
1499 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1501 * When the callback is invoked, status indicates the result:
1502 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1504 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1505 * data is the error string.
1506 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1509 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1513 * Call the STAT procedure for the NSM protocol
1516 * 0 : The call was initiated. The callback will be invoked when the call completes.
1517 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1519 * When the callback is invoked, status indicates the result:
1520 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1521 * data is NSM1_STATres
1522 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1523 * data is the error string.
1524 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1527 struct NSM1_STATargs
;
1528 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1532 * Call the MON procedure for the NSM protocol
1535 * 0 : The call was initiated. The callback will be invoked when the call completes.
1536 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1538 * When the callback is invoked, status indicates the result:
1539 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1540 * data is NSM1_MONres
1541 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1542 * data is the error string.
1543 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1546 struct NSM1_MONargs
;
1547 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1551 * Call the UNMON procedure for the NSM protocol
1554 * 0 : The call was initiated. The callback will be invoked when the call completes.
1555 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1557 * When the callback is invoked, status indicates the result:
1558 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1559 * data is NSM1_UNMONres
1560 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1561 * data is the error string.
1562 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1565 struct NSM1_UNMONargs
;
1566 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1570 * Call the UNMONALL procedure for the NSM protocol
1573 * 0 : The call was initiated. The callback will be invoked when the call completes.
1574 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1576 * When the callback is invoked, status indicates the result:
1577 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1578 * data is NSM1_UNMONALLres
1579 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1580 * data is the error string.
1581 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1584 struct NSM1_UNMONALLargs
;
1585 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1588 * Call NSM/SIMUCRASH
1589 * Call the SIMUCRASH procedure for the NSM protocol
1592 * 0 : The call was initiated. The callback will be invoked when the call completes.
1593 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1595 * When the callback is invoked, status indicates the result:
1596 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1598 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1599 * data is the error string.
1600 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1603 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1607 * Call the NOTIFY procedure for the NSM protocol
1610 * 0 : The call was initiated. The callback will be invoked when the call completes.
1611 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1613 * When the callback is invoked, status indicates the result:
1614 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1616 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1617 * data is the error string.
1618 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1621 struct NSM1_NOTIFYargs
;
1622 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);