5e445192fff3959132b392d71866128305bff1e4
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
, off_t offset
, size_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
, off_t offset
, size_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
);
433 * 0 : The call was initiated. The callback will be invoked when the call completes.
434 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
436 * When the callback is invoked, status indicates the result:
437 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
438 * data is REMOVE3res *
439 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
440 * data is the error string.
441 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
444 int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
451 * 0 : The call was initiated. The callback will be invoked when the call completes.
452 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
454 * When the callback is invoked, status indicates the result:
455 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
456 * data is READDIR3res *
457 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
458 * data is the error string.
459 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
462 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
);
465 * Call NFS/READDIRPLUS
467 * 0 : The call was initiated. The callback will be invoked when the call completes.
468 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
470 * When the callback is invoked, status indicates the result:
471 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
472 * data is READDIRPLUS3res *
473 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
474 * data is the error string.
475 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
478 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
);
483 * 0 : The call was initiated. The callback will be invoked when the call completes.
484 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
486 * When the callback is invoked, status indicates the result:
487 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
489 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
490 * data is the error string.
491 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
494 int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
501 * 0 : The call was initiated. The callback will be invoked when the call completes.
502 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
504 * When the callback is invoked, status indicates the result:
505 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
507 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
508 * data is the error string.
509 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
512 int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
519 * 0 : The call was initiated. The callback will be invoked when the call completes.
520 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
522 * When the callback is invoked, status indicates the result:
523 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
524 * data is READLINK3res *
525 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
526 * data is the error string.
527 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
530 int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
537 * 0 : The call was initiated. The callback will be invoked when the call completes.
538 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
540 * When the callback is invoked, status indicates the result:
541 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
542 * data is SYMLINK3res *
543 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
544 * data is the error string.
545 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
548 int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *newname
, char *oldpath
, void *private_data
);
554 * 0 : The call was initiated. The callback will be invoked when the call completes.
555 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
557 * When the callback is invoked, status indicates the result:
558 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
559 * data is RENAME3res *
560 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
561 * data is the error string.
562 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
565 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
);
572 * 0 : The call was initiated. The callback will be invoked when the call completes.
573 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
575 * When the callback is invoked, status indicates the result:
576 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
578 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
579 * data is the error string.
580 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
583 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
);
591 char *rquotastat_to_str(int error
);
592 int rquotastat_to_errno(int error
);
597 * 0 : The call was initiated. The callback will be invoked when the call completes.
598 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
600 * When the callback is invoked, status indicates the result:
601 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
603 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
604 * data is the error string.
605 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
608 int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
611 * Call RQUOTA1/GETQUOTA
613 * 0 : The call was initiated. The callback will be invoked when the call completes.
614 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
616 * When the callback is invoked, status indicates the result:
617 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
618 * data is a RQUOTA1res structure.
619 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
620 * data is the error string.
621 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
624 int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
627 * Call RQUOTA1/GETACTIVEQUOTA
629 * 0 : The call was initiated. The callback will be invoked when the call completes.
630 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
632 * When the callback is invoked, status indicates the result:
633 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
634 * data is a RQUOTA1res structure.
635 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
636 * data is the error string.
637 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
640 int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
648 * 0 : The call was initiated. The callback will be invoked when the call completes.
649 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
651 * When the callback is invoked, status indicates the result:
652 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
654 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
655 * data is the error string.
656 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
659 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
662 * Call RQUOTA2/GETQUOTA
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 rquota daemon.
669 * data is a RQUOTA1res structure.
670 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
671 * data is the error string.
672 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
675 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
678 * Call RQUOTA2/GETACTIVEQUOTA
680 * 0 : The call was initiated. The callback will be invoked when the call completes.
681 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
683 * When the callback is invoked, status indicates the result:
684 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
685 * data is a RQUOTA1res structure.
686 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
687 * data is the error string.
688 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
691 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
697 * Call the NULL procedure for the NFSACL
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 rquota daemon.
706 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
707 * data is the error string.
708 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
711 int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
717 * 0 : The call was initiated. The callback will be invoked when the call completes.
718 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
720 * When the callback is invoked, status indicates the result:
721 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
722 * data is a GETACL3res pointer
723 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
724 * data is the error string.
725 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
728 int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, uint32_t mask
, void *private_data
);