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>
34 struct rpc_context
*rpc_init_context(void);
35 void rpc_destroy_context(struct rpc_context
*rpc
);
37 void rpc_set_auth(struct rpc_context
*rpc
, struct AUTH
*auth
);
39 int rpc_get_fd(struct rpc_context
*rpc
);
40 int rpc_which_events(struct rpc_context
*rpc
);
41 int rpc_service(struct rpc_context
*rpc
, int revents
);
42 char *rpc_get_error(struct rpc_context
*rpc
);
43 int rpc_queue_length(struct rpc_context
*rpc
);
45 /* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL
46 * calls on a NFS context.
48 struct rpc_context
*nfs_get_rpc_context(struct nfs_context
*nfs
);
50 /* This function returns the nfs_fh3 structure from a nfsfh structure.
51 This allows to use a file onened with nfs_open() together with low-level
52 rpc functions that thake a nfs filehandle
54 struct nfs_fh3
*nfs_get_fh(struct nfsfh
*nfsfh
);
56 /* Control what the next XID value to be used on the context will be.
57 This can be used when multiple contexts are used to the same server
58 to avoid that the two contexts have xid collissions.
60 void rpc_set_next_xid(struct rpc_context
*rpc
, uint32_t xid
);
62 #define RPC_STATUS_SUCCESS 0
63 #define RPC_STATUS_ERROR 1
64 #define RPC_STATUS_CANCEL 2
67 * Async connection to the tcp port at server:port.
69 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
70 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
72 * When the callback is invoked, status indicates the result:
73 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
75 * RPC_STATUS_ERROR : The connection failed to establish.
76 * data is the erro string.
77 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
80 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
82 * Async function to connect to a specific RPC program/version
84 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
85 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
87 * When the callback is invoked, status indicates the result:
88 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
90 * RPC_STATUS_ERROR : The connection failed to establish.
91 * data is the erro string.
92 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
95 int rpc_connect_program_async(struct rpc_context
*rpc
, char *server
, int program
, int version
, rpc_cb cb
, void *private_data
);
97 * When disconnecting a connection in flight. All commands in flight will be called with the callback
98 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
100 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
108 * Call PORTMAPPER/NULL
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.
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 EXTERN
int rpc_pmap_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
125 * Call PORTMAPPER/GETPORT.
127 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
128 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
130 * When the callback is invoked, status indicates the result:
131 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
132 * data is a (uint32_t *), containing the port returned.
133 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
134 * data is the error string.
135 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
138 EXTERN
int rpc_pmap_getport_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, rpc_cb cb
, void *private_data
);
141 * Call PORTMAPPER/SET
143 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
144 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
146 * When the callback is invoked, status indicates the result:
147 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
148 * data is a (uint32_t *), containing status
149 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
150 * data is the error string.
151 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
154 EXTERN
int rpc_pmap_set_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
157 * Call PORTMAPPER/UNSET
159 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
160 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
162 * When the callback is invoked, status indicates the result:
163 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
164 * data is a (uint32_t *), containing status
165 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
166 * data is the error string.
167 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
170 EXTERN
int rpc_pmap_unset_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
173 * Call PORTMAPPER/CALLIT.
175 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
176 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
178 * When the callback is invoked, status indicates the result:
179 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
180 * data is a 'pmap_call_result' pointer.
181 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
182 * data is the error string.
183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
186 EXTERN
int rpc_pmap_callit_async(struct rpc_context
*rpc
, int program
, int version
, int procedure
, char *data
, int datalen
, rpc_cb cb
, void *private_data
);
191 char *mountstat3_to_str(int stat
);
192 int mountstat3_to_errno(int error
);
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 EXTERN
int rpc_mount3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
209 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
214 * 0 : The call was initiated. The callback will be invoked when the call completes.
215 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
217 * When the callback is invoked, status indicates the result:
218 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
219 * data is union mountres3.
220 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
221 * data is the error string.
222 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
225 EXTERN
int rpc_mount3_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
226 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
231 * 0 : The call was initiated. The callback will be invoked when the call completes.
232 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
234 * When the callback is invoked, status indicates the result:
235 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
236 * data is a mountlist.
237 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
238 * data is the error string.
239 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
242 EXTERN
int rpc_mount3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
243 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
248 * 0 : The call was initiated. The callback will be invoked when the call completes.
249 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
251 * When the callback is invoked, status indicates the result:
252 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
254 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
255 * data is the error string.
256 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
259 EXTERN
int rpc_mount3_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
260 EXTERN
int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
263 * Call MOUNT3/UMNTALL
265 * 0 : The call was initiated. The callback will be invoked when the call completes.
266 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
268 * When the callback is invoked, status indicates the result:
269 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
271 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
272 * data is the error string.
273 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
276 EXTERN
int rpc_mount3_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
277 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
281 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
282 * returned structures.
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 a pointer to an exports pointer:
291 * exports export = *(exports *)data;
292 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
293 * data is the error string.
294 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
297 EXTERN
int rpc_mount3_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
298 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
301 * MOUNT v1 FUNCTIONS (Used with NFSv2)
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 mount daemon.
312 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
313 * data is the error string.
314 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
317 EXTERN
int rpc_mount1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, 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 mount daemon.
327 * data is union mountres1.
328 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
329 * data is the error string.
330 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
333 EXTERN
int rpc_mount1_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, 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 mount daemon.
343 * data is a mountlist.
344 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
345 * data is the error string.
346 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
349 EXTERN
int rpc_mount1_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
354 * 0 : The call was initiated. The callback will be invoked when the call completes.
355 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
357 * When the callback is invoked, status indicates the result:
358 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
360 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
361 * data is the error string.
362 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
365 EXTERN
int rpc_mount1_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
368 * Call MOUNT1/UMNTALL
370 * 0 : The call was initiated. The callback will be invoked when the call completes.
371 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
373 * When the callback is invoked, status indicates the result:
374 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
376 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
377 * data is the error string.
378 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
381 EXTERN
int rpc_mount1_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
385 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
386 * returned structures.
389 * 0 : The call was initiated. The callback will be invoked when the call completes.
390 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
392 * When the callback is invoked, status indicates the result:
393 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
394 * data is a pointer to an exports pointer:
395 * exports export = *(exports *)data;
396 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
397 * data is the error string.
398 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
401 EXTERN
int rpc_mount1_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
408 char *nfsstat3_to_str(int error
);
409 int nfsstat3_to_errno(int error
);
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.
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 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
426 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, 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 GETATTR3res
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.
443 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
444 EXTERN
int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
449 * 0 : The call was initiated. The callback will be invoked when the call completes.
450 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
452 * When the callback is invoked, status indicates the result:
453 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
454 * data is PATHCONF3res
455 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
456 * data is the error string.
457 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
460 struct PATHCONF3args
;
461 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
462 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
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.
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.
479 EXTERN
int rpc_nfs3_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
480 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
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.
497 EXTERN
int rpc_nfs3_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
498 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
503 * 0 : The call was initiated. The callback will be invoked when the call completes.
504 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
506 * When the callback is invoked, status indicates the result:
507 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
509 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
510 * data is the error string.
511 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
515 EXTERN
int rpc_nfs3_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
516 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
);
521 * 0 : The call was initiated. The callback will be invoked when the call completes.
522 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
524 * When the callback is invoked, status indicates the result:
525 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
526 * data is WRITE3res *
527 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
528 * data is the error string.
529 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
533 EXTERN
int rpc_nfs3_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
534 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
);
539 * 0 : The call was initiated. The callback will be invoked when the call completes.
540 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
542 * When the callback is invoked, status indicates the result:
543 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
544 * data is COMMIT3res *
545 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
546 * data is the error string.
547 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
551 EXTERN
int rpc_nfs3_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
552 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
557 * 0 : The call was initiated. The callback will be invoked when the call completes.
558 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
560 * When the callback is invoked, status indicates the result:
561 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
562 * data is SETATTR3res *
563 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
564 * data is the error string.
565 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
569 EXTERN
int rpc_nfs3_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
570 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
575 * 0 : The call was initiated. The callback will be invoked when the call completes.
576 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
578 * When the callback is invoked, status indicates the result:
579 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
580 * data is MKDIR3res *
581 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
582 * data is the error string.
583 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
587 EXTERN
int rpc_nfs3_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
588 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
593 * 0 : The call was initiated. The callback will be invoked when the call completes.
594 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
596 * When the callback is invoked, status indicates the result:
597 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
598 * data is RMDIR3res *
599 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
600 * data is the error string.
601 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
605 EXTERN
int rpc_nfs3_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
606 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
611 * 0 : The call was initiated. The callback will be invoked when the call completes.
612 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
614 * When the callback is invoked, status indicates the result:
615 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
616 * data is CREATE3res *
617 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
618 * data is the error string.
619 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
623 EXTERN
int rpc_nfs3_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
624 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
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 nfs daemon.
634 * data is MKNOD3res *
635 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
636 * data is the error string.
637 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
641 EXTERN
int rpc_nfs3_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
642 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
);
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 nfs daemon.
652 * data is REMOVE3res *
653 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
654 * data is the error string.
655 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
659 EXTERN
int rpc_nfs3_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
660 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
665 * 0 : The call was initiated. The callback will be invoked when the call completes.
666 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
668 * When the callback is invoked, status indicates the result:
669 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
670 * data is READDIR3res *
671 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
672 * data is the error string.
673 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
677 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
678 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
);
681 * Call NFS3/READDIRPLUS
683 * 0 : The call was initiated. The callback will be invoked when the call completes.
684 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
686 * When the callback is invoked, status indicates the result:
687 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
688 * data is READDIRPLUS3res *
689 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
690 * data is the error string.
691 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
694 struct READDIRPLUS3args
;
695 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
696 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
);
701 * 0 : The call was initiated. The callback will be invoked when the call completes.
702 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
704 * When the callback is invoked, status indicates the result:
705 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
707 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
708 * data is the error string.
709 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
713 EXTERN
int rpc_nfs3_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
714 EXTERN
int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
719 * 0 : The call was initiated. The callback will be invoked when the call completes.
720 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
722 * When the callback is invoked, status indicates the result:
723 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
725 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
726 * data is the error string.
727 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
731 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
732 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
737 * 0 : The call was initiated. The callback will be invoked when the call completes.
738 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
740 * When the callback is invoked, status indicates the result:
741 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
742 * data is READLINK3res *
743 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
744 * data is the error string.
745 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
748 struct READLINK3args
;
749 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
750 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
755 * 0 : The call was initiated. The callback will be invoked when the call completes.
756 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
758 * When the callback is invoked, status indicates the result:
759 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
760 * data is SYMLINK3res *
761 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
762 * data is the error string.
763 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
767 EXTERN
int rpc_nfs3_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
768 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
773 * 0 : The call was initiated. The callback will be invoked when the call completes.
774 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
776 * When the callback is invoked, status indicates the result:
777 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
778 * data is RENAME3res *
779 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
780 * data is the error string.
781 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
785 EXTERN
int rpc_nfs3_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
786 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
);
791 * 0 : The call was initiated. The callback will be invoked when the call completes.
792 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
794 * When the callback is invoked, status indicates the result:
795 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
797 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
798 * data is the error string.
799 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
803 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
804 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
);
813 * 0 : The call was initiated. The callback will be invoked when the call completes.
814 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
816 * When the callback is invoked, status indicates the result:
817 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
819 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
820 * data is the error string.
821 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
824 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
829 * 0 : The call was initiated. The callback will be invoked when the call completes.
830 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
832 * When the callback is invoked, status indicates the result:
833 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
834 * data is GETATTR2res
835 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
836 * data is the error string.
837 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
841 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
846 * 0 : The call was initiated. The callback will be invoked when the call completes.
847 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
849 * When the callback is invoked, status indicates the result:
850 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
851 * data is SETATTR2res *
852 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
853 * data is the error string.
854 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
858 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
863 * 0 : The call was initiated. The callback will be invoked when the call completes.
864 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
866 * When the callback is invoked, status indicates the result:
867 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
869 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
870 * data is the error string.
871 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
875 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*args
, void *private_data
);
880 * 0 : The call was initiated. The callback will be invoked when the call completes.
881 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
883 * When the callback is invoked, status indicates the result:
884 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
885 * data is READLINK2res *
886 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
887 * data is the error string.
888 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
891 struct READLINK2args
;
892 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
897 * 0 : The call was initiated. The callback will be invoked when the call completes.
898 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
900 * When the callback is invoked, status indicates the result:
901 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
903 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
904 * data is the error string.
905 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
909 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
914 * 0 : The call was initiated. The callback will be invoked when the call completes.
915 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
917 * When the callback is invoked, status indicates the result:
918 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
919 * data is WRITE2res *
920 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
921 * data is the error string.
922 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
926 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
931 * 0 : The call was initiated. The callback will be invoked when the call completes.
932 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
934 * When the callback is invoked, status indicates the result:
935 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
936 * data is CREATE2res *
937 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
938 * data is the error string.
939 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
943 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
948 * 0 : The call was initiated. The callback will be invoked when the call completes.
949 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
951 * When the callback is invoked, status indicates the result:
952 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
953 * data is REMOVE2res *
954 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
955 * data is the error string.
956 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
960 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
965 * 0 : The call was initiated. The callback will be invoked when the call completes.
966 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
968 * When the callback is invoked, status indicates the result:
969 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
970 * data is RENAME2res *
971 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
972 * data is the error string.
973 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
977 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
982 * 0 : The call was initiated. The callback will be invoked when the call completes.
983 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
985 * When the callback is invoked, status indicates the result:
986 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
988 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
989 * data is the error string.
990 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
994 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
999 * 0 : The call was initiated. The callback will be invoked when the call completes.
1000 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1002 * When the callback is invoked, status indicates the result:
1003 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1004 * data is SYMLINK2res *
1005 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1006 * data is the error string.
1007 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1010 struct SYMLINK2args
;
1011 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
1016 * 0 : The call was initiated. The callback will be invoked when the call completes.
1017 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1019 * When the callback is invoked, status indicates the result:
1020 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1021 * data is MKDIR2res *
1022 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1023 * data is the error string.
1024 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1028 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
1033 * 0 : The call was initiated. The callback will be invoked when the call completes.
1034 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1036 * When the callback is invoked, status indicates the result:
1037 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1038 * data is RMDIR2res *
1039 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1040 * data is the error string.
1041 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1045 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
1050 * 0 : The call was initiated. The callback will be invoked when the call completes.
1051 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1053 * When the callback is invoked, status indicates the result:
1054 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1055 * data is READDIR2res *
1056 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1057 * data is the error string.
1058 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1061 struct READDIR2args
;
1062 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
1067 * 0 : The call was initiated. The callback will be invoked when the call completes.
1068 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1070 * When the callback is invoked, status indicates the result:
1071 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1072 * data is STATFS2res *
1073 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1074 * data is the error string.
1075 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1079 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
1084 char *rquotastat_to_str(int error
);
1085 int rquotastat_to_errno(int error
);
1090 * 0 : The call was initiated. The callback will be invoked when the call completes.
1091 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1093 * When the callback is invoked, status indicates the result:
1094 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1096 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1097 * data is the error string.
1098 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1101 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1104 * Call RQUOTA1/GETQUOTA
1106 * 0 : The call was initiated. The callback will be invoked when the call completes.
1107 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1109 * When the callback is invoked, status indicates the result:
1110 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1111 * data is a RQUOTA1res structure.
1112 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1113 * data is the error string.
1114 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1117 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
1120 * Call RQUOTA1/GETACTIVEQUOTA
1122 * 0 : The call was initiated. The callback will be invoked when the call completes.
1123 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1125 * When the callback is invoked, status indicates the result:
1126 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1127 * data is a RQUOTA1res structure.
1128 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1129 * data is the error string.
1130 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1133 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
1141 * 0 : The call was initiated. The callback will be invoked when the call completes.
1142 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1144 * When the callback is invoked, status indicates the result:
1145 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1147 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1148 * data is the error string.
1149 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1152 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1155 * Call RQUOTA2/GETQUOTA
1157 * 0 : The call was initiated. The callback will be invoked when the call completes.
1158 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1160 * When the callback is invoked, status indicates the result:
1161 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1162 * data is a RQUOTA1res structure.
1163 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1164 * data is the error string.
1165 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1168 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
1171 * Call RQUOTA2/GETACTIVEQUOTA
1173 * 0 : The call was initiated. The callback will be invoked when the call completes.
1174 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1176 * When the callback is invoked, status indicates the result:
1177 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1178 * data is a RQUOTA1res structure.
1179 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1180 * data is the error string.
1181 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1184 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
1197 * Call the NULL procedure for the NFSACL
1200 * 0 : The call was initiated. The callback will be invoked when the call completes.
1201 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1203 * When the callback is invoked, status indicates the result:
1204 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1206 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1207 * data is the error string.
1208 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1211 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1214 * Call NFSACL/GETACL
1217 * 0 : The call was initiated. The callback will be invoked when the call completes.
1218 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1220 * When the callback is invoked, status indicates the result:
1221 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1222 * data is a GETACL3res pointer
1223 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1224 * data is the error string.
1225 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1229 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1234 * Call NFSACL/SETACL
1237 * 0 : The call was initiated. The callback will be invoked when the call completes.
1238 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1240 * When the callback is invoked, status indicates the result:
1241 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1242 * data is a SETACL3res pointer
1243 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1244 * data is the error string.
1245 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1249 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1257 char *nlmstat4_to_str(int stat
);
1261 * Call the NULL procedure for the NLM protocol
1264 * 0 : The call was initiated. The callback will be invoked when the call completes.
1265 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1267 * When the callback is invoked, status indicates the result:
1268 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1270 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1271 * data is the error string.
1272 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1275 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1279 * Call the TEST procedure for the NLM protocol
1282 * 0 : The call was initiated. The callback will be invoked when the call completes.
1283 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1285 * When the callback is invoked, status indicates the result:
1286 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1287 * data is NLM4_TESTres
1288 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1289 * data is the error string.
1290 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1293 struct NLM4_TESTargs
;
1294 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1298 * Call the LOCK procedure for the NLM protocol
1301 * 0 : The call was initiated. The callback will be invoked when the call completes.
1302 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1304 * When the callback is invoked, status indicates the result:
1305 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1306 * data is NLM4_LOCKres
1307 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1308 * data is the error string.
1309 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1312 struct NLM4_LOCKargs
;
1313 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1317 * Call the CANCEL procedure for the NLM protocol
1320 * 0 : The call was initiated. The callback will be invoked when the call completes.
1321 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1323 * When the callback is invoked, status indicates the result:
1324 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1325 * data is NLM4_CANCres
1326 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1327 * data is the error string.
1328 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1331 struct NLM4_CANCargs
;
1332 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1336 * Call the UNLOCK procedure for the NLM protocol
1339 * 0 : The call was initiated. The callback will be invoked when the call completes.
1340 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1342 * When the callback is invoked, status indicates the result:
1343 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1344 * data is NLM4_UNLOCKres
1345 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1346 * data is the error string.
1347 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1350 struct NLM4_UNLOCKargs
;
1351 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1356 char *nsmstat1_to_str(int stat
);
1360 * Call the NULL procedure for the NSM protocol
1363 * 0 : The call was initiated. The callback will be invoked when the call completes.
1364 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1366 * When the callback is invoked, status indicates the result:
1367 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1369 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1370 * data is the error string.
1371 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1374 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1378 * Call the STAT procedure for the NSM protocol
1381 * 0 : The call was initiated. The callback will be invoked when the call completes.
1382 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1384 * When the callback is invoked, status indicates the result:
1385 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1386 * data is NSM1_STATres
1387 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1388 * data is the error string.
1389 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1392 struct NSM1_STATargs
;
1393 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1397 * Call the MON procedure for the NSM protocol
1400 * 0 : The call was initiated. The callback will be invoked when the call completes.
1401 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1403 * When the callback is invoked, status indicates the result:
1404 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1405 * data is NSM1_MONres
1406 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1407 * data is the error string.
1408 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1411 struct NSM1_MONargs
;
1412 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1416 * Call the UNMON procedure for the NSM protocol
1419 * 0 : The call was initiated. The callback will be invoked when the call completes.
1420 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1422 * When the callback is invoked, status indicates the result:
1423 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1424 * data is NSM1_UNMONres
1425 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1426 * data is the error string.
1427 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1430 struct NSM1_UNMONargs
;
1431 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1435 * Call the UNMONALL procedure for the NSM protocol
1438 * 0 : The call was initiated. The callback will be invoked when the call completes.
1439 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1441 * When the callback is invoked, status indicates the result:
1442 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1443 * data is NSM1_UNMONALLres
1444 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1445 * data is the error string.
1446 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1449 struct NSM1_UNMONALLargs
;
1450 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1453 * Call NSM/SIMUCRASH
1454 * Call the SIMUCRASH procedure for the NSM protocol
1457 * 0 : The call was initiated. The callback will be invoked when the call completes.
1458 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1460 * When the callback is invoked, status indicates the result:
1461 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1463 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1464 * data is the error string.
1465 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1468 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1472 * Call the NOTIFY procedure for the NSM protocol
1475 * 0 : The call was initiated. The callback will be invoked when the call completes.
1476 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1478 * When the callback is invoked, status indicates the result:
1479 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1481 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1482 * data is the error string.
1483 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1486 struct NSM1_NOTIFYargs
;
1487 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);