1fb619597c9e41d768ff581cc846241d30a65374
2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>.
18 * This is the lowlevel interface to access NFS resources.
19 * Through this interface you have access to the full gamut of nfs and nfs related
20 * protocol as well as the XDR encoded/decoded structures.
22 #ifndef _LIBNFS_RAW_H_
23 #define _LIBNFS_RAW_H_
26 #include <nfsc/libnfs-zdr.h>
34 struct rpc_context
*rpc_init_context(void);
35 void rpc_destroy_context(struct rpc_context
*rpc
);
37 void rpc_set_auth(struct rpc_context
*rpc
, struct AUTH
*auth
);
39 int rpc_get_fd(struct rpc_context
*rpc
);
40 int rpc_which_events(struct rpc_context
*rpc
);
41 int rpc_service(struct rpc_context
*rpc
, int revents
);
42 char *rpc_get_error(struct rpc_context
*rpc
);
43 int rpc_queue_length(struct rpc_context
*rpc
);
45 /* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL
46 * calls on a NFS context.
48 struct rpc_context
*nfs_get_rpc_context(struct nfs_context
*nfs
);
50 /* This function returns the nfs_fh3 structure from a nfsfh structure.
51 This allows to use a file onened with nfs_open() together with low-level
52 rpc functions that thake a nfs filehandle
54 struct nfs_fh3
*nfs_get_fh(struct nfsfh
*nfsfh
);
56 /* Control what the next XID value to be used on the context will be.
57 This can be used when multiple contexts are used to the same server
58 to avoid that the two contexts have xid collissions.
60 void rpc_set_next_xid(struct rpc_context
*rpc
, uint32_t xid
);
62 #define RPC_STATUS_SUCCESS 0
63 #define RPC_STATUS_ERROR 1
64 #define RPC_STATUS_CANCEL 2
67 * Async connection to the tcp port at server:port.
69 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
70 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
72 * When the callback is invoked, status indicates the result:
73 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
75 * RPC_STATUS_ERROR : The connection failed to establish.
76 * data is the erro string.
77 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
80 int rpc_connect_async(struct rpc_context
*rpc
, const char *server
, int port
, rpc_cb cb
, void *private_data
);
82 * Async function to connect to a specific RPC program/version
84 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
85 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
87 * When the callback is invoked, status indicates the result:
88 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
90 * RPC_STATUS_ERROR : The connection failed to establish.
91 * data is the erro string.
92 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
95 int rpc_connect_program_async(struct rpc_context
*rpc
, char *server
, int program
, int version
, rpc_cb cb
, void *private_data
);
97 * When disconnecting a connection in flight. All commands in flight will be called with the callback
98 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
100 int rpc_disconnect(struct rpc_context
*rpc
, char *error
);
108 * Call PORTMAPPER/NULL
110 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
111 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
113 * When the callback is invoked, status indicates the result:
114 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
116 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
117 * data is the error string.
118 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
121 EXTERN
int rpc_pmap_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
125 * Call PORTMAPPER/GETPORT.
127 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
128 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
130 * When the callback is invoked, status indicates the result:
131 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
132 * data is a (uint32_t *), containing the port returned.
133 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
134 * data is the error string.
135 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
138 EXTERN
int rpc_pmap_getport_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, rpc_cb cb
, void *private_data
);
141 * Call PORTMAPPER/SET
143 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
144 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
146 * When the callback is invoked, status indicates the result:
147 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
148 * data is a (uint32_t *), containing status
149 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
150 * data is the error string.
151 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
154 EXTERN
int rpc_pmap_set_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
157 * Call PORTMAPPER/UNSET
159 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
160 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
162 * When the callback is invoked, status indicates the result:
163 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
164 * data is a (uint32_t *), containing status
165 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
166 * data is the error string.
167 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
170 EXTERN
int rpc_pmap_unset_async(struct rpc_context
*rpc
, int program
, int version
, int protocol
, int port
, rpc_cb cb
, void *private_data
);
173 * Call PORTMAPPER/CALLIT.
175 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
176 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
178 * When the callback is invoked, status indicates the result:
179 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
180 * data is a 'pmap_call_result' pointer.
181 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
182 * data is the error string.
183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
186 EXTERN
int rpc_pmap_callit_async(struct rpc_context
*rpc
, int program
, int version
, int procedure
, char *data
, int datalen
, rpc_cb cb
, void *private_data
);
191 char *mountstat3_to_str(int stat
);
192 int mountstat3_to_errno(int error
);
197 * 0 : The call was initiated. The callback will be invoked when the call completes.
198 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
200 * When the callback is invoked, status indicates the result:
201 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
203 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
204 * data is the error string.
205 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
208 EXTERN
int rpc_mount_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
213 * 0 : The call was initiated. The callback will be invoked when the call completes.
214 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
216 * When the callback is invoked, status indicates the result:
217 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
218 * data is union mountres3.
219 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
220 * data is the error string.
221 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
224 EXTERN
int rpc_mount_mnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
229 * 0 : The call was initiated. The callback will be invoked when the call completes.
230 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
232 * When the callback is invoked, status indicates the result:
233 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
234 * data is a mountlist.
235 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
236 * data is the error string.
237 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
240 EXTERN
int rpc_mount_dump_async(struct rpc_context
*rpc
, rpc_cb cb
, 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.
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_mount_umnt_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, void *private_data
);
261 * 0 : The call was initiated. The callback will be invoked when the call completes.
262 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
264 * When the callback is invoked, status indicates the result:
265 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
267 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
268 * data is the error string.
269 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
272 EXTERN
int rpc_mount_umntall_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
276 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
277 * returned structures.
280 * 0 : The call was initiated. The callback will be invoked when the call completes.
281 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
283 * When the callback is invoked, status indicates the result:
284 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
285 * data is a pointer to an exports pointer:
286 * exports export = *(exports *)data;
287 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
288 * data is the error string.
289 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
292 EXTERN
int rpc_mount_export_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
301 char *nfsstat3_to_str(int error
);
302 int nfsstat3_to_errno(int error
);
307 * 0 : The call was initiated. The callback will be invoked when the call completes.
308 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
310 * When the callback is invoked, status indicates the result:
311 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
313 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
314 * data is the error string.
315 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
318 EXTERN
int rpc_nfs3_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
319 EXTERN
int rpc_nfs_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
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 nfs daemon.
329 * data is GETATTR3res
330 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
331 * data is the error string.
332 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
336 EXTERN
int rpc_nfs3_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR3args
*args
, void *private_data
);
337 EXTERN
int rpc_nfs_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
342 * 0 : The call was initiated. The callback will be invoked when the call completes.
343 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
345 * When the callback is invoked, status indicates the result:
346 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
347 * data is PATHCONF3res
348 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
349 * data is the error string.
350 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
353 struct PATHCONF3args
;
354 EXTERN
int rpc_nfs3_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct PATHCONF3args
*args
, void *private_data
);
355 EXTERN
int rpc_nfs_pathconf_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
360 * 0 : The call was initiated. The callback will be invoked when the call completes.
361 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
363 * When the callback is invoked, status indicates the result:
364 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
366 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
367 * data is the error string.
368 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
372 EXTERN
int rpc_nfs3_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP3args
*args
, void *private_data
);
373 EXTERN
int rpc_nfs_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
378 * 0 : The call was initiated. The callback will be invoked when the call completes.
379 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
381 * When the callback is invoked, status indicates the result:
382 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
384 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
385 * data is the error string.
386 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
390 EXTERN
int rpc_nfs3_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct ACCESS3args
*args
, void *private_data
);
391 EXTERN
int rpc_nfs_access_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, int access
, void *private_data
);
396 * 0 : The call was initiated. The callback will be invoked when the call completes.
397 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
399 * When the callback is invoked, status indicates the result:
400 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
402 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
403 * data is the error string.
404 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
408 EXTERN
int rpc_nfs3_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ3args
*args
, void *private_data
);
409 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
);
414 * 0 : The call was initiated. The callback will be invoked when the call completes.
415 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
417 * When the callback is invoked, status indicates the result:
418 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
419 * data is WRITE3res *
420 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
421 * data is the error string.
422 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
426 EXTERN
int rpc_nfs3_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE3args
*args
, void *private_data
);
427 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
);
432 * 0 : The call was initiated. The callback will be invoked when the call completes.
433 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
435 * When the callback is invoked, status indicates the result:
436 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
437 * data is COMMIT3res *
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.
444 EXTERN
int rpc_nfs3_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct COMMIT3args
*args
, void *private_data
);
445 EXTERN
int rpc_nfs_commit_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
450 * 0 : The call was initiated. The callback will be invoked when the call completes.
451 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
453 * When the callback is invoked, status indicates the result:
454 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
455 * data is SETATTR3res *
456 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
457 * data is the error string.
458 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
462 EXTERN
int rpc_nfs3_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
463 EXTERN
int rpc_nfs_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR3args
*args
, void *private_data
);
468 * 0 : The call was initiated. The callback will be invoked when the call completes.
469 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
471 * When the callback is invoked, status indicates the result:
472 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
473 * data is MKDIR3res *
474 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
475 * data is the error string.
476 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
480 EXTERN
int rpc_nfs3_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
481 EXTERN
int rpc_nfs_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR3args
*args
, void *private_data
);
486 * 0 : The call was initiated. The callback will be invoked when the call completes.
487 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
489 * When the callback is invoked, status indicates the result:
490 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
491 * data is RMDIR3res *
492 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
493 * data is the error string.
494 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
498 EXTERN
int rpc_nfs3_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR3args
*args
, void *private_data
);
499 EXTERN
int rpc_nfs_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *dir
, void *private_data
);
504 * 0 : The call was initiated. The callback will be invoked when the call completes.
505 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
507 * When the callback is invoked, status indicates the result:
508 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
509 * data is CREATE3res *
510 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
511 * data is the error string.
512 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
516 EXTERN
int rpc_nfs3_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
517 EXTERN
int rpc_nfs_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE3args
*args
, void *private_data
);
522 * 0 : The call was initiated. The callback will be invoked when the call completes.
523 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
525 * When the callback is invoked, status indicates the result:
526 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
527 * data is MKNOD3res *
528 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
529 * data is the error string.
530 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
534 EXTERN
int rpc_nfs3_mknod_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKNOD3args
*args
, void *private_data
);
535 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
);
540 * 0 : The call was initiated. The callback will be invoked when the call completes.
541 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
543 * When the callback is invoked, status indicates the result:
544 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
545 * data is REMOVE3res *
546 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
547 * data is the error string.
548 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
552 EXTERN
int rpc_nfs3_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE3args
*args
, void *private_data
);
553 EXTERN
int rpc_nfs_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, char *name
, void *private_data
);
558 * 0 : The call was initiated. The callback will be invoked when the call completes.
559 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
561 * When the callback is invoked, status indicates the result:
562 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
563 * data is READDIR3res *
564 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
565 * data is the error string.
566 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
570 EXTERN
int rpc_nfs3_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR3args
*args
, void *private_data
);
571 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
);
574 * Call NFS3/READDIRPLUS
576 * 0 : The call was initiated. The callback will be invoked when the call completes.
577 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
579 * When the callback is invoked, status indicates the result:
580 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
581 * data is READDIRPLUS3res *
582 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
583 * data is the error string.
584 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
587 struct READDIRPLUS3args
;
588 EXTERN
int rpc_nfs3_readdirplus_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIRPLUS3args
*args
, void *private_data
);
589 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
);
594 * 0 : The call was initiated. The callback will be invoked when the call completes.
595 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
597 * When the callback is invoked, status indicates the result:
598 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
600 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
601 * data is the error string.
602 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
606 EXTERN
int rpc_nfs3_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSSTAT3args
*args
, void *private_data
);
607 EXTERN
int rpc_nfs_fsstat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
612 * 0 : The call was initiated. The callback will be invoked when the call completes.
613 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
615 * When the callback is invoked, status indicates the result:
616 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
618 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
619 * data is the error string.
620 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
624 EXTERN
int rpc_nfs3_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct FSINFO3args
*args
, void *private_data
);
625 EXTERN
int rpc_nfs_fsinfo_async(struct rpc_context
*rpc
, rpc_cb cb
, struct nfs_fh3
*fh
, void *private_data
);
630 * 0 : The call was initiated. The callback will be invoked when the call completes.
631 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
633 * When the callback is invoked, status indicates the result:
634 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
635 * data is READLINK3res *
636 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
637 * data is the error string.
638 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
641 struct READLINK3args
;
642 EXTERN
int rpc_nfs3_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
643 EXTERN
int rpc_nfs_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK3args
*args
, void *private_data
);
648 * 0 : The call was initiated. The callback will be invoked when the call completes.
649 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
651 * When the callback is invoked, status indicates the result:
652 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
653 * data is SYMLINK3res *
654 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
655 * data is the error string.
656 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
660 EXTERN
int rpc_nfs3_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
661 EXTERN
int rpc_nfs_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK3args
*args
, void *private_data
);
666 * 0 : The call was initiated. The callback will be invoked when the call completes.
667 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
669 * When the callback is invoked, status indicates the result:
670 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
671 * data is RENAME3res *
672 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
673 * data is the error string.
674 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
678 EXTERN
int rpc_nfs3_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME3args
*args
, void *private_data
);
679 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
);
684 * 0 : The call was initiated. The callback will be invoked when the call completes.
685 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
687 * When the callback is invoked, status indicates the result:
688 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
690 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
691 * data is the error string.
692 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
696 EXTERN
int rpc_nfs3_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK3args
*args
, void *private_data
);
697 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
);
706 * 0 : The call was initiated. The callback will be invoked when the call completes.
707 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
709 * When the callback is invoked, status indicates the result:
710 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
712 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
713 * data is the error string.
714 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
717 EXTERN
int rpc_nfs2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
722 * 0 : The call was initiated. The callback will be invoked when the call completes.
723 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
725 * When the callback is invoked, status indicates the result:
726 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
727 * data is GETATTR2res
728 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
729 * data is the error string.
730 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
734 EXTERN
int rpc_nfs2_getattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETATTR2args
*args
, void *private_data
);
739 * 0 : The call was initiated. The callback will be invoked when the call completes.
740 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
742 * When the callback is invoked, status indicates the result:
743 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
744 * data is SETATTR2res *
745 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
746 * data is the error string.
747 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
751 EXTERN
int rpc_nfs2_setattr_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETATTR2args
*args
, void *private_data
);
756 * 0 : The call was initiated. The callback will be invoked when the call completes.
757 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
759 * When the callback is invoked, status indicates the result:
760 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
762 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
763 * data is the error string.
764 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
768 EXTERN
int rpc_nfs2_lookup_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LOOKUP2args
*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 READLINK2res *
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.
784 struct READLINK2args
;
785 EXTERN
int rpc_nfs32_readlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READLINK2args
*args
, void *private_data
);
790 * 0 : The call was initiated. The callback will be invoked when the call completes.
791 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
793 * When the callback is invoked, status indicates the result:
794 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
796 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
797 * data is the error string.
798 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
802 EXTERN
int rpc_nfs2_read_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READ2args
*args
, void *private_data
);
807 * 0 : The call was initiated. The callback will be invoked when the call completes.
808 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
810 * When the callback is invoked, status indicates the result:
811 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
812 * data is WRITE2res *
813 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
814 * data is the error string.
815 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
819 EXTERN
int rpc_nfs2_write_async(struct rpc_context
*rpc
, rpc_cb cb
, struct WRITE2args
*args
, void *private_data
);
824 * 0 : The call was initiated. The callback will be invoked when the call completes.
825 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
827 * When the callback is invoked, status indicates the result:
828 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
829 * data is CREATE2res *
830 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
831 * data is the error string.
832 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
836 EXTERN
int rpc_nfs2_create_async(struct rpc_context
*rpc
, rpc_cb cb
, struct CREATE2args
*args
, void *private_data
);
841 * 0 : The call was initiated. The callback will be invoked when the call completes.
842 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
844 * When the callback is invoked, status indicates the result:
845 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
846 * data is REMOVE2res *
847 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
848 * data is the error string.
849 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
853 EXTERN
int rpc_nfs2_remove_async(struct rpc_context
*rpc
, rpc_cb cb
, struct REMOVE2args
*args
, void *private_data
);
858 * 0 : The call was initiated. The callback will be invoked when the call completes.
859 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
861 * When the callback is invoked, status indicates the result:
862 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
863 * data is RENAME2res *
864 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
865 * data is the error string.
866 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
870 EXTERN
int rpc_nfs2_rename_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RENAME2args
*args
, void *private_data
);
875 * 0 : The call was initiated. The callback will be invoked when the call completes.
876 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
878 * When the callback is invoked, status indicates the result:
879 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
881 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
882 * data is the error string.
883 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
887 EXTERN
int rpc_nfs2_link_async(struct rpc_context
*rpc
, rpc_cb cb
, struct LINK2args
*args
, void *private_data
);
892 * 0 : The call was initiated. The callback will be invoked when the call completes.
893 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
895 * When the callback is invoked, status indicates the result:
896 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
897 * data is SYMLINK2res *
898 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
899 * data is the error string.
900 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
904 EXTERN
int rpc_nfs2_symlink_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SYMLINK2args
*args
, void *private_data
);
909 * 0 : The call was initiated. The callback will be invoked when the call completes.
910 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
912 * When the callback is invoked, status indicates the result:
913 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
914 * data is MKDIR2res *
915 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
916 * data is the error string.
917 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
921 EXTERN
int rpc_nfs2_mkdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct MKDIR2args
*args
, void *private_data
);
926 * 0 : The call was initiated. The callback will be invoked when the call completes.
927 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
929 * When the callback is invoked, status indicates the result:
930 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
931 * data is RMDIR2res *
932 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
933 * data is the error string.
934 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
938 EXTERN
int rpc_nfs2_rmdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct RMDIR2args
*args
, void *private_data
);
943 * 0 : The call was initiated. The callback will be invoked when the call completes.
944 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
946 * When the callback is invoked, status indicates the result:
947 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
948 * data is READDIR2res *
949 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
950 * data is the error string.
951 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
955 EXTERN
int rpc_nfs2_readdir_async(struct rpc_context
*rpc
, rpc_cb cb
, struct READDIR2args
*args
, void *private_data
);
960 * 0 : The call was initiated. The callback will be invoked when the call completes.
961 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
963 * When the callback is invoked, status indicates the result:
964 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
965 * data is STATFS2res *
966 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
967 * data is the error string.
968 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
972 EXTERN
int rpc_nfs2_statfs_async(struct rpc_context
*rpc
, rpc_cb cb
, struct STATFS2args
*args
, void *private_data
);
977 char *rquotastat_to_str(int error
);
978 int rquotastat_to_errno(int error
);
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 rquota daemon.
989 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
990 * data is the error string.
991 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
994 EXTERN
int rpc_rquota1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
997 * Call RQUOTA1/GETQUOTA
999 * 0 : The call was initiated. The callback will be invoked when the call completes.
1000 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1002 * When the callback is invoked, status indicates the result:
1003 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1004 * data is a RQUOTA1res structure.
1005 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1006 * data is the error string.
1007 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1010 EXTERN
int rpc_rquota1_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, void *private_data
);
1013 * Call RQUOTA1/GETACTIVEQUOTA
1015 * 0 : The call was initiated. The callback will be invoked when the call completes.
1016 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1018 * When the callback is invoked, status indicates the result:
1019 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1020 * data is a RQUOTA1res structure.
1021 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1022 * data is the error string.
1023 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1026 EXTERN
int rpc_rquota1_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int uid
, 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 rquota daemon.
1040 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1041 * data is the error string.
1042 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1045 int rpc_rquota2_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1048 * Call RQUOTA2/GETQUOTA
1050 * 0 : The call was initiated. The callback will be invoked when the call completes.
1051 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1053 * When the callback is invoked, status indicates the result:
1054 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1055 * data is a RQUOTA1res structure.
1056 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1057 * data is the error string.
1058 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1061 int rpc_rquota2_getquota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
1064 * Call RQUOTA2/GETACTIVEQUOTA
1066 * 0 : The call was initiated. The callback will be invoked when the call completes.
1067 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1069 * When the callback is invoked, status indicates the result:
1070 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1071 * data is a RQUOTA1res structure.
1072 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1073 * data is the error string.
1074 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1077 int rpc_rquota2_getactivequota_async(struct rpc_context
*rpc
, rpc_cb cb
, char *export
, int type
, int uid
, void *private_data
);
1090 * Call the NULL procedure for the NFSACL
1093 * 0 : The call was initiated. The callback will be invoked when the call completes.
1094 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1096 * When the callback is invoked, status indicates the result:
1097 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1099 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1100 * data is the error string.
1101 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1104 EXTERN
int rpc_nfsacl_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1107 * Call NFSACL/GETACL
1110 * 0 : The call was initiated. The callback will be invoked when the call completes.
1111 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1113 * When the callback is invoked, status indicates the result:
1114 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1115 * data is a GETACL3res pointer
1116 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1117 * data is the error string.
1118 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1122 EXTERN
int rpc_nfsacl_getacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct GETACL3args
*args
, void *private_data
);
1127 * Call NFSACL/SETACL
1130 * 0 : The call was initiated. The callback will be invoked when the call completes.
1131 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1133 * When the callback is invoked, status indicates the result:
1134 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1135 * data is a SETACL3res pointer
1136 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1137 * data is the error string.
1138 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1142 EXTERN
int rpc_nfsacl_setacl_async(struct rpc_context
*rpc
, rpc_cb cb
, struct SETACL3args
*args
, void *private_data
);
1150 char *nlmstat4_to_str(int stat
);
1154 * Call the NULL procedure for the NLM protocol
1157 * 0 : The call was initiated. The callback will be invoked when the call completes.
1158 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1160 * When the callback is invoked, status indicates the result:
1161 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1163 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1164 * data is the error string.
1165 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1168 EXTERN
int rpc_nlm4_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1172 * Call the TEST procedure for the NLM protocol
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 nlm daemon.
1180 * data is NLM4_TESTres
1181 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1182 * data is the error string.
1183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1186 struct NLM4_TESTargs
;
1187 EXTERN
int rpc_nlm4_test_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_TESTargs
*args
, void *private_data
);
1191 * Call the LOCK procedure for the NLM protocol
1194 * 0 : The call was initiated. The callback will be invoked when the call completes.
1195 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1197 * When the callback is invoked, status indicates the result:
1198 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1199 * data is NLM4_LOCKres
1200 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1201 * data is the error string.
1202 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1205 struct NLM4_LOCKargs
;
1206 EXTERN
int rpc_nlm4_lock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_LOCKargs
*args
, void *private_data
);
1210 * Call the CANCEL procedure for the NLM protocol
1213 * 0 : The call was initiated. The callback will be invoked when the call completes.
1214 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1216 * When the callback is invoked, status indicates the result:
1217 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1218 * data is NLM4_CANCres
1219 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1220 * data is the error string.
1221 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1224 struct NLM4_CANCargs
;
1225 EXTERN
int rpc_nlm4_cancel_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_CANCargs
*args
, void *private_data
);
1229 * Call the UNLOCK procedure for the NLM protocol
1232 * 0 : The call was initiated. The callback will be invoked when the call completes.
1233 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1235 * When the callback is invoked, status indicates the result:
1236 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1237 * data is NLM4_UNLOCKres
1238 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1239 * data is the error string.
1240 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1243 struct NLM4_UNLOCKargs
;
1244 EXTERN
int rpc_nlm4_unlock_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NLM4_UNLOCKargs
*args
, void *private_data
);
1249 char *nsmstat1_to_str(int stat
);
1253 * Call the NULL procedure for the NSM protocol
1256 * 0 : The call was initiated. The callback will be invoked when the call completes.
1257 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1259 * When the callback is invoked, status indicates the result:
1260 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1262 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1263 * data is the error string.
1264 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1267 EXTERN
int rpc_nsm1_null_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1271 * Call the STAT procedure for the NSM protocol
1274 * 0 : The call was initiated. The callback will be invoked when the call completes.
1275 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1277 * When the callback is invoked, status indicates the result:
1278 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1279 * data is NSM1_STATres
1280 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1281 * data is the error string.
1282 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1285 struct NSM1_STATargs
;
1286 EXTERN
int rpc_nsm1_stat_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_STATargs
*args
, void *private_data
);
1290 * Call the MON procedure for the NSM protocol
1293 * 0 : The call was initiated. The callback will be invoked when the call completes.
1294 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1296 * When the callback is invoked, status indicates the result:
1297 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1298 * data is NSM1_MONres
1299 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1300 * data is the error string.
1301 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1304 struct NSM1_MONargs
;
1305 EXTERN
int rpc_nsm1_mon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_MONargs
*args
, void *private_data
);
1309 * Call the UNMON procedure for the NSM protocol
1312 * 0 : The call was initiated. The callback will be invoked when the call completes.
1313 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1315 * When the callback is invoked, status indicates the result:
1316 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1317 * data is NSM1_UNMONres
1318 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1319 * data is the error string.
1320 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1323 struct NSM1_UNMONargs
;
1324 EXTERN
int rpc_nsm1_unmon_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONargs
*args
, void *private_data
);
1328 * Call the UNMONALL procedure for the NSM protocol
1331 * 0 : The call was initiated. The callback will be invoked when the call completes.
1332 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1334 * When the callback is invoked, status indicates the result:
1335 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1336 * data is NSM1_UNMONALLres
1337 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1338 * data is the error string.
1339 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1342 struct NSM1_UNMONALLargs
;
1343 EXTERN
int rpc_nsm1_unmonall_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_UNMONALLargs
*args
, void *private_data
);
1346 * Call NSM/SIMUCRASH
1347 * Call the SIMUCRASH procedure for the NSM protocol
1350 * 0 : The call was initiated. The callback will be invoked when the call completes.
1351 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1353 * When the callback is invoked, status indicates the result:
1354 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1356 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1357 * data is the error string.
1358 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1361 EXTERN
int rpc_nsm1_simucrash_async(struct rpc_context
*rpc
, rpc_cb cb
, void *private_data
);
1365 * Call the NOTIFY procedure for the NSM protocol
1368 * 0 : The call was initiated. The callback will be invoked when the call completes.
1369 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1371 * When the callback is invoked, status indicates the result:
1372 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1374 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1375 * data is the error string.
1376 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1379 struct NSM1_NOTIFYargs
;
1380 EXTERN
int rpc_nsm1_notify_async(struct rpc_context
*rpc
, rpc_cb cb
, struct NSM1_NOTIFYargs
*args
, void *private_data
);