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.
32 struct rpc_context
*rpc_init_context(void);
33 void rpc_destroy_context(struct rpc_context
*rpc
);
35 void rpc_set_auth(struct rpc_context
*rpc
, AUTH
*auth
);
37 int rpc_get_fd(struct rpc_context
*rpc
);
38 int rpc_which_events(struct rpc_context
*rpc
);
39 int rpc_service(struct rpc_context
*rpc
, int revents
);
40 char *rpc_get_error(struct rpc_context
*rpc
);
41 int rpc_queue_length(struct rpc_context
*rpc
);
44 #define RPC_STATUS_SUCCESS 0
45 #define RPC_STATUS_ERROR 1
46 #define RPC_STATUS_CANCEL 2
49 * Async connection to the tcp port at server:port.
51 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
52 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
54 * When the callback is invoked, status indicates the result:
55 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
57 * RPC_STATUS_ERROR : The connection failed to establish.
58 * data is the erro string.
59 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
62 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
64 * When disconnecting a connection in flight. All commands in flight will be called with the callback
65 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
67 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
75 * Call PORTMAPPER/NULL
77 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
78 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
80 * When the callback is invoked, status indicates the result:
81 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
83 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
84 * data is the error string.
85 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
88 int rpc_pmap_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
92 * Call PORTMAPPER/GETPORT.
94 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
95 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
97 * When the callback is invoked, status indicates the result:
98 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
99 * data is a (uint32_t *), containing the port returned.
100 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
101 * data is the error string.
102 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
105 int rpc_pmap_getport_async(struct rpc_context
*rpc
, int program
, int version
, rpc_cb cb
, void *private_data
);
109 * Call PORTMAPPER/CALLIT.
111 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
112 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
114 * When the callback is invoked, status indicates the result:
115 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
116 * data is a 'pmap_call_result' pointer.
117 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
118 * data is the error string.
119 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
122 int rpc_pmap_callit_async(struct rpc_context
*rpc
, int program
, int version
, int procedure
, const char *data
, int datalen
, rpc_cb cb
, void *private_data
);
127 char *mountstat3_to_str(int stat
);
128 int mountstat3_to_errno(int error
);
133 * 0 : The call was initiated. The callback will be invoked when the call completes.
134 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
136 * When the callback is invoked, status indicates the result:
137 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
139 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
140 * data is the error string.
141 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
144 int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
149 * 0 : The call was initiated. The callback will be invoked when the call completes.
150 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
152 * When the callback is invoked, status indicates the result:
153 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
154 * data is union mountres3.
155 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
156 * data is the error string.
157 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
160 int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
165 * 0 : The call was initiated. The callback will be invoked when the call completes.
166 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
168 * When the callback is invoked, status indicates the result:
169 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
170 * data is a mountlist.
171 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
172 * data is the error string.
173 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
176 int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
181 * 0 : The call was initiated. The callback will be invoked when the call completes.
182 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
184 * When the callback is invoked, status indicates the result:
185 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
187 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
188 * data is the error string.
189 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
192 int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
197 * 0 : The call was initiated. The callback will be invoked when the call completes.
198 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
200 * When the callback is invoked, status indicates the result:
201 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
203 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
204 * data is the error string.
205 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
208 int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
212 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
213 * returned structures.
216 * 0 : The call was initiated. The callback will be invoked when the call completes.
217 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
219 * When the callback is invoked, status indicates the result:
220 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
221 * data is a pointer to an exports pointer:
222 * exports export = *(exports *)data;
223 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
224 * data is the error string.
225 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
228 int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
237 char *nfsstat3_to_str(int error
);
238 int nfsstat3_to_errno(int error
);
243 * 0 : The call was initiated. The callback will be invoked when the call completes.
244 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
246 * When the callback is invoked, status indicates the result:
247 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
249 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
250 * data is the error string.
251 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
254 int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
259 * 0 : The call was initiated. The callback will be invoked when the call completes.
260 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
262 * When the callback is invoked, status indicates the result:
263 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
264 * data is GETATTR3res
265 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
266 * data is the error string.
267 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
270 int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
275 * 0 : The call was initiated. The callback will be invoked when the call completes.
276 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
278 * When the callback is invoked, status indicates the result:
279 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
281 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
282 * data is the error string.
283 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
286 int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
291 * 0 : The call was initiated. The callback will be invoked when the call completes.
292 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
294 * When the callback is invoked, status indicates the result:
295 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
297 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
298 * data is the error string.
299 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
302 int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
307 * 0 : The call was initiated. The callback will be invoked when the call completes.
308 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
310 * When the callback is invoked, status indicates the result:
311 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
313 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
314 * data is the error string.
315 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
318 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
);
323 * 0 : The call was initiated. The callback will be invoked when the call completes.
324 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
326 * When the callback is invoked, status indicates the result:
327 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
328 * data is WRITE3res *
329 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
330 * data is the error string.
331 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
334 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
);
339 * 0 : The call was initiated. The callback will be invoked when the call completes.
340 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
342 * When the callback is invoked, status indicates the result:
343 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
344 * data is COMMIT3res *
345 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
346 * data is the error string.
347 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
350 int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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 nfs daemon.
361 * data is SETATTR3res *
362 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
363 * data is the error string.
364 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
368 int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
375 * 0 : The call was initiated. The callback will be invoked when the call completes.
376 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
378 * When the callback is invoked, status indicates the result:
379 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
380 * data is MKDIR3res *
381 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
382 * data is the error string.
383 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
386 int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
395 * 0 : The call was initiated. The callback will be invoked when the call completes.
396 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
398 * When the callback is invoked, status indicates the result:
399 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
400 * data is RMDIR3res *
401 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
402 * data is the error string.
403 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
406 int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
414 * 0 : The call was initiated. The callback will be invoked when the call completes.
415 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
417 * When the callback is invoked, status indicates the result:
418 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
419 * data is CREATE3res *
420 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
421 * data is the error string.
422 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
425 int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, int mode
, void *private_data
);
431 * 0 : The call was initiated. The callback will be invoked when the call completes.
432 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
434 * When the callback is invoked, status indicates the result:
435 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
436 * data is MKNOD3res *
437 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
438 * data is the error string.
439 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
442 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
);
448 * 0 : The call was initiated. The callback will be invoked when the call completes.
449 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
451 * When the callback is invoked, status indicates the result:
452 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
453 * data is REMOVE3res *
454 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
455 * data is the error string.
456 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
459 int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
466 * 0 : The call was initiated. The callback will be invoked when the call completes.
467 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
469 * When the callback is invoked, status indicates the result:
470 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
471 * data is READDIR3res *
472 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
473 * data is the error string.
474 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
477 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
);
480 * Call NFS/READDIRPLUS
482 * 0 : The call was initiated. The callback will be invoked when the call completes.
483 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
485 * When the callback is invoked, status indicates the result:
486 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
487 * data is READDIRPLUS3res *
488 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
489 * data is the error string.
490 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
493 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
);
498 * 0 : The call was initiated. The callback will be invoked when the call completes.
499 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
501 * When the callback is invoked, status indicates the result:
502 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
504 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
505 * data is the error string.
506 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
509 int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
516 * 0 : The call was initiated. The callback will be invoked when the call completes.
517 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
519 * When the callback is invoked, status indicates the result:
520 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
522 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
523 * data is the error string.
524 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
527 int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
534 * 0 : The call was initiated. The callback will be invoked when the call completes.
535 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
537 * When the callback is invoked, status indicates the result:
538 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
539 * data is READLINK3res *
540 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
541 * data is the error string.
542 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
545 int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
552 * 0 : The call was initiated. The callback will be invoked when the call completes.
553 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
555 * When the callback is invoked, status indicates the result:
556 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
557 * data is SYMLINK3res *
558 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
559 * data is the error string.
560 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
563 int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *newname
, char *oldpath
, void *private_data
);
569 * 0 : The call was initiated. The callback will be invoked when the call completes.
570 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
572 * When the callback is invoked, status indicates the result:
573 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
574 * data is RENAME3res *
575 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
576 * data is the error string.
577 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
580 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
);
587 * 0 : The call was initiated. The callback will be invoked when the call completes.
588 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
590 * When the callback is invoked, status indicates the result:
591 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
593 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
594 * data is the error string.
595 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
598 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
);
606 char *rquotastat_to_str(int error
);
607 int rquotastat_to_errno(int error
);
612 * 0 : The call was initiated. The callback will be invoked when the call completes.
613 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
615 * When the callback is invoked, status indicates the result:
616 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
618 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
619 * data is the error string.
620 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
623 int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
626 * Call RQUOTA1/GETQUOTA
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 rquota daemon.
633 * data is a RQUOTA1res structure.
634 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
635 * data is the error string.
636 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
639 int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
642 * Call RQUOTA1/GETACTIVEQUOTA
644 * 0 : The call was initiated. The callback will be invoked when the call completes.
645 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
647 * When the callback is invoked, status indicates the result:
648 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
649 * data is a RQUOTA1res structure.
650 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
651 * data is the error string.
652 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
655 int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
663 * 0 : The call was initiated. The callback will be invoked when the call completes.
664 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
666 * When the callback is invoked, status indicates the result:
667 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
669 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
670 * data is the error string.
671 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
674 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
677 * Call RQUOTA2/GETQUOTA
679 * 0 : The call was initiated. The callback will be invoked when the call completes.
680 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
682 * When the callback is invoked, status indicates the result:
683 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
684 * data is a RQUOTA1res structure.
685 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
686 * data is the error string.
687 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
690 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
693 * Call RQUOTA2/GETACTIVEQUOTA
695 * 0 : The call was initiated. The callback will be invoked when the call completes.
696 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
698 * When the callback is invoked, status indicates the result:
699 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
700 * data is a RQUOTA1res structure.
701 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
702 * data is the error string.
703 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
706 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
712 * Call the NULL procedure for the NFSACL
715 * 0 : The call was initiated. The callback will be invoked when the call completes.
716 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
718 * When the callback is invoked, status indicates the result:
719 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
721 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
722 * data is the error string.
723 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
726 int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
732 * 0 : The call was initiated. The callback will be invoked when the call completes.
733 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
735 * When the callback is invoked, status indicates the result:
736 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
737 * data is a GETACL3res pointer
738 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
739 * data is the error string.
740 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
743 int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint32_t mask
, void *private_data
);