c5eeb90d1bbc701ab192325cc8932a19a32cbb6b
2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>.
18 * This is the lowlevel interface to access NFS resources.
19 * Through this interface you have access to the full gamut of nfs and nfs related
20 * protocol as well as the XDR encoded/decoded structures.
22 #ifndef _LIBNFS_RAW_H_
23 #define _LIBNFS_RAW_H_
26 #include <nfsc/libnfs-zdr.h>
38 struct rpc_context
*rpc_init_context(void);
39 void rpc_destroy_context(struct rpc_context
*rpc
);
41 void rpc_set_auth(struct rpc_context
*rpc
, struct AUTH
*auth
);
43 int rpc_get_fd(struct rpc_context
*rpc
);
44 int rpc_which_events(struct rpc_context
*rpc
);
45 int rpc_service(struct rpc_context
*rpc
, int revents
);
46 char *rpc_get_error(struct rpc_context
*rpc
);
47 int rpc_queue_length(struct rpc_context
*rpc
);
49 /* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL
50 * calls on a NFS context.
52 struct rpc_context
*nfs_get_rpc_context(struct nfs_context
*nfs
);
54 /* This function returns the nfs_fh3 structure from a nfsfh structure.
55 This allows to use a file onened with nfs_open() together with low-level
56 rpc functions that thake a nfs filehandle
58 struct nfs_fh3
*nfs_get_fh(struct nfsfh
*nfsfh
);
60 /* Control what the next XID value to be used on the context will be.
61 This can be used when multiple contexts are used to the same server
62 to avoid that the two contexts have xid collissions.
64 void rpc_set_next_xid(struct rpc_context
*rpc
, uint32_t xid
);
66 /* This function can be used to set the file descriptor used for
67 * the RPC context. It is primarily useful when emulating dup2()
68 * and similar or where you want full control of the filedescriptor numbers
69 * used by the rpc socket.
72 * oldfd = rpc_get_fd(rpc);
74 * rpc_set_fd(rpc, newfd);
78 void rpc_set_fd(struct rpc_context
*rpc
, int fd
);
80 #define RPC_STATUS_SUCCESS 0
81 #define RPC_STATUS_ERROR 1
82 #define RPC_STATUS_CANCEL 2
85 * Async connection to the tcp port at server:port.
87 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
88 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
90 * When the callback is invoked, status indicates the result:
91 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
93 * RPC_STATUS_ERROR : The connection failed to establish.
94 * data is the erro string.
95 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
98 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
100 * Async function to connect to a specific RPC program/version
102 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
103 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
105 * When the callback is invoked, status indicates the result:
106 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
108 * RPC_STATUS_ERROR : The connection failed to establish.
109 * data is the erro string.
110 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
113 int rpc_connect_program_async(struct rpc_context
*rpc
, char *server
, int program
, int version
, rpc_cb cb
, void *private_data
);
115 * When disconnecting a connection in flight. All commands in flight will be called with the callback
116 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
118 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
126 * Call PORTMAPPER/NULL
128 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
129 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
131 * When the callback is invoked, status indicates the result:
132 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
134 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
135 * data is the error string.
136 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
139 EXTERN
int rpc_pmap_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
143 * Call PORTMAPPER/GETPORT.
145 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
146 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
148 * When the callback is invoked, status indicates the result:
149 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
150 * data is a (uint32_t *), containing the port returned.
151 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
152 * data is the error string.
153 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
156 EXTERN
int rpc_pmap_getport_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, rpc_cb cb
, void *private_data
);
159 * Call PORTMAPPER/SET
161 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
162 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
164 * When the callback is invoked, status indicates the result:
165 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
166 * data is a (uint32_t *), containing status
167 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
168 * data is the error string.
169 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
172 EXTERN
int rpc_pmap_set_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
175 * Call PORTMAPPER/UNSET
177 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
178 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
180 * When the callback is invoked, status indicates the result:
181 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
182 * data is a (uint32_t *), containing status
183 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
184 * data is the error string.
185 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
188 EXTERN
int rpc_pmap_unset_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
191 * Call PORTMAPPER/CALLIT.
193 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
194 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
196 * When the callback is invoked, status indicates the result:
197 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
198 * data is a 'pmap_call_result' pointer.
199 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
200 * data is the error string.
201 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
204 EXTERN
int rpc_pmap_callit_async(struct rpc_context
*rpc
, int program
, int version
, int procedure
, char *data
, int datalen
, rpc_cb cb
, void *private_data
);
209 char *mountstat3_to_str(int stat
);
210 int mountstat3_to_errno(int error
);
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.
221 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
222 * data is the error string.
223 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
226 EXTERN
int rpc_mount3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
227 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
232 * 0 : The call was initiated. The callback will be invoked when the call completes.
233 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
235 * When the callback is invoked, status indicates the result:
236 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
237 * data is union mountres3.
238 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
239 * data is the error string.
240 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
243 EXTERN
int rpc_mount3_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
244 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
249 * 0 : The call was initiated. The callback will be invoked when the call completes.
250 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
252 * When the callback is invoked, status indicates the result:
253 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
254 * data is a mountlist.
255 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
256 * data is the error string.
257 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
260 EXTERN
int rpc_mount3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
261 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
266 * 0 : The call was initiated. The callback will be invoked when the call completes.
267 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
269 * When the callback is invoked, status indicates the result:
270 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
272 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
273 * data is the error string.
274 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
277 EXTERN
int rpc_mount3_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
278 EXTERN
int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
281 * Call MOUNT3/UMNTALL
283 * 0 : The call was initiated. The callback will be invoked when the call completes.
284 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
286 * When the callback is invoked, status indicates the result:
287 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
289 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
290 * data is the error string.
291 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
294 EXTERN
int rpc_mount3_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
295 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
299 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
300 * returned structures.
303 * 0 : The call was initiated. The callback will be invoked when the call completes.
304 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
306 * When the callback is invoked, status indicates the result:
307 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
308 * data is a pointer to an exports pointer:
309 * exports export = *(exports *)data;
310 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
311 * data is the error string.
312 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
315 EXTERN
int rpc_mount3_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
316 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
319 * MOUNT v1 FUNCTIONS (Used with NFSv2)
324 * 0 : The call was initiated. The callback will be invoked when the call completes.
325 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
327 * When the callback is invoked, status indicates the result:
328 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
330 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
331 * data is the error string.
332 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
335 EXTERN
int rpc_mount1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
340 * 0 : The call was initiated. The callback will be invoked when the call completes.
341 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
343 * When the callback is invoked, status indicates the result:
344 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
345 * data is union mountres1.
346 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
347 * data is the error string.
348 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
351 EXTERN
int rpc_mount1_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, 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 mount daemon.
361 * data is a mountlist.
362 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
363 * data is the error string.
364 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
367 EXTERN
int rpc_mount1_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
372 * 0 : The call was initiated. The callback will be invoked when the call completes.
373 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
375 * When the callback is invoked, status indicates the result:
376 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
378 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
379 * data is the error string.
380 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
383 EXTERN
int rpc_mount1_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, void *private_data
);
386 * Call MOUNT1/UMNTALL
388 * 0 : The call was initiated. The callback will be invoked when the call completes.
389 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
391 * When the callback is invoked, status indicates the result:
392 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
394 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
395 * data is the error string.
396 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
399 EXTERN
int rpc_mount1_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
403 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
404 * returned structures.
407 * 0 : The call was initiated. The callback will be invoked when the call completes.
408 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
410 * When the callback is invoked, status indicates the result:
411 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
412 * data is a pointer to an exports pointer:
413 * exports export = *(exports *)data;
414 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
415 * data is the error string.
416 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
419 EXTERN
int rpc_mount1_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
426 char *nfsstat3_to_str(int error
);
427 int nfsstat3_to_errno(int error
);
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.
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 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
444 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, 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 GETATTR3res
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.
461 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
462 EXTERN
int rpc_nfs_getattr_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.
472 * data is PATHCONF3res
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 struct PATHCONF3args
;
479 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
480 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, 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_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
498 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, 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_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
516 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, 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.
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_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
534 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
);
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 WRITE3res *
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_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
552 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
);
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 COMMIT3res *
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_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
570 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, 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 SETATTR3res *
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_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
588 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*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 MKDIR3res *
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_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
606 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, 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 RMDIR3res *
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_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
624 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, 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 CREATE3res *
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_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
642 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, 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 MKNOD3res *
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_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
660 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
);
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 REMOVE3res *
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_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
678 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
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 READDIR3res *
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.
695 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
696 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
);
699 * Call NFS3/READDIRPLUS
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.
706 * data is READDIRPLUS3res *
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.
712 struct READDIRPLUS3args
;
713 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
714 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
);
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_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
732 EXTERN
int rpc_nfs_fsstat_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.
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.
749 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
750 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, 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 READLINK3res *
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.
766 struct READLINK3args
;
767 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
768 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*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 SYMLINK3res *
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_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
786 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, 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.
796 * data is RENAME3res *
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_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
804 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
);
809 * 0 : The call was initiated. The callback will be invoked when the call completes.
810 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
812 * When the callback is invoked, status indicates the result:
813 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
815 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
816 * data is the error string.
817 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
821 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
822 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
);
831 * 0 : The call was initiated. The callback will be invoked when the call completes.
832 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
834 * When the callback is invoked, status indicates the result:
835 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
837 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
838 * data is the error string.
839 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
842 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
847 * 0 : The call was initiated. The callback will be invoked when the call completes.
848 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
850 * When the callback is invoked, status indicates the result:
851 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
852 * data is GETATTR2res
853 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
854 * data is the error string.
855 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
859 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
864 * 0 : The call was initiated. The callback will be invoked when the call completes.
865 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
867 * When the callback is invoked, status indicates the result:
868 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
869 * data is SETATTR2res *
870 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
871 * data is the error string.
872 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
876 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
881 * 0 : The call was initiated. The callback will be invoked when the call completes.
882 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
884 * When the callback is invoked, status indicates the result:
885 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
887 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
888 * data is the error string.
889 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
893 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*args
, void *private_data
);
898 * 0 : The call was initiated. The callback will be invoked when the call completes.
899 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
901 * When the callback is invoked, status indicates the result:
902 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
903 * data is READLINK2res *
904 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
905 * data is the error string.
906 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
909 struct READLINK2args
;
910 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
915 * 0 : The call was initiated. The callback will be invoked when the call completes.
916 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
918 * When the callback is invoked, status indicates the result:
919 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
921 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
922 * data is the error string.
923 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
927 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
932 * 0 : The call was initiated. The callback will be invoked when the call completes.
933 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
935 * When the callback is invoked, status indicates the result:
936 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
937 * data is WRITE2res *
938 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
939 * data is the error string.
940 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
944 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
949 * 0 : The call was initiated. The callback will be invoked when the call completes.
950 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
952 * When the callback is invoked, status indicates the result:
953 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
954 * data is CREATE2res *
955 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
956 * data is the error string.
957 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
961 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
966 * 0 : The call was initiated. The callback will be invoked when the call completes.
967 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
969 * When the callback is invoked, status indicates the result:
970 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
971 * data is REMOVE2res *
972 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
973 * data is the error string.
974 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
978 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
983 * 0 : The call was initiated. The callback will be invoked when the call completes.
984 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
986 * When the callback is invoked, status indicates the result:
987 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
988 * data is RENAME2res *
989 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
990 * data is the error string.
991 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
995 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
1000 * 0 : The call was initiated. The callback will be invoked when the call completes.
1001 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1003 * When the callback is invoked, status indicates the result:
1004 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1005 * data is LINK2res *
1006 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1007 * data is the error string.
1008 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1012 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
1017 * 0 : The call was initiated. The callback will be invoked when the call completes.
1018 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1020 * When the callback is invoked, status indicates the result:
1021 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1022 * data is SYMLINK2res *
1023 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1024 * data is the error string.
1025 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1028 struct SYMLINK2args
;
1029 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
1034 * 0 : The call was initiated. The callback will be invoked when the call completes.
1035 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1037 * When the callback is invoked, status indicates the result:
1038 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1039 * data is MKDIR2res *
1040 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1041 * data is the error string.
1042 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1046 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
1051 * 0 : The call was initiated. The callback will be invoked when the call completes.
1052 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1054 * When the callback is invoked, status indicates the result:
1055 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1056 * data is RMDIR2res *
1057 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1058 * data is the error string.
1059 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1063 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
1068 * 0 : The call was initiated. The callback will be invoked when the call completes.
1069 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1071 * When the callback is invoked, status indicates the result:
1072 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1073 * data is READDIR2res *
1074 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1075 * data is the error string.
1076 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1079 struct READDIR2args
;
1080 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
1085 * 0 : The call was initiated. The callback will be invoked when the call completes.
1086 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1088 * When the callback is invoked, status indicates the result:
1089 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1090 * data is STATFS2res *
1091 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1092 * data is the error string.
1093 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1097 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
1102 char *rquotastat_to_str(int error
);
1103 int rquotastat_to_errno(int error
);
1108 * 0 : The call was initiated. The callback will be invoked when the call completes.
1109 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1111 * When the callback is invoked, status indicates the result:
1112 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1114 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1115 * data is the error string.
1116 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1119 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1122 * Call RQUOTA1/GETQUOTA
1124 * 0 : The call was initiated. The callback will be invoked when the call completes.
1125 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1127 * When the callback is invoked, status indicates the result:
1128 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1129 * data is a RQUOTA1res structure.
1130 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1131 * data is the error string.
1132 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1135 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1138 * Call RQUOTA1/GETACTIVEQUOTA
1140 * 0 : The call was initiated. The callback will be invoked when the call completes.
1141 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1143 * When the callback is invoked, status indicates the result:
1144 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1145 * data is a RQUOTA1res structure.
1146 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1147 * data is the error string.
1148 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1151 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int uid
, void *private_data
);
1159 * 0 : The call was initiated. The callback will be invoked when the call completes.
1160 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1162 * When the callback is invoked, status indicates the result:
1163 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1165 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1166 * data is the error string.
1167 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1170 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1173 * Call RQUOTA2/GETQUOTA
1175 * 0 : The call was initiated. The callback will be invoked when the call completes.
1176 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1178 * When the callback is invoked, status indicates the result:
1179 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1180 * data is a RQUOTA1res structure.
1181 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1182 * data is the error string.
1183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1186 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1189 * Call RQUOTA2/GETACTIVEQUOTA
1191 * 0 : The call was initiated. The callback will be invoked when the call completes.
1192 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1194 * When the callback is invoked, status indicates the result:
1195 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1196 * data is a RQUOTA1res structure.
1197 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1198 * data is the error string.
1199 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1202 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *exportname
, int type
, int uid
, void *private_data
);
1215 * Call the NULL procedure for the NFSACL
1218 * 0 : The call was initiated. The callback will be invoked when the call completes.
1219 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1221 * When the callback is invoked, status indicates the result:
1222 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1224 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1225 * data is the error string.
1226 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1229 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1232 * Call NFSACL/GETACL
1235 * 0 : The call was initiated. The callback will be invoked when the call completes.
1236 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1238 * When the callback is invoked, status indicates the result:
1239 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1240 * data is a GETACL3res pointer
1241 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1242 * data is the error string.
1243 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1247 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1252 * Call NFSACL/SETACL
1255 * 0 : The call was initiated. The callback will be invoked when the call completes.
1256 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1258 * When the callback is invoked, status indicates the result:
1259 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1260 * data is a SETACL3res pointer
1261 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1262 * data is the error string.
1263 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1267 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1275 char *nlmstat4_to_str(int stat
);
1279 * Call the NULL 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.
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 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1297 * Call the TEST procedure for the NLM protocol
1300 * 0 : The call was initiated. The callback will be invoked when the call completes.
1301 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1303 * When the callback is invoked, status indicates the result:
1304 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1305 * data is NLM4_TESTres
1306 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1307 * data is the error string.
1308 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1311 struct NLM4_TESTargs
;
1312 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1316 * Call the LOCK procedure for the NLM protocol
1319 * 0 : The call was initiated. The callback will be invoked when the call completes.
1320 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1322 * When the callback is invoked, status indicates the result:
1323 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1324 * data is NLM4_LOCKres
1325 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1326 * data is the error string.
1327 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1330 struct NLM4_LOCKargs
;
1331 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1335 * Call the CANCEL procedure for the NLM protocol
1338 * 0 : The call was initiated. The callback will be invoked when the call completes.
1339 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1341 * When the callback is invoked, status indicates the result:
1342 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1343 * data is NLM4_CANCres
1344 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1345 * data is the error string.
1346 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1349 struct NLM4_CANCargs
;
1350 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1354 * Call the UNLOCK procedure for the NLM protocol
1357 * 0 : The call was initiated. The callback will be invoked when the call completes.
1358 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1360 * When the callback is invoked, status indicates the result:
1361 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1362 * data is NLM4_UNLOCKres
1363 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1364 * data is the error string.
1365 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1368 struct NLM4_UNLOCKargs
;
1369 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1374 char *nsmstat1_to_str(int stat
);
1378 * Call the NULL 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.
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 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1396 * Call the STAT procedure for the NSM protocol
1399 * 0 : The call was initiated. The callback will be invoked when the call completes.
1400 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1402 * When the callback is invoked, status indicates the result:
1403 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1404 * data is NSM1_STATres
1405 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1406 * data is the error string.
1407 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1410 struct NSM1_STATargs
;
1411 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1415 * Call the MON procedure for the NSM protocol
1418 * 0 : The call was initiated. The callback will be invoked when the call completes.
1419 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1421 * When the callback is invoked, status indicates the result:
1422 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1423 * data is NSM1_MONres
1424 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1425 * data is the error string.
1426 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1429 struct NSM1_MONargs
;
1430 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1434 * Call the UNMON procedure for the NSM protocol
1437 * 0 : The call was initiated. The callback will be invoked when the call completes.
1438 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1440 * When the callback is invoked, status indicates the result:
1441 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1442 * data is NSM1_UNMONres
1443 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1444 * data is the error string.
1445 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1448 struct NSM1_UNMONargs
;
1449 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1453 * Call the UNMONALL procedure for the NSM protocol
1456 * 0 : The call was initiated. The callback will be invoked when the call completes.
1457 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1459 * When the callback is invoked, status indicates the result:
1460 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1461 * data is NSM1_UNMONALLres
1462 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1463 * data is the error string.
1464 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1467 struct NSM1_UNMONALLargs
;
1468 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1471 * Call NSM/SIMUCRASH
1472 * Call the SIMUCRASH 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 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1490 * Call the NOTIFY procedure for the NSM protocol
1493 * 0 : The call was initiated. The callback will be invoked when the call completes.
1494 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1496 * When the callback is invoked, status indicates the result:
1497 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1499 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1500 * data is the error string.
1501 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1504 struct NSM1_NOTIFYargs
;
1505 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);