PORTMAP: Add support for V3 DUMP command
[deb_libnfs.git] / include / nfsc / libnfs-raw.h
CommitLineData
84004dbf
RS
1/*
2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
3
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.
8
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.
13
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/>.
16*/
17/*
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.
21 */
f9bb21ad
RS
22#ifndef _LIBNFS_RAW_H_
23#define _LIBNFS_RAW_H_
24
84004dbf 25#include <stdint.h>
e803ae57 26#include <nfsc/libnfs-zdr.h>
84004dbf 27
4641d36e
AR
28#ifdef __cplusplus
29extern "C" {
30#endif
31
84004dbf
RS
32struct rpc_data {
33 int size;
34 unsigned char *data;
35};
36
37struct rpc_context;
38struct rpc_context *rpc_init_context(void);
39void rpc_destroy_context(struct rpc_context *rpc);
40
67ba2239 41void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
84004dbf
RS
42
43int rpc_get_fd(struct rpc_context *rpc);
44int rpc_which_events(struct rpc_context *rpc);
45int rpc_service(struct rpc_context *rpc, int revents);
46char *rpc_get_error(struct rpc_context *rpc);
83aa785d 47int rpc_queue_length(struct rpc_context *rpc);
84004dbf 48
fa3c25be
RS
49/* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL
50 * calls on a NFS context.
51 */
52struct rpc_context *nfs_get_rpc_context(struct nfs_context *nfs);
53
54/* This function returns the nfs_fh3 structure from a nfsfh structure.
55 This allows to use a file onened with nfs_open() together with low-level
56 rpc functions that thake a nfs filehandle
57*/
58struct nfs_fh3 *nfs_get_fh(struct nfsfh *nfsfh);
84004dbf 59
3b943d2f
RS
60/* Control what the next XID value to be used on the context will be.
61 This can be used when multiple contexts are used to the same server
62 to avoid that the two contexts have xid collissions.
63 */
64void rpc_set_next_xid(struct rpc_context *rpc, uint32_t xid);
65
6ec481d3
RS
66/* This function can be used to set the file descriptor used for
67 * the RPC context. It is primarily useful when emulating dup2()
68 * and similar or where you want full control of the filedescriptor numbers
69 * used by the rpc socket.
70 *
71 * ...
72 * oldfd = rpc_get_fd(rpc);
73 * dup2(oldfd, newfd);
74 * rpc_set_fd(rpc, newfd);
75 * close(oldfd);
76 * ...
77 */
78void rpc_set_fd(struct rpc_context *rpc, int fd);
79
84004dbf
RS
80#define RPC_STATUS_SUCCESS 0
81#define RPC_STATUS_ERROR 1
82#define RPC_STATUS_CANCEL 2
83
84004dbf
RS
84/*
85 * Async connection to the tcp port at server:port.
86 * Function returns
87 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
88 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
89 *
90 * When the callback is invoked, status indicates the result:
91 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
92 * data is NULL.
93 * RPC_STATUS_ERROR : The connection failed to establish.
94 * data is the erro string.
95 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
96 * : data is NULL.
97 */
98int rpc_connect_async(struct rpc_context *rpc, const char *server, int port, rpc_cb cb, void *private_data);
8733f38d
RS
99/*
100 * Async function to connect to a specific RPC program/version
101 * Function returns
102 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
103 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
104 *
105 * When the callback is invoked, status indicates the result:
106 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
107 * data is NULL.
108 * RPC_STATUS_ERROR : The connection failed to establish.
109 * data is the erro string.
110 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
111 * : data is NULL.
112 */
113int rpc_connect_program_async(struct rpc_context *rpc, char *server, int program, int version, rpc_cb cb, void *private_data);
84004dbf
RS
114/*
115 * When disconnecting a connection in flight. All commands in flight will be called with the callback
116 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
117 */
118int rpc_disconnect(struct rpc_context *rpc, char *error);
119
84004dbf 120
3751901f 121/*
84004dbf
RS
122 * PORTMAP FUNCTIONS
123 */
124
125/*
126 * Call PORTMAPPER/NULL
127 * Function returns
128 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
129 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
130 *
131 * When the callback is invoked, status indicates the result:
132 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
133 * data is NULL.
134 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
135 * data is the error string.
136 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
137 * data is NULL.
138 */
21668dce 139EXTERN int rpc_pmap_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
140
141
142/*
143 * Call PORTMAPPER/GETPORT.
144 * Function returns
145 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
146 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
147 *
148 * When the callback is invoked, status indicates the result:
149 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
150 * data is a (uint32_t *), containing the port returned.
151 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
152 * data is the error string.
153 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
154 * data is NULL.
155 */
463d59bf 156EXTERN int rpc_pmap_getport_async(struct rpc_context *rpc, int program, int version, int protocol, rpc_cb cb, void *private_data);
84004dbf 157
1fbe4080
RS
158/*
159 * Call PORTMAPPER/SET
160 * Function returns
161 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
162 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
163 *
164 * When the callback is invoked, status indicates the result:
165 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
166 * data is a (uint32_t *), containing status
167 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
168 * data is the error string.
169 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
170 * data is NULL.
171 */
463d59bf 172EXTERN int rpc_pmap_set_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
1fbe4080
RS
173
174/*
175 * Call PORTMAPPER/UNSET
176 * Function returns
177 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
178 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
179 *
180 * When the callback is invoked, status indicates the result:
181 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
182 * data is a (uint32_t *), containing status
183 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
184 * data is the error string.
185 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
186 * data is NULL.
187 */
463d59bf 188EXTERN int rpc_pmap_unset_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
84004dbf 189
8ae943f6
RS
190/*
191 * Call PORTMAPPER/DUMP.
192 * Function returns
193 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
194 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
195 *
196 * When the callback is invoked, status indicates the result:
197 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
198 * data is struct *pmap_mapping_list.
199 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
200 * data is the error string.
201 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
202 * data is NULL.
203 */
204EXTERN int rpc_pmap_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
205
fd59fd0d
RS
206/*
207 * Call PORTMAPPER/CALLIT.
208 * Function returns
209 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
210 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
211 *
212 * When the callback is invoked, status indicates the result:
213 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
214 * data is a 'pmap_call_result' pointer.
215 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
216 * data is the error string.
217 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
218 * data is NULL.
219 */
463d59bf 220EXTERN 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);
84004dbf 221
3751901f 222/*
04e90341 223 * MOUNT v3 FUNCTIONS
84004dbf
RS
224 */
225char *mountstat3_to_str(int stat);
226int mountstat3_to_errno(int error);
227
228/*
04e90341 229 * Call MOUNT3/NULL
84004dbf
RS
230 * Function returns
231 * 0 : The call was initiated. The callback will be invoked when the call completes.
232 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
233 *
234 * When the callback is invoked, status indicates the result:
235 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
236 * data is NULL.
237 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
238 * data is the error string.
239 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
240 * data is NULL.
241 */
04e90341 242EXTERN int rpc_mount3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 243EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
244
245/*
04e90341 246 * Call MOUNT3/MNT
84004dbf
RS
247 * Function returns
248 * 0 : The call was initiated. The callback will be invoked when the call completes.
249 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
250 *
251 * When the callback is invoked, status indicates the result:
252 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
253 * data is union mountres3.
254 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
255 * data is the error string.
256 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
257 * data is NULL.
258 */
e94d5a7d
AR
259EXTERN int rpc_mount3_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
260EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
84004dbf
RS
261
262/*
04e90341 263 * Call MOUNT3/DUMP
84004dbf
RS
264 * Function returns
265 * 0 : The call was initiated. The callback will be invoked when the call completes.
266 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
267 *
268 * When the callback is invoked, status indicates the result:
269 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
270 * data is a mountlist.
271 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
272 * data is the error string.
273 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
274 * data is NULL.
275 */
04e90341 276EXTERN int rpc_mount3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 277EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
278
279/*
04e90341 280 * Call MOUNT3/UMNT
84004dbf
RS
281 * Function returns
282 * 0 : The call was initiated. The callback will be invoked when the call completes.
283 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
284 *
285 * When the callback is invoked, status indicates the result:
286 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
287 * data NULL.
288 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
289 * data is the error string.
290 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
291 * data is NULL.
292 */
e94d5a7d
AR
293EXTERN int rpc_mount3_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
294EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
84004dbf
RS
295
296/*
04e90341 297 * Call MOUNT3/UMNTALL
84004dbf
RS
298 * Function returns
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.
301 *
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 NULL.
305 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
306 * data is the error string.
307 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
308 * data is NULL.
309 */
04e90341 310EXTERN int rpc_mount3_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 311EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
312
313/*
04e90341 314 * Call MOUNT3/EXPORT
7f0242ca
RS
315 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
316 * returned structures.
317 *
84004dbf
RS
318 * Function returns
319 * 0 : The call was initiated. The callback will be invoked when the call completes.
320 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
321 *
322 * When the callback is invoked, status indicates the result:
323 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
7f0242ca
RS
324 * data is a pointer to an exports pointer:
325 * exports export = *(exports *)data;
84004dbf
RS
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.
329 * data is NULL.
330 */
04e90341 331EXTERN int rpc_mount3_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 332EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf 333
3751901f 334/*
04e90341
RS
335 * MOUNT v1 FUNCTIONS (Used with NFSv2)
336 */
337/*
338 * Call MOUNT1/NULL
339 * Function returns
340 * 0 : The call was initiated. The callback will be invoked when the call completes.
341 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
342 *
343 * When the callback is invoked, status indicates the result:
344 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
345 * data is NULL.
346 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
347 * data is the error string.
348 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
349 * data is NULL.
350 */
351EXTERN int rpc_mount1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
352
353/*
354 * Call MOUNT1/MNT
355 * Function returns
356 * 0 : The call was initiated. The callback will be invoked when the call completes.
357 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
358 *
359 * When the callback is invoked, status indicates the result:
360 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
361 * data is union mountres1.
362 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
363 * data is the error string.
364 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
365 * data is NULL.
366 */
e94d5a7d 367EXTERN int rpc_mount1_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
04e90341
RS
368
369/*
370 * Call MOUNT1/DUMP
371 * Function returns
372 * 0 : The call was initiated. The callback will be invoked when the call completes.
373 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
374 *
375 * When the callback is invoked, status indicates the result:
376 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
377 * data is a mountlist.
378 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
379 * data is the error string.
380 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
381 * data is NULL.
382 */
383EXTERN int rpc_mount1_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf 384
04e90341
RS
385/*
386 * Call MOUNT1/UMNT
387 * Function returns
388 * 0 : The call was initiated. The callback will be invoked when the call completes.
389 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
390 *
391 * When the callback is invoked, status indicates the result:
392 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
393 * data NULL.
394 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
395 * data is the error string.
396 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
397 * data is NULL.
398 */
e94d5a7d 399EXTERN int rpc_mount1_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
04e90341
RS
400
401/*
402 * Call MOUNT1/UMNTALL
403 * Function returns
404 * 0 : The call was initiated. The callback will be invoked when the call completes.
405 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
406 *
407 * When the callback is invoked, status indicates the result:
408 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
409 * data NULL.
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.
413 * data is NULL.
414 */
415EXTERN int rpc_mount1_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
416
417/*
418 * Call MOUNT1/EXPORT
419 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
420 * returned structures.
421 *
422 * Function returns
423 * 0 : The call was initiated. The callback will be invoked when the call completes.
424 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
425 *
426 * When the callback is invoked, status indicates the result:
427 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
428 * data is a pointer to an exports pointer:
429 * exports export = *(exports *)data;
430 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
431 * data is the error string.
432 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
433 * data is NULL.
434 */
435EXTERN int rpc_mount1_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
436
437
3751901f 438/*
463d59bf 439 * NFS v3 FUNCTIONS
84004dbf
RS
440 */
441struct nfs_fh3;
442char *nfsstat3_to_str(int error);
443int nfsstat3_to_errno(int error);
444
445/*
463d59bf 446 * Call NFS3/NULL
84004dbf
RS
447 * Function returns
448 * 0 : The call was initiated. The callback will be invoked when the call completes.
449 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
450 *
451 * When the callback is invoked, status indicates the result:
452 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
453 * data is NULL.
454 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
455 * data is the error string.
456 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
457 * data is NULL.
458 */
463d59bf 459EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 460EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
461
462/*
463d59bf 463 * Call NFS3/GETATTR
84004dbf
RS
464 * Function returns
465 * 0 : The call was initiated. The callback will be invoked when the call completes.
466 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
467 *
468 * When the callback is invoked, status indicates the result:
469 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
470 * data is GETATTR3res
471 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
472 * data is the error string.
473 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
474 * data is NULL.
475 */
463d59bf
RS
476struct GETATTR3args;
477EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data);
21668dce 478EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 479
6f914247 480/*
463d59bf 481 * Call NFS3/PATHCONF
6f914247
RS
482 * Function returns
483 * 0 : The call was initiated. The callback will be invoked when the call completes.
484 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
485 *
486 * When the callback is invoked, status indicates the result:
487 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
488 * data is PATHCONF3res
489 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
490 * data is the error string.
491 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
492 * data is NULL.
493 */
463d59bf
RS
494struct PATHCONF3args;
495EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data);
21668dce 496EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
6f914247 497
84004dbf 498/*
463d59bf 499 * Call NFS3/LOOKUP
84004dbf
RS
500 * Function returns
501 * 0 : The call was initiated. The callback will be invoked when the call completes.
502 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
503 *
504 * When the callback is invoked, status indicates the result:
505 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
506 * data is LOOKUP3res
507 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
508 * data is the error string.
509 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
510 * data is NULL.
511 */
463d59bf
RS
512struct LOOKUP3args;
513EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data);
21668dce 514EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf
RS
515
516/*
463d59bf 517 * Call NFS3/ACCESS
84004dbf
RS
518 * Function returns
519 * 0 : The call was initiated. The callback will be invoked when the call completes.
520 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
521 *
522 * When the callback is invoked, status indicates the result:
523 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
524 * data is ACCESS3res
525 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
526 * data is the error string.
527 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
528 * data is NULL.
529 */
463d59bf
RS
530struct ACCESS3args;
531EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data);
21668dce 532EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data);
84004dbf
RS
533
534/*
463d59bf 535 * Call NFS3/READ
84004dbf
RS
536 * Function returns
537 * 0 : The call was initiated. The callback will be invoked when the call completes.
538 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
539 *
540 * When the callback is invoked, status indicates the result:
541 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
b426ef04 542 * data is READ3res
84004dbf
RS
543 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
544 * data is the error string.
545 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
546 * data is NULL.
547 */
463d59bf
RS
548struct READ3args;
549EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data);
21668dce 550EXTERN 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);
84004dbf
RS
551
552/*
463d59bf 553 * Call NFS3/WRITE
84004dbf
RS
554 * Function returns
555 * 0 : The call was initiated. The callback will be invoked when the call completes.
556 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
557 *
558 * When the callback is invoked, status indicates the result:
559 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
560 * data is WRITE3res *
561 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
562 * data is the error string.
563 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
564 * data is NULL.
565 */
463d59bf
RS
566struct WRITE3args;
567EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data);
21668dce 568EXTERN 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);
84004dbf
RS
569
570/*
463d59bf 571 * Call NFS3/COMMIT
84004dbf
RS
572 * Function returns
573 * 0 : The call was initiated. The callback will be invoked when the call completes.
574 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
575 *
576 * When the callback is invoked, status indicates the result:
577 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
578 * data is COMMIT3res *
579 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
580 * data is the error string.
581 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
582 * data is NULL.
583 */
463d59bf
RS
584struct COMMIT3args;
585EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data);
21668dce 586EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 587
84004dbf 588/*
463d59bf 589 * Call NFS3/SETATTR
84004dbf
RS
590 * Function returns
591 * 0 : The call was initiated. The callback will be invoked when the call completes.
592 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
593 *
594 * When the callback is invoked, status indicates the result:
595 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
596 * data is SETATTR3res *
597 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
598 * data is the error string.
599 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
600 * data is NULL.
601 */
602struct SETATTR3args;
463d59bf 603EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
21668dce 604EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
84004dbf 605
84004dbf 606/*
463d59bf 607 * Call NFS3/MKDIR
84004dbf
RS
608 * Function returns
609 * 0 : The call was initiated. The callback will be invoked when the call completes.
610 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
611 *
612 * When the callback is invoked, status indicates the result:
613 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
614 * data is MKDIR3res *
615 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
616 * data is the error string.
617 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
618 * data is NULL.
619 */
7edc9026 620struct MKDIR3args;
463d59bf 621EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
21668dce 622EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
84004dbf 623
84004dbf 624/*
463d59bf 625 * Call NFS3/RMDIR
84004dbf
RS
626 * Function returns
627 * 0 : The call was initiated. The callback will be invoked when the call completes.
628 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
629 *
630 * When the callback is invoked, status indicates the result:
631 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
632 * data is RMDIR3res *
633 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
634 * data is the error string.
635 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
636 * data is NULL.
637 */
463d59bf
RS
638struct RMDIR3args;
639EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data);
21668dce 640EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data);
84004dbf 641
84004dbf 642/*
463d59bf 643 * Call NFS3/CREATE
84004dbf
RS
644 * Function returns
645 * 0 : The call was initiated. The callback will be invoked when the call completes.
646 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
647 *
648 * When the callback is invoked, status indicates the result:
649 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
650 * data is CREATE3res *
651 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
652 * data is the error string.
653 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
654 * data is NULL.
655 */
c985c015 656struct CREATE3args;
463d59bf 657EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
21668dce 658EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
84004dbf 659
1ec6b50a 660/*
463d59bf 661 * Call NFS3/MKNOD
1ec6b50a
RS
662 * Function returns
663 * 0 : The call was initiated. The callback will be invoked when the call completes.
664 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
665 *
666 * When the callback is invoked, status indicates the result:
667 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
668 * data is MKNOD3res *
669 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
670 * data is the error string.
671 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
672 * data is NULL.
673 */
463d59bf
RS
674struct MKNOD3args;
675EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data);
21668dce 676EXTERN 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);
84004dbf 677
84004dbf 678/*
463d59bf 679 * Call NFS3/REMOVE
84004dbf
RS
680 * Function returns
681 * 0 : The call was initiated. The callback will be invoked when the call completes.
682 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
683 *
684 * When the callback is invoked, status indicates the result:
685 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
686 * data is REMOVE3res *
687 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
688 * data is the error string.
689 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
690 * data is NULL.
691 */
463d59bf
RS
692struct REMOVE3args;
693EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data);
21668dce 694EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf 695
84004dbf 696/*
463d59bf 697 * Call NFS3/READDIR
84004dbf
RS
698 * Function returns
699 * 0 : The call was initiated. The callback will be invoked when the call completes.
700 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
701 *
702 * When the callback is invoked, status indicates the result:
703 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
704 * data is READDIR3res *
705 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
706 * data is the error string.
707 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
708 * data is NULL.
709 */
463d59bf
RS
710struct READDIR3args;
711EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data);
21668dce 712EXTERN 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);
84004dbf 713
f390f181 714/*
463d59bf 715 * Call NFS3/READDIRPLUS
f390f181
RS
716 * Function returns
717 * 0 : The call was initiated. The callback will be invoked when the call completes.
718 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
719 *
720 * When the callback is invoked, status indicates the result:
721 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
722 * data is READDIRPLUS3res *
723 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
724 * data is the error string.
725 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
726 * data is NULL.
727 */
463d59bf
RS
728struct READDIRPLUS3args;
729EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data);
21668dce 730EXTERN 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);
f390f181 731
84004dbf 732/*
463d59bf 733 * Call NFS3/FSSTAT
84004dbf
RS
734 * Function returns
735 * 0 : The call was initiated. The callback will be invoked when the call completes.
736 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
737 *
738 * When the callback is invoked, status indicates the result:
739 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
740 * data is FSSTAT3res
741 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
742 * data is the error string.
743 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
744 * data is NULL.
745 */
463d59bf
RS
746struct FSSTAT3args;
747EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data);
21668dce 748EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 749
1058201e 750/*
463d59bf 751 * Call NFS3/FSINFO
1058201e
RS
752 * Function returns
753 * 0 : The call was initiated. The callback will be invoked when the call completes.
754 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
755 *
756 * When the callback is invoked, status indicates the result:
757 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
758 * data is FSINFO3res
759 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
760 * data is the error string.
761 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
762 * data is NULL.
763 */
463d59bf
RS
764struct FSINFO3args;
765EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data);
21668dce 766EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
1058201e 767
84004dbf 768/*
463d59bf 769 * Call NFS3/READLINK
84004dbf
RS
770 * Function returns
771 * 0 : The call was initiated. The callback will be invoked when the call completes.
772 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
773 *
774 * When the callback is invoked, status indicates the result:
775 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
776 * data is READLINK3res *
777 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
778 * data is the error string.
779 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
780 * data is NULL.
781 */
16104b27 782struct READLINK3args;
463d59bf 783EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
21668dce 784EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
84004dbf 785
84004dbf 786/*
463d59bf 787 * Call NFS3/SYMLINK
84004dbf
RS
788 * Function returns
789 * 0 : The call was initiated. The callback will be invoked when the call completes.
790 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
791 *
792 * When the callback is invoked, status indicates the result:
793 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
794 * data is SYMLINK3res *
795 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
796 * data is the error string.
797 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
798 * data is NULL.
799 */
8e255816 800struct SYMLINK3args;
463d59bf 801EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
21668dce 802EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
84004dbf 803
84004dbf 804/*
463d59bf 805 * Call NFS3/RENAME
84004dbf
RS
806 * Function returns
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.
809 *
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 RENAME3res *
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.
816 * data is NULL.
817 */
463d59bf
RS
818struct RENAME3args;
819EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data);
21668dce 820EXTERN 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);
84004dbf 821
84004dbf 822/*
463d59bf 823 * Call NFS3/LINK
84004dbf
RS
824 * Function returns
825 * 0 : The call was initiated. The callback will be invoked when the call completes.
826 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
827 *
828 * When the callback is invoked, status indicates the result:
829 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
830 * data is LINK3res *
831 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
832 * data is the error string.
833 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
834 * data is NULL.
835 */
463d59bf
RS
836struct LINK3args;
837EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data);
21668dce 838EXTERN 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);
84004dbf 839
3751901f 840/*
f38aacf8
RS
841 * NFS v2 FUNCTIONS
842 */
843
844/*
845 * Call NFS2/NULL
846 * Function returns
847 * 0 : The call was initiated. The callback will be invoked when the call completes.
848 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
849 *
850 * When the callback is invoked, status indicates the result:
851 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
852 * data is NULL.
853 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
854 * data is the error string.
855 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
856 * data is NULL.
857 */
858EXTERN int rpc_nfs2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
859
860/*
861 * Call NFS2/GETATTR
862 * Function returns
863 * 0 : The call was initiated. The callback will be invoked when the call completes.
864 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
865 *
866 * When the callback is invoked, status indicates the result:
867 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
868 * data is GETATTR2res
869 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
870 * data is the error string.
871 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
872 * data is NULL.
873 */
874struct GETATTR2args;
875EXTERN int rpc_nfs2_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR2args *args, void *private_data);
876
877/*
878 * Call NFS2/SETATTR
879 * Function returns
880 * 0 : The call was initiated. The callback will be invoked when the call completes.
881 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
882 *
883 * When the callback is invoked, status indicates the result:
884 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
885 * data is SETATTR2res *
886 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
887 * data is the error string.
888 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
889 * data is NULL.
890 */
891struct SETATTR2args;
892EXTERN int rpc_nfs2_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR2args *args, void *private_data);
893
894/*
895 * Call NFS2/LOOKUP
896 * Function returns
897 * 0 : The call was initiated. The callback will be invoked when the call completes.
898 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
899 *
900 * When the callback is invoked, status indicates the result:
901 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
902 * data is LOOKUP2res
903 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
904 * data is the error string.
905 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
906 * data is NULL.
907 */
908struct LOOKUP2args;
909EXTERN int rpc_nfs2_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP2args *args, void *private_data);
910
911/*
912 * Call NFS2/READLINK
913 * Function returns
914 * 0 : The call was initiated. The callback will be invoked when the call completes.
915 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
916 *
917 * When the callback is invoked, status indicates the result:
918 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
919 * data is READLINK2res *
920 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
921 * data is the error string.
922 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
923 * data is NULL.
924 */
925struct READLINK2args;
926EXTERN int rpc_nfs32_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK2args *args, void *private_data);
927
928/*
929 * Call NFS2/READ
930 * Function returns
931 * 0 : The call was initiated. The callback will be invoked when the call completes.
932 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
933 *
934 * When the callback is invoked, status indicates the result:
935 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
936 * data is READ2res
937 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
938 * data is the error string.
939 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
940 * data is NULL.
941 */
942struct READ2args;
943EXTERN int rpc_nfs2_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ2args *args, void *private_data);
944
945/*
946 * Call NFS2/WRITE
947 * Function returns
948 * 0 : The call was initiated. The callback will be invoked when the call completes.
949 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
950 *
951 * When the callback is invoked, status indicates the result:
952 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
953 * data is WRITE2res *
954 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
955 * data is the error string.
956 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
957 * data is NULL.
958 */
959struct WRITE2args;
960EXTERN int rpc_nfs2_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE2args *args, void *private_data);
961
962/*
963 * Call NFS2/CREATE
964 * Function returns
965 * 0 : The call was initiated. The callback will be invoked when the call completes.
966 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
967 *
968 * When the callback is invoked, status indicates the result:
969 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
970 * data is CREATE2res *
971 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
972 * data is the error string.
973 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
974 * data is NULL.
975 */
976struct CREATE2args;
977EXTERN int rpc_nfs2_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE2args *args, void *private_data);
978
979/*
980 * Call NFS2/REMOVE
981 * Function returns
982 * 0 : The call was initiated. The callback will be invoked when the call completes.
983 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
984 *
985 * When the callback is invoked, status indicates the result:
986 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
987 * data is REMOVE2res *
988 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
989 * data is the error string.
990 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
991 * data is NULL.
992 */
993struct REMOVE2args;
994EXTERN int rpc_nfs2_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE2args *args, void *private_data);
995
996/*
997 * Call NFS2/RENAME
998 * Function returns
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.
1001 *
1002 * When the callback is invoked, status indicates the result:
1003 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1004 * data is RENAME2res *
1005 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1006 * data is the error string.
1007 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1008 * data is NULL.
1009 */
1010struct RENAME2args;
1011EXTERN int rpc_nfs2_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME2args *args, void *private_data);
1012
1013/*
1014 * Call NFS2/LINK
1015 * Function returns
1016 * 0 : The call was initiated. The callback will be invoked when the call completes.
1017 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1018 *
1019 * When the callback is invoked, status indicates the result:
1020 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1021 * data is LINK2res *
1022 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1023 * data is the error string.
1024 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1025 * data is NULL.
1026 */
1027struct LINK2args;
1028EXTERN int rpc_nfs2_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK2args *args, void *private_data);
1029
1030/*
1031 * Call NFS2/SYMLINK
1032 * Function returns
1033 * 0 : The call was initiated. The callback will be invoked when the call completes.
1034 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1035 *
1036 * When the callback is invoked, status indicates the result:
1037 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1038 * data is SYMLINK2res *
1039 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1040 * data is the error string.
1041 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1042 * data is NULL.
1043 */
1044struct SYMLINK2args;
1045EXTERN int rpc_nfs2_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK2args *args, void *private_data);
1046
1047/*
1048 * Call NFS2/MKDIR
1049 * Function returns
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.
1052 *
1053 * When the callback is invoked, status indicates the result:
1054 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1055 * data is MKDIR2res *
1056 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1057 * data is the error string.
1058 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1059 * data is NULL.
1060 */
1061struct MKDIR2args;
1062EXTERN int rpc_nfs2_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR2args *args, void *private_data);
1063
1064/*
1065 * Call NFS2/RMDIR
1066 * Function returns
1067 * 0 : The call was initiated. The callback will be invoked when the call completes.
1068 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1069 *
1070 * When the callback is invoked, status indicates the result:
1071 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1072 * data is RMDIR2res *
1073 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1074 * data is the error string.
1075 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1076 * data is NULL.
1077 */
1078struct RMDIR2args;
1079EXTERN int rpc_nfs2_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR2args *args, void *private_data);
1080
1081/*
1082 * Call NFS2/READDIR
1083 * Function returns
1084 * 0 : The call was initiated. The callback will be invoked when the call completes.
1085 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1086 *
1087 * When the callback is invoked, status indicates the result:
1088 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1089 * data is READDIR2res *
1090 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1091 * data is the error string.
1092 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1093 * data is NULL.
1094 */
1095struct READDIR2args;
1096EXTERN int rpc_nfs2_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR2args *args, void *private_data);
1097
1098/*
1099 * Call NFS2/STATFS
1100 * Function returns
1101 * 0 : The call was initiated. The callback will be invoked when the call completes.
1102 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1103 *
1104 * When the callback is invoked, status indicates the result:
1105 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1106 * data is STATFS2res *
1107 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1108 * data is the error string.
1109 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1110 * data is NULL.
1111 */
1112struct STATFS2args;
1113EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data);
84004dbf 1114
3751901f 1115/*
05a777d9
RS
1116 * RQUOTA FUNCTIONS
1117 */
1118char *rquotastat_to_str(int error);
1119int rquotastat_to_errno(int error);
1120
1121/*
1122 * Call RQUOTA1/NULL
1123 * Function returns
1124 * 0 : The call was initiated. The callback will be invoked when the call completes.
1125 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1126 *
1127 * When the callback is invoked, status indicates the result:
1128 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1129 * data is NULL.
1130 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1131 * data is the error string.
1132 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1133 * data is NULL.
1134 */
21668dce 1135EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
05a777d9
RS
1136
1137/*
1138 * Call RQUOTA1/GETQUOTA
1139 * Function returns
1140 * 0 : The call was initiated. The callback will be invoked when the call completes.
1141 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1142 *
1143 * When the callback is invoked, status indicates the result:
1144 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1145 * data is a RQUOTA1res structure.
1146 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1147 * data is the error string.
1148 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1149 * data is NULL.
1150 */
e94d5a7d 1151EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
19e74f5a
RS
1152
1153/*
1154 * Call RQUOTA1/GETACTIVEQUOTA
1155 * Function returns
1156 * 0 : The call was initiated. The callback will be invoked when the call completes.
1157 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1158 *
1159 * When the callback is invoked, status indicates the result:
1160 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1161 * data is a RQUOTA1res structure.
1162 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1163 * data is the error string.
1164 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1165 * data is NULL.
1166 */
e94d5a7d 1167EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
77c23b46
RS
1168
1169
1170
1171
1172/*
1173 * Call RQUOTA2/NULL
1174 * Function returns
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.
1177 *
1178 * When the callback is invoked, status indicates the result:
1179 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1180 * data is NULL.
1181 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1182 * data is the error string.
1183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1184 * data is NULL.
1185 */
1186int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1187
1188/*
1189 * Call RQUOTA2/GETQUOTA
1190 * Function returns
1191 * 0 : The call was initiated. The callback will be invoked when the call completes.
1192 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1193 *
1194 * When the callback is invoked, status indicates the result:
1195 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1196 * data is a RQUOTA1res structure.
1197 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1198 * data is the error string.
1199 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1200 * data is NULL.
1201 */
e94d5a7d 1202int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
77c23b46
RS
1203
1204/*
1205 * Call RQUOTA2/GETACTIVEQUOTA
1206 * Function returns
1207 * 0 : The call was initiated. The callback will be invoked when the call completes.
1208 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1209 *
1210 * When the callback is invoked, status indicates the result:
1211 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1212 * data is a RQUOTA1res structure.
1213 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1214 * data is the error string.
1215 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1216 * data is NULL.
1217 */
e94d5a7d 1218int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
3847f8f6
RS
1219
1220
1221
6916a665
RS
1222
1223
1224
1225/*
3751901f 1226 * NFSACL functions
6916a665
RS
1227 */
1228
3847f8f6
RS
1229/*
1230 * Call NFSACL/NULL
1231 * Call the NULL procedure for the NFSACL
1232 *
1233 * Function returns
1234 * 0 : The call was initiated. The callback will be invoked when the call completes.
1235 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1236 *
1237 * When the callback is invoked, status indicates the result:
1238 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1239 * data is NULL
1240 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1241 * data is the error string.
1242 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1243 * data is NULL.
1244 */
21668dce 1245EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
3847f8f6
RS
1246
1247/*
1248 * Call NFSACL/GETACL
1249 *
1250 * Function returns
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.
1253 *
1254 * When the callback is invoked, status indicates the result:
fa3c25be 1255 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
3847f8f6 1256 * data is a GETACL3res pointer
fa3c25be 1257 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
3847f8f6
RS
1258 * data is the error string.
1259 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1260 * data is NULL.
1261 */
0118a5f0 1262struct GETACL3args;
21668dce 1263EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
3847f8f6 1264
fa3c25be
RS
1265
1266
1267/*
1268 * Call NFSACL/SETACL
1269 *
1270 * Function returns
1271 * 0 : The call was initiated. The callback will be invoked when the call completes.
1272 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1273 *
1274 * When the callback is invoked, status indicates the result:
1275 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1276 * data is a SETACL3res pointer
1277 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1278 * data is the error string.
1279 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1280 * data is NULL.
1281 */
1282struct SETACL3args;
21668dce 1283EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
6916a665
RS
1284
1285
1286
1287
1288/*
1289 * NLM functions
1290 */
1291char *nlmstat4_to_str(int stat);
3751901f 1292
6916a665
RS
1293/*
1294 * Call NLM/NULL
1295 * Call the NULL procedure for the NLM protocol
1296 *
1297 * Function returns
1298 * 0 : The call was initiated. The callback will be invoked when the call completes.
1299 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1300 *
1301 * When the callback is invoked, status indicates the result:
1302 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1303 * data is NULL
1304 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1305 * data is the error string.
1306 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1307 * data is NULL.
1308 */
463d59bf 1309EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
e01ed6a2
RS
1310
1311/*
1312 * Call NLM/TEST
1313 * Call the TEST procedure for the NLM protocol
1314 *
1315 * Function returns
1316 * 0 : The call was initiated. The callback will be invoked when the call completes.
1317 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1318 *
1319 * When the callback is invoked, status indicates the result:
1320 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1321 * data is NLM4_TESTres
1322 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1323 * data is the error string.
1324 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1325 * data is NULL.
1326 */
1327struct NLM4_TESTargs;
463d59bf 1328EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
e01ed6a2 1329
a171d4da
RS
1330/*
1331 * Call NLM/LOCK
1332 * Call the LOCK procedure for the NLM protocol
1333 *
1334 * Function returns
1335 * 0 : The call was initiated. The callback will be invoked when the call completes.
1336 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1337 *
1338 * When the callback is invoked, status indicates the result:
1339 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1340 * data is NLM4_LOCKres
1341 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1342 * data is the error string.
1343 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1344 * data is NULL.
1345 */
1346struct NLM4_LOCKargs;
463d59bf 1347EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
a171d4da
RS
1348
1349/*
1350 * Call NLM/CANCEL
1351 * Call the CANCEL procedure for the NLM protocol
1352 *
1353 * Function returns
1354 * 0 : The call was initiated. The callback will be invoked when the call completes.
1355 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1356 *
1357 * When the callback is invoked, status indicates the result:
1358 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1359 * data is NLM4_CANCres
1360 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1361 * data is the error string.
1362 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1363 * data is NULL.
1364 */
1365struct NLM4_CANCargs;
463d59bf 1366EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
a171d4da
RS
1367
1368/*
1369 * Call NLM/UNLOCK
1370 * Call the UNLOCK procedure for the NLM protocol
1371 *
1372 * Function returns
1373 * 0 : The call was initiated. The callback will be invoked when the call completes.
1374 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1375 *
1376 * When the callback is invoked, status indicates the result:
1377 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1378 * data is NLM4_UNLOCKres
1379 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1380 * data is the error string.
1381 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1382 * data is NULL.
1383 */
1384struct NLM4_UNLOCKargs;
463d59bf 1385EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
f9bb21ad 1386
ed09b567
RS
1387/*
1388 * NSM functions
1389 */
1390char *nsmstat1_to_str(int stat);
3751901f 1391
ed09b567
RS
1392/*
1393 * Call NSM/NULL
1394 * Call the NULL procedure for the NSM protocol
1395 *
1396 * Function returns
1397 * 0 : The call was initiated. The callback will be invoked when the call completes.
1398 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1399 *
1400 * When the callback is invoked, status indicates the result:
1401 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1402 * data is NULL
1403 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1404 * data is the error string.
1405 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1406 * data is NULL.
1407 */
463d59bf 1408EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
ed09b567 1409
1e7a5136
RS
1410/*
1411 * Call NSM/STAT
1412 * Call the STAT procedure for the NSM protocol
1413 *
1414 * Function returns
1415 * 0 : The call was initiated. The callback will be invoked when the call completes.
1416 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1417 *
1418 * When the callback is invoked, status indicates the result:
1419 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1420 * data is NSM1_STATres
1421 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1422 * data is the error string.
1423 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1424 * data is NULL.
1425 */
1426struct NSM1_STATargs;
463d59bf 1427EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
1e7a5136
RS
1428
1429/*
1430 * Call NSM/MON
1431 * Call the MON procedure for the NSM protocol
1432 *
1433 * Function returns
1434 * 0 : The call was initiated. The callback will be invoked when the call completes.
1435 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1436 *
1437 * When the callback is invoked, status indicates the result:
1438 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1439 * data is NSM1_MONres
1440 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1441 * data is the error string.
1442 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1443 * data is NULL.
1444 */
1445struct NSM1_MONargs;
463d59bf 1446EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
1e7a5136
RS
1447
1448/*
1449 * Call NSM/UNMON
1450 * Call the UNMON procedure for the NSM protocol
1451 *
1452 * Function returns
1453 * 0 : The call was initiated. The callback will be invoked when the call completes.
1454 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1455 *
1456 * When the callback is invoked, status indicates the result:
1457 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1458 * data is NSM1_UNMONres
1459 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1460 * data is the error string.
1461 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1462 * data is NULL.
1463 */
1464struct NSM1_UNMONargs;
463d59bf 1465EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
1e7a5136
RS
1466
1467/*
1468 * Call NSM/UNMONALL
1469 * Call the UNMONALL procedure for the NSM protocol
1470 *
1471 * Function returns
1472 * 0 : The call was initiated. The callback will be invoked when the call completes.
1473 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1474 *
1475 * When the callback is invoked, status indicates the result:
1476 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1477 * data is NSM1_UNMONALLres
1478 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1479 * data is the error string.
1480 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1481 * data is NULL.
1482 */
1483struct NSM1_UNMONALLargs;
463d59bf 1484EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
1e7a5136
RS
1485
1486/*
1487 * Call NSM/SIMUCRASH
1488 * Call the SIMUCRASH procedure for the NSM protocol
1489 *
1490 * Function returns
1491 * 0 : The call was initiated. The callback will be invoked when the call completes.
1492 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1493 *
1494 * When the callback is invoked, status indicates the result:
1495 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1496 * data is NULL
1497 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1498 * data is the error string.
1499 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1500 * data is NULL.
1501 */
463d59bf 1502EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1e7a5136
RS
1503
1504/*
1505 * Call NSM/NOTIFY
1506 * Call the NOTIFY procedure for the NSM protocol
1507 *
1508 * Function returns
1509 * 0 : The call was initiated. The callback will be invoked when the call completes.
1510 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1511 *
1512 * When the callback is invoked, status indicates the result:
1513 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1514 * data is NULL
1515 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1516 * data is the error string.
1517 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1518 * data is NULL.
1519 */
1520struct NSM1_NOTIFYargs;
463d59bf 1521EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
ed09b567 1522
4641d36e
AR
1523#ifdef __cplusplus
1524}
1525#endif
1526
f9bb21ad 1527#endif