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