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