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.
30 struct rpc_context
*rpc_init_context(void);
31 void rpc_destroy_context(struct rpc_context
*rpc
);
34 void rpc_set_auth(struct rpc_context
*rpc
, struct AUTH
*auth
);
36 int rpc_get_fd(struct rpc_context
*rpc
);
37 int rpc_which_events(struct rpc_context
*rpc
);
38 int rpc_service(struct rpc_context
*rpc
, int revents
);
39 char *rpc_get_error(struct rpc_context
*rpc
);
40 int rpc_queue_length(struct rpc_context
*rpc
);
43 #define RPC_STATUS_SUCCESS 0
44 #define RPC_STATUS_ERROR 1
45 #define RPC_STATUS_CANCEL 2
48 * Async connection to the tcp port at server:port.
50 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
51 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
53 * When the callback is invoked, status indicates the result:
54 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
56 * RPC_STATUS_ERROR : The connection failed to establish.
57 * data is the erro string.
58 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
61 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
63 * When disconnecting a connection in flight. All commands in flight will be called with the callback
64 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
66 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
74 * Call PORTMAPPER/NULL
76 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
77 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
79 * When the callback is invoked, status indicates the result:
80 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
82 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
83 * data is the error string.
84 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
87 int rpc_pmap_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
91 * Call PORTMAPPER/GETPORT.
93 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
94 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
96 * When the callback is invoked, status indicates the result:
97 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
98 * data is a (uint32_t *), containing the port returned.
99 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
100 * data is the error string.
101 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
104 int rpc_pmap_getport_async(struct rpc_context
*rpc
, int program
, int version
, rpc_cb cb
, void *private_data
);
108 * Call PORTMAPPER/CALLIT.
110 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
111 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
113 * When the callback is invoked, status indicates the result:
114 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
115 * data is a 'pmap_call_result' pointer.
116 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
117 * data is the error string.
118 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
121 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
);
126 char *mountstat3_to_str(int stat
);
127 int mountstat3_to_errno(int error
);
132 * 0 : The call was initiated. The callback will be invoked when the call completes.
133 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
135 * When the callback is invoked, status indicates the result:
136 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
138 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
139 * data is the error string.
140 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
143 int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
148 * 0 : The call was initiated. The callback will be invoked when the call completes.
149 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
151 * When the callback is invoked, status indicates the result:
152 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
153 * data is union mountres3.
154 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
155 * data is the error string.
156 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
159 int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
164 * 0 : The call was initiated. The callback will be invoked when the call completes.
165 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
167 * When the callback is invoked, status indicates the result:
168 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
169 * data is a mountlist.
170 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
171 * data is the error string.
172 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
175 int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
180 * 0 : The call was initiated. The callback will be invoked when the call completes.
181 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
183 * When the callback is invoked, status indicates the result:
184 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
186 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
187 * data is the error string.
188 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
191 int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
196 * 0 : The call was initiated. The callback will be invoked when the call completes.
197 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
199 * When the callback is invoked, status indicates the result:
200 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
202 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
203 * data is the error string.
204 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
207 int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
211 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
212 * returned structures.
215 * 0 : The call was initiated. The callback will be invoked when the call completes.
216 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
218 * When the callback is invoked, status indicates the result:
219 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
220 * data is a pointer to an exports pointer:
221 * exports export = *(exports *)data;
222 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
223 * data is the error string.
224 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
227 int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
236 char *nfsstat3_to_str(int error
);
237 int nfsstat3_to_errno(int error
);
242 * 0 : The call was initiated. The callback will be invoked when the call completes.
243 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
245 * When the callback is invoked, status indicates the result:
246 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
248 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
249 * data is the error string.
250 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
253 int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
258 * 0 : The call was initiated. The callback will be invoked when the call completes.
259 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
261 * When the callback is invoked, status indicates the result:
262 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
263 * data is GETATTR3res
264 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
265 * data is the error string.
266 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
269 int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
274 * 0 : The call was initiated. The callback will be invoked when the call completes.
275 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
277 * When the callback is invoked, status indicates the result:
278 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
280 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
281 * data is the error string.
282 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
285 int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
290 * 0 : The call was initiated. The callback will be invoked when the call completes.
291 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
293 * When the callback is invoked, status indicates the result:
294 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
296 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
297 * data is the error string.
298 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
301 int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
306 * 0 : The call was initiated. The callback will be invoked when the call completes.
307 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
309 * When the callback is invoked, status indicates the result:
310 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
312 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
313 * data is the error string.
314 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
317 int rpc_nfs_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, off_t offset
, size_t count
, void *private_data
);
322 * 0 : The call was initiated. The callback will be invoked when the call completes.
323 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
325 * When the callback is invoked, status indicates the result:
326 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
327 * data is WRITE3res *
328 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
329 * data is the error string.
330 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
333 int rpc_nfs_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *buf
, off_t offset
, size_t count
, int stable_how
, void *private_data
);
338 * 0 : The call was initiated. The callback will be invoked when the call completes.
339 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
341 * When the callback is invoked, status indicates the result:
342 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
343 * data is COMMIT3res *
344 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
345 * data is the error string.
346 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
349 int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
355 * 0 : The call was initiated. The callback will be invoked when the call completes.
356 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
358 * When the callback is invoked, status indicates the result:
359 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
360 * data is SETATTR3res *
361 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
362 * data is the error string.
363 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
367 int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
374 * 0 : The call was initiated. The callback will be invoked when the call completes.
375 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
377 * When the callback is invoked, status indicates the result:
378 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
379 * data is MKDIR3res *
380 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
381 * data is the error string.
382 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
385 int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
394 * 0 : The call was initiated. The callback will be invoked when the call completes.
395 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
397 * When the callback is invoked, status indicates the result:
398 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
399 * data is RMDIR3res *
400 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
401 * data is the error string.
402 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
405 int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
413 * 0 : The call was initiated. The callback will be invoked when the call completes.
414 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
416 * When the callback is invoked, status indicates the result:
417 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
418 * data is CREATE3res *
419 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
420 * data is the error string.
421 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
424 int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, int mode
, void *private_data
);
432 * 0 : The call was initiated. The callback will be invoked when the call completes.
433 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
435 * When the callback is invoked, status indicates the result:
436 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
437 * data is REMOVE3res *
438 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
439 * data is the error string.
440 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
443 int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
450 * 0 : The call was initiated. The callback will be invoked when the call completes.
451 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
453 * When the callback is invoked, status indicates the result:
454 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
455 * data is READDIR3res *
456 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
457 * data is the error string.
458 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
461 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
);
464 * Call NFS/READDIRPLUS
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 READDIRPLUS3res *
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_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint64_t cookie
, char *cookieverf
, int count
, void *private_data
);
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.
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_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
500 * 0 : The call was initiated. The callback will be invoked when the call completes.
501 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
503 * When the callback is invoked, status indicates the result:
504 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
506 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
507 * data is the error string.
508 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
511 int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
518 * 0 : The call was initiated. The callback will be invoked when the call completes.
519 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
521 * When the callback is invoked, status indicates the result:
522 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
523 * data is READLINK3res *
524 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
525 * data is the error string.
526 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
529 int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
536 * 0 : The call was initiated. The callback will be invoked when the call completes.
537 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
539 * When the callback is invoked, status indicates the result:
540 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
541 * data is SYMLINK3res *
542 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
543 * data is the error string.
544 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
547 int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *newname
, char *oldpath
, void *private_data
);
553 * 0 : The call was initiated. The callback will be invoked when the call completes.
554 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
556 * When the callback is invoked, status indicates the result:
557 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
558 * data is RENAME3res *
559 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
560 * data is the error string.
561 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
564 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
);
571 * 0 : The call was initiated. The callback will be invoked when the call completes.
572 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
574 * When the callback is invoked, status indicates the result:
575 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
577 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
578 * data is the error string.
579 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
582 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
);
590 char *rquotastat_to_str(int error
);
591 int rquotastat_to_errno(int error
);
596 * 0 : The call was initiated. The callback will be invoked when the call completes.
597 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
599 * When the callback is invoked, status indicates the result:
600 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
602 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
603 * data is the error string.
604 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
607 int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
610 * Call RQUOTA1/GETQUOTA
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.
617 * data is a RQUOTA1res structure.
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_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
626 * Call RQUOTA1/GETACTIVEQUOTA
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_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
647 * 0 : The call was initiated. The callback will be invoked when the call completes.
648 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
650 * When the callback is invoked, status indicates the result:
651 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
653 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
654 * data is the error string.
655 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
658 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
661 * Call RQUOTA2/GETQUOTA
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.
668 * data is a RQUOTA1res structure.
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_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
677 * Call RQUOTA2/GETACTIVEQUOTA
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_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
696 * Call the NULL procedure for the NFSACL
699 * 0 : The call was initiated. The callback will be invoked when the call completes.
700 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
702 * When the callback is invoked, status indicates the result:
703 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
705 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
706 * data is the error string.
707 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
710 int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
716 * 0 : The call was initiated. The callback will be invoked when the call completes.
717 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
719 * When the callback is invoked, status indicates the result:
720 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
721 * data is a GETACL3res pointer
722 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
723 * data is the error string.
724 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
727 int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint32_t mask
, void *private_data
);