b813e270b4e2f9418cdb19a1c2cb2834a4958674
[deb_libnfs.git] / include / nfsc / libnfs-raw.h
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 */
22 #ifndef _LIBNFS_RAW_H_
23 #define _LIBNFS_RAW_H_
24
25 #include <stdint.h>
26 #include <nfsc/libnfs-zdr.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 struct rpc_data {
33 int size;
34 unsigned char *data;
35 };
36
37 struct rpc_context;
38 struct rpc_context *rpc_init_context(void);
39 void rpc_destroy_context(struct rpc_context *rpc);
40
41 void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
42
43 int rpc_get_fd(struct rpc_context *rpc);
44 int rpc_which_events(struct rpc_context *rpc);
45 int rpc_service(struct rpc_context *rpc, int revents);
46 char *rpc_get_error(struct rpc_context *rpc);
47 int rpc_queue_length(struct rpc_context *rpc);
48
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 */
52 struct 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 */
58 struct nfs_fh3 *nfs_get_fh(struct nfsfh *nfsfh);
59
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 */
64 void rpc_set_next_xid(struct rpc_context *rpc, uint32_t xid);
65
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 */
78 void rpc_set_fd(struct rpc_context *rpc, int fd);
79
80 #define RPC_STATUS_SUCCESS 0
81 #define RPC_STATUS_ERROR 1
82 #define RPC_STATUS_CANCEL 2
83
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 */
98 int rpc_connect_async(struct rpc_context *rpc, const char *server, int port, rpc_cb cb, void *private_data);
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 */
113 int rpc_connect_program_async(struct rpc_context *rpc, const char *server, int program, int version, rpc_cb cb, void *private_data);
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 */
118 int rpc_disconnect(struct rpc_context *rpc, char *error);
119
120
121 /*
122 * PORTMAP v2 FUNCTIONS
123 */
124
125 /*
126 * Call PORTMAPPER2/NULL
127 * Function returns
128 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
129 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
130 *
131 * When the callback is invoked, status indicates the result:
132 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
133 * data is NULL.
134 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
135 * data is the error string.
136 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
137 * data is NULL.
138 */
139 EXTERN int rpc_pmap2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
140
141
142 /*
143 * Call PORTMAPPER2/GETPORT.
144 * Function returns
145 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
146 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
147 *
148 * When the callback is invoked, status indicates the result:
149 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
150 * data is a (uint32_t *), containing the port returned.
151 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
152 * data is the error string.
153 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
154 * data is NULL.
155 */
156 EXTERN int rpc_pmap2_getport_async(struct rpc_context *rpc, int program, int version, int protocol, rpc_cb cb, void *private_data);
157
158 /*
159 * Call PORTMAPPER2/SET
160 * Function returns
161 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
162 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
163 *
164 * When the callback is invoked, status indicates the result:
165 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
166 * data is a (uint32_t *), containing status
167 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
168 * data is the error string.
169 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
170 * data is NULL.
171 */
172 EXTERN int rpc_pmap2_set_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
173
174 /*
175 * Call PORTMAPPER2/UNSET
176 * Function returns
177 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
178 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
179 *
180 * When the callback is invoked, status indicates the result:
181 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
182 * data is a (uint32_t *), containing status
183 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
184 * data is the error string.
185 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
186 * data is NULL.
187 */
188 EXTERN int rpc_pmap2_unset_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
189
190 /*
191 * Call PORTMAPPER2/DUMP.
192 * Function returns
193 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
194 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
195 *
196 * When the callback is invoked, status indicates the result:
197 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
198 * data is struct pmap2_dump_result.
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 */
204 EXTERN int rpc_pmap2_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
205
206 /*
207 * Call PORTMAPPER2/CALLIT.
208 * Function returns
209 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
210 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
211 *
212 * When the callback is invoked, status indicates the result:
213 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
214 * data is a 'pmap_call_result' pointer.
215 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
216 * data is the error string.
217 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
218 * data is NULL.
219 */
220 EXTERN 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);
221
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 */
240 EXTERN int rpc_pmap3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
241
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 */
256 struct pmap3_mapping;
257 EXTERN int rpc_pmap3_getaddr_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data);
258
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 */
273 EXTERN int rpc_pmap3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
274
275
276 /*
277 * MOUNT v3 FUNCTIONS
278 */
279 char *mountstat3_to_str(int stat);
280 int mountstat3_to_errno(int error);
281
282 /*
283 * Call MOUNT3/NULL
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 */
296 EXTERN int rpc_mount3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
297 EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
298
299 /*
300 * Call MOUNT3/MNT
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 */
313 EXTERN int rpc_mount3_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
314 EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
315
316 /*
317 * Call MOUNT3/DUMP
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 */
330 EXTERN int rpc_mount3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
331 EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
332
333 /*
334 * Call MOUNT3/UMNT
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 */
347 EXTERN int rpc_mount3_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
348 EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
349
350 /*
351 * Call MOUNT3/UMNTALL
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 */
364 EXTERN int rpc_mount3_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
365 EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
366
367 /*
368 * Call MOUNT3/EXPORT
369 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
370 * returned structures.
371 *
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.
378 * data is a pointer to an exports pointer:
379 * exports export = *(exports *)data;
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 */
385 EXTERN int rpc_mount3_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
386 EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
387
388 /*
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 */
405 EXTERN 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 */
421 EXTERN int rpc_mount1_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
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 */
437 EXTERN int rpc_mount1_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
438
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 */
453 EXTERN int rpc_mount1_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data);
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 */
469 EXTERN 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 */
489 EXTERN int rpc_mount1_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
490
491
492 /*
493 * NFS v3 FUNCTIONS
494 */
495 struct nfs_fh3;
496 char *nfsstat3_to_str(int error);
497 int nfsstat3_to_errno(int error);
498
499 /*
500 * Call NFS3/NULL
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 */
513 EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
514 EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
515
516 /*
517 * Call NFS3/GETATTR
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 */
530 struct GETATTR3args;
531 EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data);
532 EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
533
534 /*
535 * Call NFS3/PATHCONF
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 */
548 struct PATHCONF3args;
549 EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data);
550 EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
551
552 /*
553 * Call NFS3/LOOKUP
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 */
566 struct LOOKUP3args;
567 EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data);
568 EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
569
570 /*
571 * Call NFS3/ACCESS
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 */
584 struct ACCESS3args;
585 EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data);
586 EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data);
587
588 /*
589 * Call NFS3/READ
590 * Function returns
591 * 0 : The call was initiated. The callback will be invoked when the call completes.
592 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
593 *
594 * When the callback is invoked, status indicates the result:
595 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
596 * data is READ3res
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 */
602 struct READ3args;
603 EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data);
604 EXTERN 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);
605
606 /*
607 * Call NFS3/WRITE
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 */
620 struct WRITE3args;
621 EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data);
622 EXTERN 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);
623
624 /*
625 * Call NFS3/COMMIT
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 */
638 struct COMMIT3args;
639 EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data);
640 EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
641
642 /*
643 * Call NFS3/SETATTR
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 */
656 struct SETATTR3args;
657 EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
658 EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
659
660 /*
661 * Call NFS3/MKDIR
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 */
674 struct MKDIR3args;
675 EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
676 EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
677
678 /*
679 * Call NFS3/RMDIR
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 */
692 struct RMDIR3args;
693 EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data);
694 EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data);
695
696 /*
697 * Call NFS3/CREATE
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 */
710 struct CREATE3args;
711 EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
712 EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
713
714 /*
715 * Call NFS3/MKNOD
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 */
728 struct MKNOD3args;
729 EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data);
730 EXTERN 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);
731
732 /*
733 * Call NFS3/REMOVE
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 */
746 struct REMOVE3args;
747 EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data);
748 EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
749
750 /*
751 * Call NFS3/READDIR
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 */
764 struct READDIR3args;
765 EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data);
766 EXTERN 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);
767
768 /*
769 * Call NFS3/READDIRPLUS
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 */
782 struct READDIRPLUS3args;
783 EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data);
784 EXTERN 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);
785
786 /*
787 * Call NFS3/FSSTAT
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 */
800 struct FSSTAT3args;
801 EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data);
802 EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
803
804 /*
805 * Call NFS3/FSINFO
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 */
818 struct FSINFO3args;
819 EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data);
820 EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
821
822 /*
823 * Call NFS3/READLINK
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 */
836 struct READLINK3args;
837 EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
838 EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
839
840 /*
841 * Call NFS3/SYMLINK
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 */
854 struct SYMLINK3args;
855 EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
856 EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
857
858 /*
859 * Call NFS3/RENAME
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 */
872 struct RENAME3args;
873 EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data);
874 EXTERN 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);
875
876 /*
877 * Call NFS3/LINK
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 */
890 struct LINK3args;
891 EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data);
892 EXTERN 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);
893
894 /*
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 */
912 EXTERN 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 */
928 struct GETATTR2args;
929 EXTERN 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 */
945 struct SETATTR2args;
946 EXTERN 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 */
962 struct LOOKUP2args;
963 EXTERN 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 */
979 struct READLINK2args;
980 EXTERN 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 */
996 struct READ2args;
997 EXTERN 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 */
1013 struct WRITE2args;
1014 EXTERN 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 */
1030 struct CREATE2args;
1031 EXTERN 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 */
1047 struct REMOVE2args;
1048 EXTERN 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 */
1064 struct RENAME2args;
1065 EXTERN 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 */
1081 struct LINK2args;
1082 EXTERN 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 */
1098 struct SYMLINK2args;
1099 EXTERN 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 */
1115 struct MKDIR2args;
1116 EXTERN 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 */
1132 struct RMDIR2args;
1133 EXTERN 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 */
1149 struct READDIR2args;
1150 EXTERN 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 */
1166 struct STATFS2args;
1167 EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data);
1168
1169 /*
1170 * RQUOTA FUNCTIONS
1171 */
1172 char *rquotastat_to_str(int error);
1173 int 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 */
1189 EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
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 */
1205 EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
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 */
1221 EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data);
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 */
1240 int 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 */
1256 int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
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 */
1272 int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data);
1273
1274
1275
1276
1277
1278
1279 /*
1280 * NFSACL functions
1281 */
1282
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 */
1299 EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
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:
1309 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1310 * data is a GETACL3res pointer
1311 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1312 * data is the error string.
1313 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1314 * data is NULL.
1315 */
1316 struct GETACL3args;
1317 EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
1318
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 */
1336 struct SETACL3args;
1337 EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
1338
1339
1340
1341
1342 /*
1343 * NLM functions
1344 */
1345 char *nlmstat4_to_str(int stat);
1346
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 */
1363 EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
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 */
1381 struct NLM4_TESTargs;
1382 EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
1383
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 */
1400 struct NLM4_LOCKargs;
1401 EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
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 */
1419 struct NLM4_CANCargs;
1420 EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
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 */
1438 struct NLM4_UNLOCKargs;
1439 EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
1440
1441 /*
1442 * NSM functions
1443 */
1444 char *nsmstat1_to_str(int stat);
1445
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 */
1462 EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1463
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 */
1480 struct NSM1_STATargs;
1481 EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
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 */
1499 struct NSM1_MONargs;
1500 EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
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 */
1518 struct NSM1_UNMONargs;
1519 EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
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 */
1537 struct NSM1_UNMONALLargs;
1538 EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
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 */
1556 EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
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 */
1574 struct NSM1_NOTIFYargs;
1575 EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
1576
1577 #ifdef __cplusplus
1578 }
1579 #endif
1580
1581 #endif