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/DUMP.
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.
250 * data is struct pmap3_dump_result.
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 EXTERN
int rpc_pmap3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
262 char *mountstat3_to_str(int stat
);
263 int mountstat3_to_errno(int error
);
268 * 0 : The call was initiated. The callback will be invoked when the call completes.
269 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
271 * When the callback is invoked, status indicates the result:
272 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
274 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
275 * data is the error string.
276 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
279 EXTERN
int rpc_mount3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
280 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
285 * 0 : The call was initiated. The callback will be invoked when the call completes.
286 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
288 * When the callback is invoked, status indicates the result:
289 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
290 * data is union mountres3.
291 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
292 * data is the error string.
293 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
296 EXTERN
int rpc_mount3_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
297 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
302 * 0 : The call was initiated. The callback will be invoked when the call completes.
303 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
305 * When the callback is invoked, status indicates the result:
306 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
307 * data is a mountlist.
308 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
309 * data is the error string.
310 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
313 EXTERN
int rpc_mount3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
314 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
319 * 0 : The call was initiated. The callback will be invoked when the call completes.
320 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
322 * When the callback is invoked, status indicates the result:
323 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
325 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
326 * data is the error string.
327 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
330 EXTERN
int rpc_mount3_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
331 EXTERN
int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
334 * Call MOUNT3/UMNTALL
336 * 0 : The call was initiated. The callback will be invoked when the call completes.
337 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
339 * When the callback is invoked, status indicates the result:
340 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
342 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
343 * data is the error string.
344 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
347 EXTERN
int rpc_mount3_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
348 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
352 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
353 * returned structures.
356 * 0 : The call was initiated. The callback will be invoked when the call completes.
357 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
359 * When the callback is invoked, status indicates the result:
360 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
361 * data is a pointer to an exports pointer:
362 * exports export = *(exports *)data;
363 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
364 * data is the error string.
365 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
368 EXTERN
int rpc_mount3_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
369 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
372 * MOUNT v1 FUNCTIONS (Used with NFSv2)
377 * 0 : The call was initiated. The callback will be invoked when the call completes.
378 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
380 * When the callback is invoked, status indicates the result:
381 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
383 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
384 * data is the error string.
385 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
388 EXTERN
int rpc_mount1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
393 * 0 : The call was initiated. The callback will be invoked when the call completes.
394 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
396 * When the callback is invoked, status indicates the result:
397 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
398 * data is union mountres1.
399 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
400 * data is the error string.
401 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
404 EXTERN
int rpc_mount1_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
409 * 0 : The call was initiated. The callback will be invoked when the call completes.
410 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
412 * When the callback is invoked, status indicates the result:
413 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
414 * data is a mountlist.
415 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
416 * data is the error string.
417 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
420 EXTERN
int rpc_mount1_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
425 * 0 : The call was initiated. The callback will be invoked when the call completes.
426 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
428 * When the callback is invoked, status indicates the result:
429 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
431 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
432 * data is the error string.
433 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
436 EXTERN
int rpc_mount1_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
439 * Call MOUNT1/UMNTALL
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_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
456 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
457 * returned structures.
460 * 0 : The call was initiated. The callback will be invoked when the call completes.
461 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
463 * When the callback is invoked, status indicates the result:
464 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
465 * data is a pointer to an exports pointer:
466 * exports export = *(exports *)data;
467 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
468 * data is the error string.
469 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
472 EXTERN
int rpc_mount1_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
479 char *nfsstat3_to_str(int error
);
480 int nfsstat3_to_errno(int error
);
485 * 0 : The call was initiated. The callback will be invoked when the call completes.
486 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
488 * When the callback is invoked, status indicates the result:
489 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
491 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
492 * data is the error string.
493 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
496 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
497 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
502 * 0 : The call was initiated. The callback will be invoked when the call completes.
503 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
505 * When the callback is invoked, status indicates the result:
506 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
507 * data is GETATTR3res
508 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
509 * data is the error string.
510 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
514 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
515 EXTERN
int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
520 * 0 : The call was initiated. The callback will be invoked when the call completes.
521 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
523 * When the callback is invoked, status indicates the result:
524 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
525 * data is PATHCONF3res
526 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
527 * data is the error string.
528 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
531 struct PATHCONF3args
;
532 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
533 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, 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 nfs daemon.
544 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
545 * data is the error string.
546 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
550 EXTERN
int rpc_nfs3_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
551 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
556 * 0 : The call was initiated. The callback will be invoked when the call completes.
557 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
559 * When the callback is invoked, status indicates the result:
560 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
562 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
563 * data is the error string.
564 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
568 EXTERN
int rpc_nfs3_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
569 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
574 * 0 : The call was initiated. The callback will be invoked when the call completes.
575 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
577 * When the callback is invoked, status indicates the result:
578 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
580 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
581 * data is the error string.
582 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
586 EXTERN
int rpc_nfs3_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
587 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
);
592 * 0 : The call was initiated. The callback will be invoked when the call completes.
593 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
595 * When the callback is invoked, status indicates the result:
596 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
597 * data is WRITE3res *
598 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
599 * data is the error string.
600 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
604 EXTERN
int rpc_nfs3_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
605 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
);
610 * 0 : The call was initiated. The callback will be invoked when the call completes.
611 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
613 * When the callback is invoked, status indicates the result:
614 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
615 * data is COMMIT3res *
616 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
617 * data is the error string.
618 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
622 EXTERN
int rpc_nfs3_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
623 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
628 * 0 : The call was initiated. The callback will be invoked when the call completes.
629 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
631 * When the callback is invoked, status indicates the result:
632 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
633 * data is SETATTR3res *
634 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
635 * data is the error string.
636 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
640 EXTERN
int rpc_nfs3_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
641 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
646 * 0 : The call was initiated. The callback will be invoked when the call completes.
647 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
649 * When the callback is invoked, status indicates the result:
650 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
651 * data is MKDIR3res *
652 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
653 * data is the error string.
654 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
658 EXTERN
int rpc_nfs3_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
659 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
664 * 0 : The call was initiated. The callback will be invoked when the call completes.
665 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
667 * When the callback is invoked, status indicates the result:
668 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
669 * data is RMDIR3res *
670 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
671 * data is the error string.
672 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
676 EXTERN
int rpc_nfs3_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
677 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
682 * 0 : The call was initiated. The callback will be invoked when the call completes.
683 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
685 * When the callback is invoked, status indicates the result:
686 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
687 * data is CREATE3res *
688 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
689 * data is the error string.
690 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
694 EXTERN
int rpc_nfs3_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
695 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
700 * 0 : The call was initiated. The callback will be invoked when the call completes.
701 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
703 * When the callback is invoked, status indicates the result:
704 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
705 * data is MKNOD3res *
706 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
707 * data is the error string.
708 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
712 EXTERN
int rpc_nfs3_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
713 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
);
718 * 0 : The call was initiated. The callback will be invoked when the call completes.
719 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
721 * When the callback is invoked, status indicates the result:
722 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
723 * data is REMOVE3res *
724 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
725 * data is the error string.
726 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
730 EXTERN
int rpc_nfs3_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
731 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
736 * 0 : The call was initiated. The callback will be invoked when the call completes.
737 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
739 * When the callback is invoked, status indicates the result:
740 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
741 * data is READDIR3res *
742 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
743 * data is the error string.
744 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
748 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
749 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
);
752 * Call NFS3/READDIRPLUS
754 * 0 : The call was initiated. The callback will be invoked when the call completes.
755 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
757 * When the callback is invoked, status indicates the result:
758 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
759 * data is READDIRPLUS3res *
760 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
761 * data is the error string.
762 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
765 struct READDIRPLUS3args
;
766 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
767 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
);
772 * 0 : The call was initiated. The callback will be invoked when the call completes.
773 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
775 * When the callback is invoked, status indicates the result:
776 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
778 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
779 * data is the error string.
780 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
784 EXTERN
int rpc_nfs3_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
785 EXTERN
int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
790 * 0 : The call was initiated. The callback will be invoked when the call completes.
791 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
793 * When the callback is invoked, status indicates the result:
794 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
796 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
797 * data is the error string.
798 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
802 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
803 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
808 * 0 : The call was initiated. The callback will be invoked when the call completes.
809 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
811 * When the callback is invoked, status indicates the result:
812 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
813 * data is READLINK3res *
814 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
815 * data is the error string.
816 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
819 struct READLINK3args
;
820 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
821 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
826 * 0 : The call was initiated. The callback will be invoked when the call completes.
827 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
829 * When the callback is invoked, status indicates the result:
830 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
831 * data is SYMLINK3res *
832 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
833 * data is the error string.
834 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
838 EXTERN
int rpc_nfs3_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
839 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
844 * 0 : The call was initiated. The callback will be invoked when the call completes.
845 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
847 * When the callback is invoked, status indicates the result:
848 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
849 * data is RENAME3res *
850 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
851 * data is the error string.
852 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
856 EXTERN
int rpc_nfs3_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
857 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
);
862 * 0 : The call was initiated. The callback will be invoked when the call completes.
863 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
865 * When the callback is invoked, status indicates the result:
866 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
868 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
869 * data is the error string.
870 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
874 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
875 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
);
884 * 0 : The call was initiated. The callback will be invoked when the call completes.
885 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
887 * When the callback is invoked, status indicates the result:
888 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
890 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
891 * data is the error string.
892 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
895 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
900 * 0 : The call was initiated. The callback will be invoked when the call completes.
901 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
903 * When the callback is invoked, status indicates the result:
904 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
905 * data is GETATTR2res
906 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
907 * data is the error string.
908 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
912 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
917 * 0 : The call was initiated. The callback will be invoked when the call completes.
918 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
920 * When the callback is invoked, status indicates the result:
921 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
922 * data is SETATTR2res *
923 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
924 * data is the error string.
925 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
929 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
934 * 0 : The call was initiated. The callback will be invoked when the call completes.
935 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
937 * When the callback is invoked, status indicates the result:
938 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
940 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
941 * data is the error string.
942 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
946 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*args
, void *private_data
);
951 * 0 : The call was initiated. The callback will be invoked when the call completes.
952 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
954 * When the callback is invoked, status indicates the result:
955 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
956 * data is READLINK2res *
957 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
958 * data is the error string.
959 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
962 struct READLINK2args
;
963 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
968 * 0 : The call was initiated. The callback will be invoked when the call completes.
969 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
971 * When the callback is invoked, status indicates the result:
972 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
974 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
975 * data is the error string.
976 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
980 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
985 * 0 : The call was initiated. The callback will be invoked when the call completes.
986 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
988 * When the callback is invoked, status indicates the result:
989 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
990 * data is WRITE2res *
991 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
992 * data is the error string.
993 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
997 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
1002 * 0 : The call was initiated. The callback will be invoked when the call completes.
1003 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1005 * When the callback is invoked, status indicates the result:
1006 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1007 * data is CREATE2res *
1008 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1009 * data is the error string.
1010 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1014 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
1019 * 0 : The call was initiated. The callback will be invoked when the call completes.
1020 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1022 * When the callback is invoked, status indicates the result:
1023 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1024 * data is REMOVE2res *
1025 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1026 * data is the error string.
1027 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1031 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
1036 * 0 : The call was initiated. The callback will be invoked when the call completes.
1037 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1039 * When the callback is invoked, status indicates the result:
1040 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1041 * data is RENAME2res *
1042 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1043 * data is the error string.
1044 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1048 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
1053 * 0 : The call was initiated. The callback will be invoked when the call completes.
1054 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1056 * When the callback is invoked, status indicates the result:
1057 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1058 * data is LINK2res *
1059 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1060 * data is the error string.
1061 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1065 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
1070 * 0 : The call was initiated. The callback will be invoked when the call completes.
1071 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1073 * When the callback is invoked, status indicates the result:
1074 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1075 * data is SYMLINK2res *
1076 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1077 * data is the error string.
1078 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1081 struct SYMLINK2args
;
1082 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
1087 * 0 : The call was initiated. The callback will be invoked when the call completes.
1088 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1090 * When the callback is invoked, status indicates the result:
1091 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1092 * data is MKDIR2res *
1093 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1094 * data is the error string.
1095 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1099 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
1104 * 0 : The call was initiated. The callback will be invoked when the call completes.
1105 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1107 * When the callback is invoked, status indicates the result:
1108 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1109 * data is RMDIR2res *
1110 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1111 * data is the error string.
1112 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1116 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
1121 * 0 : The call was initiated. The callback will be invoked when the call completes.
1122 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1124 * When the callback is invoked, status indicates the result:
1125 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1126 * data is READDIR2res *
1127 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1128 * data is the error string.
1129 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1132 struct READDIR2args
;
1133 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
1138 * 0 : The call was initiated. The callback will be invoked when the call completes.
1139 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1141 * When the callback is invoked, status indicates the result:
1142 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1143 * data is STATFS2res *
1144 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1145 * data is the error string.
1146 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1150 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
1155 char *rquotastat_to_str(int error
);
1156 int rquotastat_to_errno(int error
);
1161 * 0 : The call was initiated. The callback will be invoked when the call completes.
1162 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1164 * When the callback is invoked, status indicates the result:
1165 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1167 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1168 * data is the error string.
1169 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1172 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1175 * Call RQUOTA1/GETQUOTA
1177 * 0 : The call was initiated. The callback will be invoked when the call completes.
1178 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1180 * When the callback is invoked, status indicates the result:
1181 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1182 * data is a RQUOTA1res structure.
1183 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1184 * data is the error string.
1185 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1188 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1191 * Call RQUOTA1/GETACTIVEQUOTA
1193 * 0 : The call was initiated. The callback will be invoked when the call completes.
1194 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1196 * When the callback is invoked, status indicates the result:
1197 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1198 * data is a RQUOTA1res structure.
1199 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1200 * data is the error string.
1201 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1204 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1212 * 0 : The call was initiated. The callback will be invoked when the call completes.
1213 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1215 * When the callback is invoked, status indicates the result:
1216 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1218 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1219 * data is the error string.
1220 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1223 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1226 * Call RQUOTA2/GETQUOTA
1228 * 0 : The call was initiated. The callback will be invoked when the call completes.
1229 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1231 * When the callback is invoked, status indicates the result:
1232 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1233 * data is a RQUOTA1res structure.
1234 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1235 * data is the error string.
1236 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1239 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1242 * Call RQUOTA2/GETACTIVEQUOTA
1244 * 0 : The call was initiated. The callback will be invoked when the call completes.
1245 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1247 * When the callback is invoked, status indicates the result:
1248 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1249 * data is a RQUOTA1res structure.
1250 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1251 * data is the error string.
1252 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1255 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1268 * Call the NULL procedure for the NFSACL
1271 * 0 : The call was initiated. The callback will be invoked when the call completes.
1272 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1274 * When the callback is invoked, status indicates the result:
1275 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1277 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1278 * data is the error string.
1279 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1282 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1285 * Call NFSACL/GETACL
1288 * 0 : The call was initiated. The callback will be invoked when the call completes.
1289 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1291 * When the callback is invoked, status indicates the result:
1292 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1293 * data is a GETACL3res pointer
1294 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1295 * data is the error string.
1296 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1300 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1305 * Call NFSACL/SETACL
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 nfs daemon.
1313 * data is a SETACL3res pointer
1314 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1315 * data is the error string.
1316 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1320 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1328 char *nlmstat4_to_str(int stat
);
1332 * Call the NULL procedure for the NLM protocol
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 nlm daemon.
1341 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1342 * data is the error string.
1343 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1346 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1350 * Call the TEST procedure for the NLM protocol
1353 * 0 : The call was initiated. The callback will be invoked when the call completes.
1354 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1356 * When the callback is invoked, status indicates the result:
1357 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1358 * data is NLM4_TESTres
1359 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1360 * data is the error string.
1361 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1364 struct NLM4_TESTargs
;
1365 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1369 * Call the LOCK procedure for the NLM protocol
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 nlm daemon.
1377 * data is NLM4_LOCKres
1378 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1379 * data is the error string.
1380 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1383 struct NLM4_LOCKargs
;
1384 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1388 * Call the CANCEL procedure for the NLM protocol
1391 * 0 : The call was initiated. The callback will be invoked when the call completes.
1392 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1394 * When the callback is invoked, status indicates the result:
1395 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1396 * data is NLM4_CANCres
1397 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1398 * data is the error string.
1399 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1402 struct NLM4_CANCargs
;
1403 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1407 * Call the UNLOCK procedure for the NLM protocol
1410 * 0 : The call was initiated. The callback will be invoked when the call completes.
1411 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1413 * When the callback is invoked, status indicates the result:
1414 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1415 * data is NLM4_UNLOCKres
1416 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1417 * data is the error string.
1418 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1421 struct NLM4_UNLOCKargs
;
1422 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1427 char *nsmstat1_to_str(int stat
);
1431 * Call the NULL procedure for the NSM protocol
1434 * 0 : The call was initiated. The callback will be invoked when the call completes.
1435 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1437 * When the callback is invoked, status indicates the result:
1438 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1440 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1441 * data is the error string.
1442 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1445 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1449 * Call the STAT procedure for the NSM protocol
1452 * 0 : The call was initiated. The callback will be invoked when the call completes.
1453 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1455 * When the callback is invoked, status indicates the result:
1456 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1457 * data is NSM1_STATres
1458 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1459 * data is the error string.
1460 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1463 struct NSM1_STATargs
;
1464 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1468 * Call the MON procedure for the NSM protocol
1471 * 0 : The call was initiated. The callback will be invoked when the call completes.
1472 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1474 * When the callback is invoked, status indicates the result:
1475 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1476 * data is NSM1_MONres
1477 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1478 * data is the error string.
1479 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1482 struct NSM1_MONargs
;
1483 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1487 * Call the UNMON procedure for the NSM protocol
1490 * 0 : The call was initiated. The callback will be invoked when the call completes.
1491 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1493 * When the callback is invoked, status indicates the result:
1494 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1495 * data is NSM1_UNMONres
1496 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1497 * data is the error string.
1498 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1501 struct NSM1_UNMONargs
;
1502 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1506 * Call the UNMONALL procedure for the NSM protocol
1509 * 0 : The call was initiated. The callback will be invoked when the call completes.
1510 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1512 * When the callback is invoked, status indicates the result:
1513 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1514 * data is NSM1_UNMONALLres
1515 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1516 * data is the error string.
1517 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1520 struct NSM1_UNMONALLargs
;
1521 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1524 * Call NSM/SIMUCRASH
1525 * Call the SIMUCRASH procedure for the NSM protocol
1528 * 0 : The call was initiated. The callback will be invoked when the call completes.
1529 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1531 * When the callback is invoked, status indicates the result:
1532 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1534 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1535 * data is the error string.
1536 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1539 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1543 * Call the NOTIFY procedure for the NSM protocol
1546 * 0 : The call was initiated. The callback will be invoked when the call completes.
1547 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1549 * When the callback is invoked, status indicates the result:
1550 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1552 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1553 * data is the error string.
1554 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1557 struct NSM1_NOTIFYargs
;
1558 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);