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 /* This function can be used to set the file descriptor used for
63 * the RPC context. It is primarily useful when emulating dup2()
64 * and similar or where you want full control of the filedescriptor numbers
65 * used by the rpc socket.
68 * oldfd = rpc_get_fd(rpc);
70 * rpc_set_fd(rpc, newfd);
74 void rpc_set_fd(struct rpc_context
*rpc
, int fd
);
76 #define RPC_STATUS_SUCCESS 0
77 #define RPC_STATUS_ERROR 1
78 #define RPC_STATUS_CANCEL 2
81 * Async connection to the tcp port at server:port.
83 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
84 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
86 * When the callback is invoked, status indicates the result:
87 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
89 * RPC_STATUS_ERROR : The connection failed to establish.
90 * data is the erro string.
91 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
94 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
96 * Async function to connect to a specific RPC program/version
98 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
99 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
101 * When the callback is invoked, status indicates the result:
102 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
104 * RPC_STATUS_ERROR : The connection failed to establish.
105 * data is the erro string.
106 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
109 int rpc_connect_program_async(struct rpc_context
*rpc
, char *server
, int program
, int version
, rpc_cb cb
, void *private_data
);
111 * When disconnecting a connection in flight. All commands in flight will be called with the callback
112 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
114 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
122 * Call PORTMAPPER/NULL
124 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
125 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
127 * When the callback is invoked, status indicates the result:
128 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
130 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
131 * data is the error string.
132 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
135 EXTERN
int rpc_pmap_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
139 * Call PORTMAPPER/GETPORT.
141 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
142 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
144 * When the callback is invoked, status indicates the result:
145 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
146 * data is a (uint32_t *), containing the port returned.
147 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
148 * data is the error string.
149 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
152 EXTERN
int rpc_pmap_getport_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, rpc_cb cb
, void *private_data
);
155 * Call PORTMAPPER/SET
157 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
158 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
160 * When the callback is invoked, status indicates the result:
161 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
162 * data is a (uint32_t *), containing status
163 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
164 * data is the error string.
165 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
168 EXTERN
int rpc_pmap_set_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
171 * Call PORTMAPPER/UNSET
173 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
174 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
176 * When the callback is invoked, status indicates the result:
177 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
178 * data is a (uint32_t *), containing status
179 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
180 * data is the error string.
181 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
184 EXTERN
int rpc_pmap_unset_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
187 * Call PORTMAPPER/CALLIT.
189 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
190 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
192 * When the callback is invoked, status indicates the result:
193 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
194 * data is a 'pmap_call_result' pointer.
195 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
196 * data is the error string.
197 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
200 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
);
205 char *mountstat3_to_str(int stat
);
206 int mountstat3_to_errno(int error
);
211 * 0 : The call was initiated. The callback will be invoked when the call completes.
212 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
214 * When the callback is invoked, status indicates the result:
215 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
217 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
218 * data is the error string.
219 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
222 EXTERN
int rpc_mount3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
223 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
228 * 0 : The call was initiated. The callback will be invoked when the call completes.
229 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
231 * When the callback is invoked, status indicates the result:
232 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
233 * data is union mountres3.
234 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
235 * data is the error string.
236 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
239 EXTERN
int rpc_mount3_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
240 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
245 * 0 : The call was initiated. The callback will be invoked when the call completes.
246 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
248 * When the callback is invoked, status indicates the result:
249 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
250 * data is a mountlist.
251 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
252 * data is the error string.
253 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
256 EXTERN
int rpc_mount3_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
257 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
262 * 0 : The call was initiated. The callback will be invoked when the call completes.
263 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
265 * When the callback is invoked, status indicates the result:
266 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
268 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
269 * data is the error string.
270 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
273 EXTERN
int rpc_mount3_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
274 EXTERN
int rpc_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
277 * Call MOUNT3/UMNTALL
279 * 0 : The call was initiated. The callback will be invoked when the call completes.
280 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
282 * When the callback is invoked, status indicates the result:
283 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
285 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
286 * data is the error string.
287 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
290 EXTERN
int rpc_mount3_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
291 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
295 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
296 * returned structures.
299 * 0 : The call was initiated. The callback will be invoked when the call completes.
300 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
302 * When the callback is invoked, status indicates the result:
303 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
304 * data is a pointer to an exports pointer:
305 * exports export = *(exports *)data;
306 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
307 * data is the error string.
308 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
311 EXTERN
int rpc_mount3_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
312 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
315 * MOUNT v1 FUNCTIONS (Used with NFSv2)
320 * 0 : The call was initiated. The callback will be invoked when the call completes.
321 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
323 * When the callback is invoked, status indicates the result:
324 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
326 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
327 * data is the error string.
328 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
331 EXTERN
int rpc_mount1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
336 * 0 : The call was initiated. The callback will be invoked when the call completes.
337 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
339 * When the callback is invoked, status indicates the result:
340 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
341 * data is union mountres1.
342 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
343 * data is the error string.
344 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
347 EXTERN
int rpc_mount1_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
352 * 0 : The call was initiated. The callback will be invoked when the call completes.
353 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
355 * When the callback is invoked, status indicates the result:
356 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
357 * data is a mountlist.
358 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
359 * data is the error string.
360 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
363 EXTERN
int rpc_mount1_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
368 * 0 : The call was initiated. The callback will be invoked when the call completes.
369 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
371 * When the callback is invoked, status indicates the result:
372 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
374 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
375 * data is the error string.
376 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
379 EXTERN
int rpc_mount1_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
382 * Call MOUNT1/UMNTALL
384 * 0 : The call was initiated. The callback will be invoked when the call completes.
385 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
387 * When the callback is invoked, status indicates the result:
388 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
390 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
391 * data is the error string.
392 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
395 EXTERN
int rpc_mount1_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
399 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
400 * returned structures.
403 * 0 : The call was initiated. The callback will be invoked when the call completes.
404 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
406 * When the callback is invoked, status indicates the result:
407 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
408 * data is a pointer to an exports pointer:
409 * exports export = *(exports *)data;
410 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
411 * data is the error string.
412 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
415 EXTERN
int rpc_mount1_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
422 char *nfsstat3_to_str(int error
);
423 int nfsstat3_to_errno(int error
);
428 * 0 : The call was initiated. The callback will be invoked when the call completes.
429 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
431 * When the callback is invoked, status indicates the result:
432 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
434 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
435 * data is the error string.
436 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
439 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
440 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
445 * 0 : The call was initiated. The callback will be invoked when the call completes.
446 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
448 * When the callback is invoked, status indicates the result:
449 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
450 * data is GETATTR3res
451 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
452 * data is the error string.
453 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
457 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
458 EXTERN
int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
463 * 0 : The call was initiated. The callback will be invoked when the call completes.
464 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
466 * When the callback is invoked, status indicates the result:
467 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
468 * data is PATHCONF3res
469 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
470 * data is the error string.
471 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
474 struct PATHCONF3args
;
475 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
476 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
481 * 0 : The call was initiated. The callback will be invoked when the call completes.
482 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
484 * When the callback is invoked, status indicates the result:
485 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
487 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
488 * data is the error string.
489 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
493 EXTERN
int rpc_nfs3_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
494 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
499 * 0 : The call was initiated. The callback will be invoked when the call completes.
500 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
502 * When the callback is invoked, status indicates the result:
503 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
505 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
506 * data is the error string.
507 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
511 EXTERN
int rpc_nfs3_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
512 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
517 * 0 : The call was initiated. The callback will be invoked when the call completes.
518 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
520 * When the callback is invoked, status indicates the result:
521 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
523 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
524 * data is the error string.
525 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
529 EXTERN
int rpc_nfs3_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
530 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
);
535 * 0 : The call was initiated. The callback will be invoked when the call completes.
536 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
538 * When the callback is invoked, status indicates the result:
539 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
540 * data is WRITE3res *
541 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
542 * data is the error string.
543 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
547 EXTERN
int rpc_nfs3_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
548 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
);
553 * 0 : The call was initiated. The callback will be invoked when the call completes.
554 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
556 * When the callback is invoked, status indicates the result:
557 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
558 * data is COMMIT3res *
559 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
560 * data is the error string.
561 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
565 EXTERN
int rpc_nfs3_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
566 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
571 * 0 : The call was initiated. The callback will be invoked when the call completes.
572 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
574 * When the callback is invoked, status indicates the result:
575 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
576 * data is SETATTR3res *
577 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
578 * data is the error string.
579 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
583 EXTERN
int rpc_nfs3_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
584 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
589 * 0 : The call was initiated. The callback will be invoked when the call completes.
590 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
592 * When the callback is invoked, status indicates the result:
593 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
594 * data is MKDIR3res *
595 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
596 * data is the error string.
597 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
601 EXTERN
int rpc_nfs3_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
602 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
607 * 0 : The call was initiated. The callback will be invoked when the call completes.
608 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
610 * When the callback is invoked, status indicates the result:
611 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
612 * data is RMDIR3res *
613 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
614 * data is the error string.
615 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
619 EXTERN
int rpc_nfs3_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
620 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
625 * 0 : The call was initiated. The callback will be invoked when the call completes.
626 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
628 * When the callback is invoked, status indicates the result:
629 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
630 * data is CREATE3res *
631 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
632 * data is the error string.
633 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
637 EXTERN
int rpc_nfs3_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
638 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
643 * 0 : The call was initiated. The callback will be invoked when the call completes.
644 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
646 * When the callback is invoked, status indicates the result:
647 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
648 * data is MKNOD3res *
649 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
650 * data is the error string.
651 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
655 EXTERN
int rpc_nfs3_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
656 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
);
661 * 0 : The call was initiated. The callback will be invoked when the call completes.
662 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
664 * When the callback is invoked, status indicates the result:
665 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
666 * data is REMOVE3res *
667 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
668 * data is the error string.
669 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
673 EXTERN
int rpc_nfs3_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
674 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
679 * 0 : The call was initiated. The callback will be invoked when the call completes.
680 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
682 * When the callback is invoked, status indicates the result:
683 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
684 * data is READDIR3res *
685 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
686 * data is the error string.
687 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
691 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
692 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
);
695 * Call NFS3/READDIRPLUS
697 * 0 : The call was initiated. The callback will be invoked when the call completes.
698 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
700 * When the callback is invoked, status indicates the result:
701 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
702 * data is READDIRPLUS3res *
703 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
704 * data is the error string.
705 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
708 struct READDIRPLUS3args
;
709 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
710 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
);
715 * 0 : The call was initiated. The callback will be invoked when the call completes.
716 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
718 * When the callback is invoked, status indicates the result:
719 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
721 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
722 * data is the error string.
723 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
727 EXTERN
int rpc_nfs3_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
728 EXTERN
int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
733 * 0 : The call was initiated. The callback will be invoked when the call completes.
734 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
736 * When the callback is invoked, status indicates the result:
737 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
739 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
740 * data is the error string.
741 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
745 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
746 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
751 * 0 : The call was initiated. The callback will be invoked when the call completes.
752 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
754 * When the callback is invoked, status indicates the result:
755 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
756 * data is READLINK3res *
757 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
758 * data is the error string.
759 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
762 struct READLINK3args
;
763 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
764 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
769 * 0 : The call was initiated. The callback will be invoked when the call completes.
770 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
772 * When the callback is invoked, status indicates the result:
773 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
774 * data is SYMLINK3res *
775 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
776 * data is the error string.
777 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
781 EXTERN
int rpc_nfs3_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
782 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
787 * 0 : The call was initiated. The callback will be invoked when the call completes.
788 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
790 * When the callback is invoked, status indicates the result:
791 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
792 * data is RENAME3res *
793 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
794 * data is the error string.
795 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
799 EXTERN
int rpc_nfs3_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
800 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
);
805 * 0 : The call was initiated. The callback will be invoked when the call completes.
806 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
808 * When the callback is invoked, status indicates the result:
809 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
811 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
812 * data is the error string.
813 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
817 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
818 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
);
827 * 0 : The call was initiated. The callback will be invoked when the call completes.
828 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
830 * When the callback is invoked, status indicates the result:
831 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
833 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
834 * data is the error string.
835 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
838 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
843 * 0 : The call was initiated. The callback will be invoked when the call completes.
844 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
846 * When the callback is invoked, status indicates the result:
847 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
848 * data is GETATTR2res
849 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
850 * data is the error string.
851 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
855 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
860 * 0 : The call was initiated. The callback will be invoked when the call completes.
861 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
863 * When the callback is invoked, status indicates the result:
864 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
865 * data is SETATTR2res *
866 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
867 * data is the error string.
868 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
872 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
877 * 0 : The call was initiated. The callback will be invoked when the call completes.
878 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
880 * When the callback is invoked, status indicates the result:
881 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
883 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
884 * data is the error string.
885 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
889 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*args
, void *private_data
);
894 * 0 : The call was initiated. The callback will be invoked when the call completes.
895 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
897 * When the callback is invoked, status indicates the result:
898 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
899 * data is READLINK2res *
900 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
901 * data is the error string.
902 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
905 struct READLINK2args
;
906 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
911 * 0 : The call was initiated. The callback will be invoked when the call completes.
912 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
914 * When the callback is invoked, status indicates the result:
915 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
917 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
918 * data is the error string.
919 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
923 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
928 * 0 : The call was initiated. The callback will be invoked when the call completes.
929 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
931 * When the callback is invoked, status indicates the result:
932 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
933 * data is WRITE2res *
934 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
935 * data is the error string.
936 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
940 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
945 * 0 : The call was initiated. The callback will be invoked when the call completes.
946 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
948 * When the callback is invoked, status indicates the result:
949 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
950 * data is CREATE2res *
951 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
952 * data is the error string.
953 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
957 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
962 * 0 : The call was initiated. The callback will be invoked when the call completes.
963 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
965 * When the callback is invoked, status indicates the result:
966 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
967 * data is REMOVE2res *
968 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
969 * data is the error string.
970 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
974 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
979 * 0 : The call was initiated. The callback will be invoked when the call completes.
980 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
982 * When the callback is invoked, status indicates the result:
983 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
984 * data is RENAME2res *
985 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
986 * data is the error string.
987 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
991 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
996 * 0 : The call was initiated. The callback will be invoked when the call completes.
997 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
999 * When the callback is invoked, status indicates the result:
1000 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1001 * data is LINK2res *
1002 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1003 * data is the error string.
1004 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1008 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
1013 * 0 : The call was initiated. The callback will be invoked when the call completes.
1014 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1016 * When the callback is invoked, status indicates the result:
1017 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1018 * data is SYMLINK2res *
1019 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1020 * data is the error string.
1021 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1024 struct SYMLINK2args
;
1025 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
1030 * 0 : The call was initiated. The callback will be invoked when the call completes.
1031 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1033 * When the callback is invoked, status indicates the result:
1034 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1035 * data is MKDIR2res *
1036 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1037 * data is the error string.
1038 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1042 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
1047 * 0 : The call was initiated. The callback will be invoked when the call completes.
1048 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1050 * When the callback is invoked, status indicates the result:
1051 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1052 * data is RMDIR2res *
1053 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1054 * data is the error string.
1055 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1059 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
1064 * 0 : The call was initiated. The callback will be invoked when the call completes.
1065 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1067 * When the callback is invoked, status indicates the result:
1068 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1069 * data is READDIR2res *
1070 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1071 * data is the error string.
1072 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1075 struct READDIR2args
;
1076 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
1081 * 0 : The call was initiated. The callback will be invoked when the call completes.
1082 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1084 * When the callback is invoked, status indicates the result:
1085 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1086 * data is STATFS2res *
1087 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1088 * data is the error string.
1089 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1093 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
1098 char *rquotastat_to_str(int error
);
1099 int rquotastat_to_errno(int error
);
1104 * 0 : The call was initiated. The callback will be invoked when the call completes.
1105 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1107 * When the callback is invoked, status indicates the result:
1108 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1110 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1111 * data is the error string.
1112 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1115 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1118 * Call RQUOTA1/GETQUOTA
1120 * 0 : The call was initiated. The callback will be invoked when the call completes.
1121 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1123 * When the callback is invoked, status indicates the result:
1124 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1125 * data is a RQUOTA1res structure.
1126 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1127 * data is the error string.
1128 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1131 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
1134 * Call RQUOTA1/GETACTIVEQUOTA
1136 * 0 : The call was initiated. The callback will be invoked when the call completes.
1137 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1139 * When the callback is invoked, status indicates the result:
1140 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1141 * data is a RQUOTA1res structure.
1142 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1143 * data is the error string.
1144 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1147 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
1155 * 0 : The call was initiated. The callback will be invoked when the call completes.
1156 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1158 * When the callback is invoked, status indicates the result:
1159 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1161 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1162 * data is the error string.
1163 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1166 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1169 * Call RQUOTA2/GETQUOTA
1171 * 0 : The call was initiated. The callback will be invoked when the call completes.
1172 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1174 * When the callback is invoked, status indicates the result:
1175 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1176 * data is a RQUOTA1res structure.
1177 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1178 * data is the error string.
1179 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1182 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
1185 * Call RQUOTA2/GETACTIVEQUOTA
1187 * 0 : The call was initiated. The callback will be invoked when the call completes.
1188 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1190 * When the callback is invoked, status indicates the result:
1191 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1192 * data is a RQUOTA1res structure.
1193 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1194 * data is the error string.
1195 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1198 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
1211 * Call the NULL procedure for the NFSACL
1214 * 0 : The call was initiated. The callback will be invoked when the call completes.
1215 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1217 * When the callback is invoked, status indicates the result:
1218 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1220 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1221 * data is the error string.
1222 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1225 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1228 * Call NFSACL/GETACL
1231 * 0 : The call was initiated. The callback will be invoked when the call completes.
1232 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1234 * When the callback is invoked, status indicates the result:
1235 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1236 * data is a GETACL3res pointer
1237 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1238 * data is the error string.
1239 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1243 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1248 * Call NFSACL/SETACL
1251 * 0 : The call was initiated. The callback will be invoked when the call completes.
1252 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1254 * When the callback is invoked, status indicates the result:
1255 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1256 * data is a SETACL3res pointer
1257 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1258 * data is the error string.
1259 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1263 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1271 char *nlmstat4_to_str(int stat
);
1275 * Call the NULL procedure for the NLM protocol
1278 * 0 : The call was initiated. The callback will be invoked when the call completes.
1279 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1281 * When the callback is invoked, status indicates the result:
1282 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1284 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1285 * data is the error string.
1286 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1289 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1293 * Call the TEST procedure for the NLM protocol
1296 * 0 : The call was initiated. The callback will be invoked when the call completes.
1297 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1299 * When the callback is invoked, status indicates the result:
1300 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1301 * data is NLM4_TESTres
1302 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1303 * data is the error string.
1304 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1307 struct NLM4_TESTargs
;
1308 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1312 * Call the LOCK procedure for the NLM protocol
1315 * 0 : The call was initiated. The callback will be invoked when the call completes.
1316 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1318 * When the callback is invoked, status indicates the result:
1319 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1320 * data is NLM4_LOCKres
1321 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1322 * data is the error string.
1323 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1326 struct NLM4_LOCKargs
;
1327 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1331 * Call the CANCEL procedure for the NLM protocol
1334 * 0 : The call was initiated. The callback will be invoked when the call completes.
1335 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1337 * When the callback is invoked, status indicates the result:
1338 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1339 * data is NLM4_CANCres
1340 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1341 * data is the error string.
1342 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1345 struct NLM4_CANCargs
;
1346 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1350 * Call the UNLOCK procedure for the NLM protocol
1353 * 0 : The call was initiated. The callback will be invoked when the call completes.
1354 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1356 * When the callback is invoked, status indicates the result:
1357 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1358 * data is NLM4_UNLOCKres
1359 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1360 * data is the error string.
1361 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1364 struct NLM4_UNLOCKargs
;
1365 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1370 char *nsmstat1_to_str(int stat
);
1374 * Call the NULL procedure for the NSM protocol
1377 * 0 : The call was initiated. The callback will be invoked when the call completes.
1378 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1380 * When the callback is invoked, status indicates the result:
1381 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1383 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1384 * data is the error string.
1385 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1388 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1392 * Call the STAT procedure for the NSM protocol
1395 * 0 : The call was initiated. The callback will be invoked when the call completes.
1396 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1398 * When the callback is invoked, status indicates the result:
1399 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1400 * data is NSM1_STATres
1401 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1402 * data is the error string.
1403 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1406 struct NSM1_STATargs
;
1407 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1411 * Call the MON procedure for the NSM protocol
1414 * 0 : The call was initiated. The callback will be invoked when the call completes.
1415 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1417 * When the callback is invoked, status indicates the result:
1418 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1419 * data is NSM1_MONres
1420 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1421 * data is the error string.
1422 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1425 struct NSM1_MONargs
;
1426 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1430 * Call the UNMON procedure for the NSM protocol
1433 * 0 : The call was initiated. The callback will be invoked when the call completes.
1434 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1436 * When the callback is invoked, status indicates the result:
1437 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1438 * data is NSM1_UNMONres
1439 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1440 * data is the error string.
1441 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1444 struct NSM1_UNMONargs
;
1445 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1449 * Call the UNMONALL procedure for the NSM protocol
1452 * 0 : The call was initiated. The callback will be invoked when the call completes.
1453 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1455 * When the callback is invoked, status indicates the result:
1456 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1457 * data is NSM1_UNMONALLres
1458 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1459 * data is the error string.
1460 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1463 struct NSM1_UNMONALLargs
;
1464 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1467 * Call NSM/SIMUCRASH
1468 * Call the SIMUCRASH procedure for the NSM protocol
1471 * 0 : The call was initiated. The callback will be invoked when the call completes.
1472 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1474 * When the callback is invoked, status indicates the result:
1475 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1477 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1478 * data is the error string.
1479 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1482 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1486 * Call the NOTIFY procedure for the NSM protocol
1489 * 0 : The call was initiated. The callback will be invoked when the call completes.
1490 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1492 * When the callback is invoked, status indicates the result:
1493 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1495 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1496 * data is the error string.
1497 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1500 struct NSM1_NOTIFYargs
;
1501 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);