PORTMAP: Add support for PORTMAP v3 CALLIT
[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 */
f694a287 113int rpc_connect_program_async(struct rpc_context *rpc, const 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/*
0f0e352f 122 * PORTMAP v2 FUNCTIONS
84004dbf
RS
123 */
124
125/*
0f0e352f 126 * Call PORTMAPPER2/NULL
84004dbf
RS
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 */
0f0e352f 139EXTERN int rpc_pmap2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
140
141
142/*
0f0e352f 143 * Call PORTMAPPER2/GETPORT.
84004dbf
RS
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 */
0f0e352f 156EXTERN int rpc_pmap2_getport_async(struct rpc_context *rpc, int program, int version, int protocol, rpc_cb cb, void *private_data);
84004dbf 157
1fbe4080 158/*
0f0e352f 159 * Call PORTMAPPER2/SET
1fbe4080
RS
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 */
0f0e352f 172EXTERN int rpc_pmap2_set_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
1fbe4080
RS
173
174/*
0f0e352f 175 * Call PORTMAPPER2/UNSET
1fbe4080
RS
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 */
0f0e352f 188EXTERN int rpc_pmap2_unset_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
84004dbf 189
8ae943f6 190/*
0f0e352f 191 * Call PORTMAPPER2/DUMP.
8ae943f6
RS
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.
4edd7830 198 * data is struct pmap2_dump_result.
8ae943f6
RS
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 */
0f0e352f 204EXTERN int rpc_pmap2_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
8ae943f6 205
fd59fd0d 206/*
0f0e352f 207 * Call PORTMAPPER2/CALLIT.
fd59fd0d
RS
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
b71f7e82 214 * data is a 'pmap2_call_result' pointer.
fd59fd0d
RS
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 */
0f0e352f 220EXTERN int rpc_pmap2_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data);
84004dbf 221
4edd7830
RS
222/*
223 * PORTMAP v3 FUNCTIONS
224 */
225
226/*
227 * Call PORTMAPPER3/NULL
228 * Function returns
229 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
230 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
231 *
232 * When the callback is invoked, status indicates the result:
233 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
234 * data is NULL.
235 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
236 * data is the error string.
237 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
238 * data is NULL.
239 */
240EXTERN int rpc_pmap3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
241
d731e94c
RS
242/*
243 * Call PORTMAPPER3/SET.
244 * Function returns
245 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
246 * <0 : An error occured when trying to set up the connection. 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 portmapper daemon.
250 * data is uint32_t *
251 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
252 * data is the error string.
253 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
254 * data is NULL.
255 */
256struct pmap3_mapping;
257EXTERN int rpc_pmap3_set_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data);
258
259/*
260 * Call PORTMAPPER3/UNSET.
261 * Function returns
262 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
263 * <0 : An error occured when trying to set up the connection. 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 portmapper daemon.
267 * data is uint32_t *
268 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
269 * data is the error string.
270 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
271 * data is NULL.
272 */
273EXTERN int rpc_pmap3_unset_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data);
274
7fbedfde
RS
275/*
276 * Call PORTMAPPER3/GETADDR.
277 * Function returns
278 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
279 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
280 *
281 * When the callback is invoked, status indicates the result:
282 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
283 * data is struct pmap3_getaddr_result.
284 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
285 * data is the error string.
286 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
287 * data is NULL.
288 */
7fbedfde
RS
289EXTERN int rpc_pmap3_getaddr_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data);
290
4edd7830
RS
291/*
292 * Call PORTMAPPER3/DUMP.
293 * Function returns
294 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
295 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
296 *
297 * When the callback is invoked, status indicates the result:
298 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
299 * data is struct pmap3_dump_result.
300 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
301 * data is the error string.
302 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
303 * data is NULL.
304 */
305EXTERN int rpc_pmap3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
306
b71f7e82
RS
307/*
308 * Call PORTMAPPER3/CALLIT.
309 * Function returns
310 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
311 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
312 *
313 * When the callback is invoked, status indicates the result:
314 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
315 * data is a 'pmap3_call_result' pointer.
316 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
317 * data is the error string.
318 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
319 * data is NULL.
320 */
321EXTERN int rpc_pmap3_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data);
322
5245608a
RS
323/*
324 * Call PORTMAPPER3/GETTIME.
325 * Function returns
326 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
327 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
328 *
329 * When the callback is invoked, status indicates the result:
330 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
331 * data is a uint32_t *.
332 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
333 * data is the error string.
334 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
335 * data is NULL.
336 */
337EXTERN int rpc_pmap3_gettime_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
4edd7830 338
3751901f 339/*
04e90341 340 * MOUNT v3 FUNCTIONS
84004dbf
RS
341 */
342char *mountstat3_to_str(int stat);
343int mountstat3_to_errno(int error);
344
345/*
04e90341 346 * Call MOUNT3/NULL
84004dbf
RS
347 * Function returns
348 * 0 : The call was initiated. The callback will be invoked when the call completes.
349 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
350 *
351 * When the callback is invoked, status indicates the result:
352 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
353 * data is NULL.
354 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
355 * data is the error string.
356 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
357 * data is NULL.
358 */
04e90341 359EXTERN int rpc_mount3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 360EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
361
362/*
04e90341 363 * Call MOUNT3/MNT
84004dbf
RS
364 * Function returns
365 * 0 : The call was initiated. The callback will be invoked when the call completes.
366 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
367 *
368 * When the callback is invoked, status indicates the result:
369 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
370 * data is union mountres3.
371 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
372 * data is the error string.
373 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
374 * data is NULL.
375 */
e94d5a7d
AR
376EXTERN int rpc_mount3_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
377EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
84004dbf
RS
378
379/*
04e90341 380 * Call MOUNT3/DUMP
84004dbf
RS
381 * Function returns
382 * 0 : The call was initiated. The callback will be invoked when the call completes.
383 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
384 *
385 * When the callback is invoked, status indicates the result:
386 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
387 * data is a mountlist.
388 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
389 * data is the error string.
390 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
391 * data is NULL.
392 */
04e90341 393EXTERN int rpc_mount3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 394EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
395
396/*
04e90341 397 * Call MOUNT3/UMNT
84004dbf
RS
398 * Function returns
399 * 0 : The call was initiated. The callback will be invoked when the call completes.
400 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
401 *
402 * When the callback is invoked, status indicates the result:
403 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
404 * data NULL.
405 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
406 * data is the error string.
407 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
408 * data is NULL.
409 */
e94d5a7d
AR
410EXTERN int rpc_mount3_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
411EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
84004dbf
RS
412
413/*
04e90341 414 * Call MOUNT3/UMNTALL
84004dbf
RS
415 * Function returns
416 * 0 : The call was initiated. The callback will be invoked when the call completes.
417 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
418 *
419 * When the callback is invoked, status indicates the result:
420 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
421 * data NULL.
422 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
423 * data is the error string.
424 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
425 * data is NULL.
426 */
04e90341 427EXTERN int rpc_mount3_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 428EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
429
430/*
04e90341 431 * Call MOUNT3/EXPORT
7f0242ca
RS
432 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
433 * returned structures.
434 *
84004dbf
RS
435 * Function returns
436 * 0 : The call was initiated. The callback will be invoked when the call completes.
437 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
438 *
439 * When the callback is invoked, status indicates the result:
440 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
7f0242ca
RS
441 * data is a pointer to an exports pointer:
442 * exports export = *(exports *)data;
84004dbf
RS
443 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
444 * data is the error string.
445 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
446 * data is NULL.
447 */
04e90341 448EXTERN int rpc_mount3_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 449EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf 450
3751901f 451/*
04e90341
RS
452 * MOUNT v1 FUNCTIONS (Used with NFSv2)
453 */
454/*
455 * Call MOUNT1/NULL
456 * Function returns
457 * 0 : The call was initiated. The callback will be invoked when the call completes.
458 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
459 *
460 * When the callback is invoked, status indicates the result:
461 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
462 * data is NULL.
463 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
464 * data is the error string.
465 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
466 * data is NULL.
467 */
468EXTERN int rpc_mount1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
469
470/*
471 * Call MOUNT1/MNT
472 * Function returns
473 * 0 : The call was initiated. The callback will be invoked when the call completes.
474 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
475 *
476 * When the callback is invoked, status indicates the result:
477 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
478 * data is union mountres1.
479 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
480 * data is the error string.
481 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
482 * data is NULL.
483 */
e94d5a7d 484EXTERN int rpc_mount1_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
04e90341
RS
485
486/*
487 * Call MOUNT1/DUMP
488 * Function returns
489 * 0 : The call was initiated. The callback will be invoked when the call completes.
490 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
491 *
492 * When the callback is invoked, status indicates the result:
493 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
494 * data is a mountlist.
495 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
496 * data is the error string.
497 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
498 * data is NULL.
499 */
500EXTERN int rpc_mount1_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf 501
04e90341
RS
502/*
503 * Call MOUNT1/UMNT
504 * Function returns
505 * 0 : The call was initiated. The callback will be invoked when the call completes.
506 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
507 *
508 * When the callback is invoked, status indicates the result:
509 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
510 * data NULL.
511 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
512 * data is the error string.
513 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
514 * data is NULL.
515 */
e94d5a7d 516EXTERN int rpc_mount1_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
04e90341
RS
517
518/*
519 * Call MOUNT1/UMNTALL
520 * Function returns
521 * 0 : The call was initiated. The callback will be invoked when the call completes.
522 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
523 *
524 * When the callback is invoked, status indicates the result:
525 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
526 * data NULL.
527 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
528 * data is the error string.
529 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
530 * data is NULL.
531 */
532EXTERN int rpc_mount1_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
533
534/*
535 * Call MOUNT1/EXPORT
536 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
537 * returned structures.
538 *
539 * Function returns
540 * 0 : The call was initiated. The callback will be invoked when the call completes.
541 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
542 *
543 * When the callback is invoked, status indicates the result:
544 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
545 * data is a pointer to an exports pointer:
546 * exports export = *(exports *)data;
547 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
548 * data is the error string.
549 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
550 * data is NULL.
551 */
552EXTERN int rpc_mount1_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
553
554
3751901f 555/*
463d59bf 556 * NFS v3 FUNCTIONS
84004dbf
RS
557 */
558struct nfs_fh3;
559char *nfsstat3_to_str(int error);
560int nfsstat3_to_errno(int error);
561
562/*
463d59bf 563 * Call NFS3/NULL
84004dbf
RS
564 * Function returns
565 * 0 : The call was initiated. The callback will be invoked when the call completes.
566 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
567 *
568 * When the callback is invoked, status indicates the result:
569 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
570 * data is NULL.
571 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
572 * data is the error string.
573 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
574 * data is NULL.
575 */
463d59bf 576EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 577EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
578
579/*
463d59bf 580 * Call NFS3/GETATTR
84004dbf
RS
581 * Function returns
582 * 0 : The call was initiated. The callback will be invoked when the call completes.
583 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
584 *
585 * When the callback is invoked, status indicates the result:
586 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
587 * data is GETATTR3res
588 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
589 * data is the error string.
590 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
591 * data is NULL.
592 */
463d59bf
RS
593struct GETATTR3args;
594EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data);
21668dce 595EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 596
6f914247 597/*
463d59bf 598 * Call NFS3/PATHCONF
6f914247
RS
599 * Function returns
600 * 0 : The call was initiated. The callback will be invoked when the call completes.
601 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
602 *
603 * When the callback is invoked, status indicates the result:
604 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
605 * data is PATHCONF3res
606 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
607 * data is the error string.
608 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
609 * data is NULL.
610 */
463d59bf
RS
611struct PATHCONF3args;
612EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data);
21668dce 613EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
6f914247 614
84004dbf 615/*
463d59bf 616 * Call NFS3/LOOKUP
84004dbf
RS
617 * Function returns
618 * 0 : The call was initiated. The callback will be invoked when the call completes.
619 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
620 *
621 * When the callback is invoked, status indicates the result:
622 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
623 * data is LOOKUP3res
624 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
625 * data is the error string.
626 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
627 * data is NULL.
628 */
463d59bf
RS
629struct LOOKUP3args;
630EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data);
21668dce 631EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf
RS
632
633/*
463d59bf 634 * Call NFS3/ACCESS
84004dbf
RS
635 * Function returns
636 * 0 : The call was initiated. The callback will be invoked when the call completes.
637 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
638 *
639 * When the callback is invoked, status indicates the result:
640 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
641 * data is ACCESS3res
642 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
643 * data is the error string.
644 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
645 * data is NULL.
646 */
463d59bf
RS
647struct ACCESS3args;
648EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data);
21668dce 649EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data);
84004dbf
RS
650
651/*
463d59bf 652 * Call NFS3/READ
84004dbf
RS
653 * Function returns
654 * 0 : The call was initiated. The callback will be invoked when the call completes.
655 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
656 *
657 * When the callback is invoked, status indicates the result:
658 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
b426ef04 659 * data is READ3res
84004dbf
RS
660 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
661 * data is the error string.
662 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
663 * data is NULL.
664 */
463d59bf
RS
665struct READ3args;
666EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data);
21668dce 667EXTERN 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
668
669/*
463d59bf 670 * Call NFS3/WRITE
84004dbf
RS
671 * Function returns
672 * 0 : The call was initiated. The callback will be invoked when the call completes.
673 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
674 *
675 * When the callback is invoked, status indicates the result:
676 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
677 * data is WRITE3res *
678 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
679 * data is the error string.
680 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
681 * data is NULL.
682 */
463d59bf
RS
683struct WRITE3args;
684EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data);
21668dce 685EXTERN 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
686
687/*
463d59bf 688 * Call NFS3/COMMIT
84004dbf
RS
689 * Function returns
690 * 0 : The call was initiated. The callback will be invoked when the call completes.
691 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
692 *
693 * When the callback is invoked, status indicates the result:
694 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
695 * data is COMMIT3res *
696 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
697 * data is the error string.
698 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
699 * data is NULL.
700 */
463d59bf
RS
701struct COMMIT3args;
702EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data);
21668dce 703EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 704
84004dbf 705/*
463d59bf 706 * Call NFS3/SETATTR
84004dbf
RS
707 * Function returns
708 * 0 : The call was initiated. The callback will be invoked when the call completes.
709 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
710 *
711 * When the callback is invoked, status indicates the result:
712 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
713 * data is SETATTR3res *
714 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
715 * data is the error string.
716 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
717 * data is NULL.
718 */
719struct SETATTR3args;
463d59bf 720EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
21668dce 721EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
84004dbf 722
84004dbf 723/*
463d59bf 724 * Call NFS3/MKDIR
84004dbf
RS
725 * Function returns
726 * 0 : The call was initiated. The callback will be invoked when the call completes.
727 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
728 *
729 * When the callback is invoked, status indicates the result:
730 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
731 * data is MKDIR3res *
732 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
733 * data is the error string.
734 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
735 * data is NULL.
736 */
7edc9026 737struct MKDIR3args;
463d59bf 738EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
21668dce 739EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
84004dbf 740
84004dbf 741/*
463d59bf 742 * Call NFS3/RMDIR
84004dbf
RS
743 * Function returns
744 * 0 : The call was initiated. The callback will be invoked when the call completes.
745 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
746 *
747 * When the callback is invoked, status indicates the result:
748 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
749 * data is RMDIR3res *
750 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
751 * data is the error string.
752 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
753 * data is NULL.
754 */
463d59bf
RS
755struct RMDIR3args;
756EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data);
21668dce 757EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data);
84004dbf 758
84004dbf 759/*
463d59bf 760 * Call NFS3/CREATE
84004dbf
RS
761 * Function returns
762 * 0 : The call was initiated. The callback will be invoked when the call completes.
763 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
764 *
765 * When the callback is invoked, status indicates the result:
766 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
767 * data is CREATE3res *
768 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
769 * data is the error string.
770 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
771 * data is NULL.
772 */
c985c015 773struct CREATE3args;
463d59bf 774EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
21668dce 775EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
84004dbf 776
1ec6b50a 777/*
463d59bf 778 * Call NFS3/MKNOD
1ec6b50a
RS
779 * Function returns
780 * 0 : The call was initiated. The callback will be invoked when the call completes.
781 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
782 *
783 * When the callback is invoked, status indicates the result:
784 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
785 * data is MKNOD3res *
786 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
787 * data is the error string.
788 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
789 * data is NULL.
790 */
463d59bf
RS
791struct MKNOD3args;
792EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data);
21668dce 793EXTERN 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 794
84004dbf 795/*
463d59bf 796 * Call NFS3/REMOVE
84004dbf
RS
797 * Function returns
798 * 0 : The call was initiated. The callback will be invoked when the call completes.
799 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
800 *
801 * When the callback is invoked, status indicates the result:
802 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
803 * data is REMOVE3res *
804 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
805 * data is the error string.
806 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
807 * data is NULL.
808 */
463d59bf
RS
809struct REMOVE3args;
810EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data);
21668dce 811EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf 812
84004dbf 813/*
463d59bf 814 * Call NFS3/READDIR
84004dbf
RS
815 * Function returns
816 * 0 : The call was initiated. The callback will be invoked when the call completes.
817 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
818 *
819 * When the callback is invoked, status indicates the result:
820 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
821 * data is READDIR3res *
822 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
823 * data is the error string.
824 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
825 * data is NULL.
826 */
463d59bf
RS
827struct READDIR3args;
828EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data);
21668dce 829EXTERN 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 830
f390f181 831/*
463d59bf 832 * Call NFS3/READDIRPLUS
f390f181
RS
833 * Function returns
834 * 0 : The call was initiated. The callback will be invoked when the call completes.
835 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
836 *
837 * When the callback is invoked, status indicates the result:
838 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
839 * data is READDIRPLUS3res *
840 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
841 * data is the error string.
842 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
843 * data is NULL.
844 */
463d59bf
RS
845struct READDIRPLUS3args;
846EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data);
21668dce 847EXTERN 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 848
84004dbf 849/*
463d59bf 850 * Call NFS3/FSSTAT
84004dbf
RS
851 * Function returns
852 * 0 : The call was initiated. The callback will be invoked when the call completes.
853 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
854 *
855 * When the callback is invoked, status indicates the result:
856 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
857 * data is FSSTAT3res
858 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
859 * data is the error string.
860 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
861 * data is NULL.
862 */
463d59bf
RS
863struct FSSTAT3args;
864EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data);
21668dce 865EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 866
1058201e 867/*
463d59bf 868 * Call NFS3/FSINFO
1058201e
RS
869 * Function returns
870 * 0 : The call was initiated. The callback will be invoked when the call completes.
871 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
872 *
873 * When the callback is invoked, status indicates the result:
874 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
875 * data is FSINFO3res
876 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
877 * data is the error string.
878 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
879 * data is NULL.
880 */
463d59bf
RS
881struct FSINFO3args;
882EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data);
21668dce 883EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
1058201e 884
84004dbf 885/*
463d59bf 886 * Call NFS3/READLINK
84004dbf
RS
887 * Function returns
888 * 0 : The call was initiated. The callback will be invoked when the call completes.
889 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
890 *
891 * When the callback is invoked, status indicates the result:
892 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
893 * data is READLINK3res *
894 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
895 * data is the error string.
896 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
897 * data is NULL.
898 */
16104b27 899struct READLINK3args;
463d59bf 900EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
21668dce 901EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
84004dbf 902
84004dbf 903/*
463d59bf 904 * Call NFS3/SYMLINK
84004dbf
RS
905 * Function returns
906 * 0 : The call was initiated. The callback will be invoked when the call completes.
907 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
908 *
909 * When the callback is invoked, status indicates the result:
910 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
911 * data is SYMLINK3res *
912 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
913 * data is the error string.
914 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
915 * data is NULL.
916 */
8e255816 917struct SYMLINK3args;
463d59bf 918EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
21668dce 919EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
84004dbf 920
84004dbf 921/*
463d59bf 922 * Call NFS3/RENAME
84004dbf
RS
923 * Function returns
924 * 0 : The call was initiated. The callback will be invoked when the call completes.
925 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
926 *
927 * When the callback is invoked, status indicates the result:
928 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
929 * data is RENAME3res *
930 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
931 * data is the error string.
932 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
933 * data is NULL.
934 */
463d59bf
RS
935struct RENAME3args;
936EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data);
21668dce 937EXTERN 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 938
84004dbf 939/*
463d59bf 940 * Call NFS3/LINK
84004dbf
RS
941 * Function returns
942 * 0 : The call was initiated. The callback will be invoked when the call completes.
943 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
944 *
945 * When the callback is invoked, status indicates the result:
946 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
947 * data is LINK3res *
948 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
949 * data is the error string.
950 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
951 * data is NULL.
952 */
463d59bf
RS
953struct LINK3args;
954EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data);
21668dce 955EXTERN 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 956
3751901f 957/*
f38aacf8
RS
958 * NFS v2 FUNCTIONS
959 */
960
961/*
962 * Call NFS2/NULL
963 * Function returns
964 * 0 : The call was initiated. The callback will be invoked when the call completes.
965 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
966 *
967 * When the callback is invoked, status indicates the result:
968 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
969 * data is NULL.
970 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
971 * data is the error string.
972 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
973 * data is NULL.
974 */
975EXTERN int rpc_nfs2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
976
977/*
978 * Call NFS2/GETATTR
979 * Function returns
980 * 0 : The call was initiated. The callback will be invoked when the call completes.
981 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
982 *
983 * When the callback is invoked, status indicates the result:
984 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
985 * data is GETATTR2res
986 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
987 * data is the error string.
988 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
989 * data is NULL.
990 */
991struct GETATTR2args;
992EXTERN int rpc_nfs2_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR2args *args, void *private_data);
993
994/*
995 * Call NFS2/SETATTR
996 * Function returns
997 * 0 : The call was initiated. The callback will be invoked when the call completes.
998 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
999 *
1000 * When the callback is invoked, status indicates the result:
1001 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1002 * data is SETATTR2res *
1003 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1004 * data is the error string.
1005 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1006 * data is NULL.
1007 */
1008struct SETATTR2args;
1009EXTERN int rpc_nfs2_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR2args *args, void *private_data);
1010
1011/*
1012 * Call NFS2/LOOKUP
1013 * Function returns
1014 * 0 : The call was initiated. The callback will be invoked when the call completes.
1015 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1016 *
1017 * When the callback is invoked, status indicates the result:
1018 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1019 * data is LOOKUP2res
1020 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1021 * data is the error string.
1022 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1023 * data is NULL.
1024 */
1025struct LOOKUP2args;
1026EXTERN int rpc_nfs2_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP2args *args, void *private_data);
1027
1028/*
1029 * Call NFS2/READLINK
1030 * Function returns
1031 * 0 : The call was initiated. The callback will be invoked when the call completes.
1032 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1033 *
1034 * When the callback is invoked, status indicates the result:
1035 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1036 * data is READLINK2res *
1037 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1038 * data is the error string.
1039 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1040 * data is NULL.
1041 */
1042struct READLINK2args;
1043EXTERN int rpc_nfs32_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK2args *args, void *private_data);
1044
1045/*
1046 * Call NFS2/READ
1047 * Function returns
1048 * 0 : The call was initiated. The callback will be invoked when the call completes.
1049 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1050 *
1051 * When the callback is invoked, status indicates the result:
1052 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1053 * data is READ2res
1054 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1055 * data is the error string.
1056 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1057 * data is NULL.
1058 */
1059struct READ2args;
1060EXTERN int rpc_nfs2_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ2args *args, void *private_data);
1061
1062/*
1063 * Call NFS2/WRITE
1064 * Function returns
1065 * 0 : The call was initiated. The callback will be invoked when the call completes.
1066 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1067 *
1068 * When the callback is invoked, status indicates the result:
1069 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1070 * data is WRITE2res *
1071 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1072 * data is the error string.
1073 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1074 * data is NULL.
1075 */
1076struct WRITE2args;
1077EXTERN int rpc_nfs2_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE2args *args, void *private_data);
1078
1079/*
1080 * Call NFS2/CREATE
1081 * Function returns
1082 * 0 : The call was initiated. The callback will be invoked when the call completes.
1083 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1084 *
1085 * When the callback is invoked, status indicates the result:
1086 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1087 * data is CREATE2res *
1088 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1089 * data is the error string.
1090 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1091 * data is NULL.
1092 */
1093struct CREATE2args;
1094EXTERN int rpc_nfs2_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE2args *args, void *private_data);
1095
1096/*
1097 * Call NFS2/REMOVE
1098 * Function returns
1099 * 0 : The call was initiated. The callback will be invoked when the call completes.
1100 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1101 *
1102 * When the callback is invoked, status indicates the result:
1103 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1104 * data is REMOVE2res *
1105 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1106 * data is the error string.
1107 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1108 * data is NULL.
1109 */
1110struct REMOVE2args;
1111EXTERN int rpc_nfs2_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE2args *args, void *private_data);
1112
1113/*
1114 * Call NFS2/RENAME
1115 * Function returns
1116 * 0 : The call was initiated. The callback will be invoked when the call completes.
1117 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1118 *
1119 * When the callback is invoked, status indicates the result:
1120 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1121 * data is RENAME2res *
1122 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1123 * data is the error string.
1124 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1125 * data is NULL.
1126 */
1127struct RENAME2args;
1128EXTERN int rpc_nfs2_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME2args *args, void *private_data);
1129
1130/*
1131 * Call NFS2/LINK
1132 * Function returns
1133 * 0 : The call was initiated. The callback will be invoked when the call completes.
1134 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1135 *
1136 * When the callback is invoked, status indicates the result:
1137 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1138 * data is LINK2res *
1139 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1140 * data is the error string.
1141 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1142 * data is NULL.
1143 */
1144struct LINK2args;
1145EXTERN int rpc_nfs2_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK2args *args, void *private_data);
1146
1147/*
1148 * Call NFS2/SYMLINK
1149 * Function returns
1150 * 0 : The call was initiated. The callback will be invoked when the call completes.
1151 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1152 *
1153 * When the callback is invoked, status indicates the result:
1154 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1155 * data is SYMLINK2res *
1156 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1157 * data is the error string.
1158 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1159 * data is NULL.
1160 */
1161struct SYMLINK2args;
1162EXTERN int rpc_nfs2_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK2args *args, void *private_data);
1163
1164/*
1165 * Call NFS2/MKDIR
1166 * Function returns
1167 * 0 : The call was initiated. The callback will be invoked when the call completes.
1168 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1169 *
1170 * When the callback is invoked, status indicates the result:
1171 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1172 * data is MKDIR2res *
1173 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1174 * data is the error string.
1175 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1176 * data is NULL.
1177 */
1178struct MKDIR2args;
1179EXTERN int rpc_nfs2_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR2args *args, void *private_data);
1180
1181/*
1182 * Call NFS2/RMDIR
1183 * Function returns
1184 * 0 : The call was initiated. The callback will be invoked when the call completes.
1185 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1186 *
1187 * When the callback is invoked, status indicates the result:
1188 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1189 * data is RMDIR2res *
1190 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1191 * data is the error string.
1192 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1193 * data is NULL.
1194 */
1195struct RMDIR2args;
1196EXTERN int rpc_nfs2_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR2args *args, void *private_data);
1197
1198/*
1199 * Call NFS2/READDIR
1200 * Function returns
1201 * 0 : The call was initiated. The callback will be invoked when the call completes.
1202 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1203 *
1204 * When the callback is invoked, status indicates the result:
1205 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1206 * data is READDIR2res *
1207 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1208 * data is the error string.
1209 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1210 * data is NULL.
1211 */
1212struct READDIR2args;
1213EXTERN int rpc_nfs2_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR2args *args, void *private_data);
1214
1215/*
1216 * Call NFS2/STATFS
1217 * Function returns
1218 * 0 : The call was initiated. The callback will be invoked when the call completes.
1219 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1220 *
1221 * When the callback is invoked, status indicates the result:
1222 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1223 * data is STATFS2res *
1224 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1225 * data is the error string.
1226 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1227 * data is NULL.
1228 */
1229struct STATFS2args;
1230EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data);
84004dbf 1231
3751901f 1232/*
05a777d9
RS
1233 * RQUOTA FUNCTIONS
1234 */
1235char *rquotastat_to_str(int error);
1236int rquotastat_to_errno(int error);
1237
1238/*
1239 * Call RQUOTA1/NULL
1240 * Function returns
1241 * 0 : The call was initiated. The callback will be invoked when the call completes.
1242 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1243 *
1244 * When the callback is invoked, status indicates the result:
1245 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1246 * data is NULL.
1247 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1248 * data is the error string.
1249 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1250 * data is NULL.
1251 */
21668dce 1252EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
05a777d9
RS
1253
1254/*
1255 * Call RQUOTA1/GETQUOTA
1256 * Function returns
1257 * 0 : The call was initiated. The callback will be invoked when the call completes.
1258 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1259 *
1260 * When the callback is invoked, status indicates the result:
1261 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1262 * data is a RQUOTA1res structure.
1263 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1264 * data is the error string.
1265 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1266 * data is NULL.
1267 */
e94d5a7d 1268EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
19e74f5a
RS
1269
1270/*
1271 * Call RQUOTA1/GETACTIVEQUOTA
1272 * Function returns
1273 * 0 : The call was initiated. The callback will be invoked when the call completes.
1274 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1275 *
1276 * When the callback is invoked, status indicates the result:
1277 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1278 * data is a RQUOTA1res structure.
1279 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1280 * data is the error string.
1281 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1282 * data is NULL.
1283 */
e94d5a7d 1284EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
77c23b46
RS
1285
1286
1287
1288
1289/*
1290 * Call RQUOTA2/NULL
1291 * Function returns
1292 * 0 : The call was initiated. The callback will be invoked when the call completes.
1293 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1294 *
1295 * When the callback is invoked, status indicates the result:
1296 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1297 * data is NULL.
1298 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1299 * data is the error string.
1300 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1301 * data is NULL.
1302 */
1303int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1304
1305/*
1306 * Call RQUOTA2/GETQUOTA
1307 * Function returns
1308 * 0 : The call was initiated. The callback will be invoked when the call completes.
1309 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1310 *
1311 * When the callback is invoked, status indicates the result:
1312 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1313 * data is a RQUOTA1res structure.
1314 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1315 * data is the error string.
1316 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1317 * data is NULL.
1318 */
e94d5a7d 1319int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
77c23b46
RS
1320
1321/*
1322 * Call RQUOTA2/GETACTIVEQUOTA
1323 * Function returns
1324 * 0 : The call was initiated. The callback will be invoked when the call completes.
1325 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1326 *
1327 * When the callback is invoked, status indicates the result:
1328 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1329 * data is a RQUOTA1res structure.
1330 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1331 * data is the error string.
1332 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1333 * data is NULL.
1334 */
e94d5a7d 1335int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
3847f8f6
RS
1336
1337
1338
6916a665
RS
1339
1340
1341
1342/*
3751901f 1343 * NFSACL functions
6916a665
RS
1344 */
1345
3847f8f6
RS
1346/*
1347 * Call NFSACL/NULL
1348 * Call the NULL procedure for the NFSACL
1349 *
1350 * Function returns
1351 * 0 : The call was initiated. The callback will be invoked when the call completes.
1352 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1353 *
1354 * When the callback is invoked, status indicates the result:
1355 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1356 * data is NULL
1357 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1358 * data is the error string.
1359 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1360 * data is NULL.
1361 */
21668dce 1362EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
3847f8f6
RS
1363
1364/*
1365 * Call NFSACL/GETACL
1366 *
1367 * Function returns
1368 * 0 : The call was initiated. The callback will be invoked when the call completes.
1369 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1370 *
1371 * When the callback is invoked, status indicates the result:
fa3c25be 1372 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
3847f8f6 1373 * data is a GETACL3res pointer
fa3c25be 1374 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
3847f8f6
RS
1375 * data is the error string.
1376 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1377 * data is NULL.
1378 */
0118a5f0 1379struct GETACL3args;
21668dce 1380EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
3847f8f6 1381
fa3c25be
RS
1382
1383
1384/*
1385 * Call NFSACL/SETACL
1386 *
1387 * Function returns
1388 * 0 : The call was initiated. The callback will be invoked when the call completes.
1389 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1390 *
1391 * When the callback is invoked, status indicates the result:
1392 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1393 * data is a SETACL3res pointer
1394 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1395 * data is the error string.
1396 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1397 * data is NULL.
1398 */
1399struct SETACL3args;
21668dce 1400EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
6916a665
RS
1401
1402
1403
1404
1405/*
1406 * NLM functions
1407 */
1408char *nlmstat4_to_str(int stat);
3751901f 1409
6916a665
RS
1410/*
1411 * Call NLM/NULL
1412 * Call the NULL procedure for the NLM 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 nlm daemon.
1420 * data is NULL
1421 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm 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 */
463d59bf 1426EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
e01ed6a2
RS
1427
1428/*
1429 * Call NLM/TEST
1430 * Call the TEST procedure for the NLM 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 nlm daemon.
1438 * data is NLM4_TESTres
1439 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm 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 NLM4_TESTargs;
463d59bf 1445EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
e01ed6a2 1446
a171d4da
RS
1447/*
1448 * Call NLM/LOCK
1449 * Call the LOCK procedure for the NLM 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 nlm daemon.
1457 * data is NLM4_LOCKres
1458 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm 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 NLM4_LOCKargs;
463d59bf 1464EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
a171d4da
RS
1465
1466/*
1467 * Call NLM/CANCEL
1468 * Call the CANCEL procedure for the NLM 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 nlm daemon.
1476 * data is NLM4_CANCres
1477 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm 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 */
1482struct NLM4_CANCargs;
463d59bf 1483EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
a171d4da
RS
1484
1485/*
1486 * Call NLM/UNLOCK
1487 * Call the UNLOCK procedure for the NLM protocol
1488 *
1489 * Function returns
1490 * 0 : The call was initiated. The callback will be invoked when the call completes.
1491 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1492 *
1493 * When the callback is invoked, status indicates the result:
1494 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1495 * data is NLM4_UNLOCKres
1496 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1497 * data is the error string.
1498 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1499 * data is NULL.
1500 */
1501struct NLM4_UNLOCKargs;
463d59bf 1502EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
f9bb21ad 1503
ed09b567
RS
1504/*
1505 * NSM functions
1506 */
1507char *nsmstat1_to_str(int stat);
3751901f 1508
ed09b567
RS
1509/*
1510 * Call NSM/NULL
1511 * Call the NULL procedure for the NSM protocol
1512 *
1513 * Function returns
1514 * 0 : The call was initiated. The callback will be invoked when the call completes.
1515 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1516 *
1517 * When the callback is invoked, status indicates the result:
1518 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1519 * data is NULL
1520 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1521 * data is the error string.
1522 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1523 * data is NULL.
1524 */
463d59bf 1525EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
ed09b567 1526
1e7a5136
RS
1527/*
1528 * Call NSM/STAT
1529 * Call the STAT procedure for the NSM protocol
1530 *
1531 * Function returns
1532 * 0 : The call was initiated. The callback will be invoked when the call completes.
1533 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1534 *
1535 * When the callback is invoked, status indicates the result:
1536 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1537 * data is NSM1_STATres
1538 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1539 * data is the error string.
1540 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1541 * data is NULL.
1542 */
1543struct NSM1_STATargs;
463d59bf 1544EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
1e7a5136
RS
1545
1546/*
1547 * Call NSM/MON
1548 * Call the MON procedure for the NSM protocol
1549 *
1550 * Function returns
1551 * 0 : The call was initiated. The callback will be invoked when the call completes.
1552 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1553 *
1554 * When the callback is invoked, status indicates the result:
1555 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1556 * data is NSM1_MONres
1557 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1558 * data is the error string.
1559 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1560 * data is NULL.
1561 */
1562struct NSM1_MONargs;
463d59bf 1563EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
1e7a5136
RS
1564
1565/*
1566 * Call NSM/UNMON
1567 * Call the UNMON procedure for the NSM protocol
1568 *
1569 * Function returns
1570 * 0 : The call was initiated. The callback will be invoked when the call completes.
1571 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1572 *
1573 * When the callback is invoked, status indicates the result:
1574 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1575 * data is NSM1_UNMONres
1576 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1577 * data is the error string.
1578 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1579 * data is NULL.
1580 */
1581struct NSM1_UNMONargs;
463d59bf 1582EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
1e7a5136
RS
1583
1584/*
1585 * Call NSM/UNMONALL
1586 * Call the UNMONALL procedure for the NSM protocol
1587 *
1588 * Function returns
1589 * 0 : The call was initiated. The callback will be invoked when the call completes.
1590 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1591 *
1592 * When the callback is invoked, status indicates the result:
1593 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1594 * data is NSM1_UNMONALLres
1595 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1596 * data is the error string.
1597 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1598 * data is NULL.
1599 */
1600struct NSM1_UNMONALLargs;
463d59bf 1601EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
1e7a5136
RS
1602
1603/*
1604 * Call NSM/SIMUCRASH
1605 * Call the SIMUCRASH procedure for the NSM protocol
1606 *
1607 * Function returns
1608 * 0 : The call was initiated. The callback will be invoked when the call completes.
1609 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1610 *
1611 * When the callback is invoked, status indicates the result:
1612 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1613 * data is NULL
1614 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1615 * data is the error string.
1616 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1617 * data is NULL.
1618 */
463d59bf 1619EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1e7a5136
RS
1620
1621/*
1622 * Call NSM/NOTIFY
1623 * Call the NOTIFY procedure for the NSM protocol
1624 *
1625 * Function returns
1626 * 0 : The call was initiated. The callback will be invoked when the call completes.
1627 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1628 *
1629 * When the callback is invoked, status indicates the result:
1630 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1631 * data is NULL
1632 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1633 * data is the error string.
1634 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1635 * data is NULL.
1636 */
1637struct NSM1_NOTIFYargs;
463d59bf 1638EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
ed09b567 1639
4641d36e
AR
1640#ifdef __cplusplus
1641}
1642#endif
1643
f9bb21ad 1644#endif