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