d13aeaa3d21abced087627f79950020fb2f7ea98
[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 struct rpc_data {
29 int size;
30 unsigned char *data;
31 };
32
33 struct rpc_context;
34 struct rpc_context *rpc_init_context(void);
35 void rpc_destroy_context(struct rpc_context *rpc);
36
37 void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
38
39 int rpc_get_fd(struct rpc_context *rpc);
40 int rpc_which_events(struct rpc_context *rpc);
41 int rpc_service(struct rpc_context *rpc, int revents);
42 char *rpc_get_error(struct rpc_context *rpc);
43 int rpc_queue_length(struct rpc_context *rpc);
44
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 */
48 struct 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 */
54 struct nfs_fh3 *nfs_get_fh(struct nfsfh *nfsfh);
55
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 */
60 void rpc_set_next_xid(struct rpc_context *rpc, uint32_t xid);
61
62 #define RPC_STATUS_SUCCESS 0
63 #define RPC_STATUS_ERROR 1
64 #define RPC_STATUS_CANCEL 2
65
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 */
80 int rpc_connect_async(struct rpc_context *rpc, const char *server, int port, rpc_cb cb, void *private_data);
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 */
95 int rpc_connect_program_async(struct rpc_context *rpc, char *server, int program, int version, rpc_cb cb, void *private_data);
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 */
100 int rpc_disconnect(struct rpc_context *rpc, char *error);
101
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 */
121 EXTERN int rpc_pmap_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
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 */
138 EXTERN int rpc_pmap_getport_async(struct rpc_context *rpc, int program, int version, int protocol, rpc_cb cb, void *private_data);
139
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 */
154 EXTERN int rpc_pmap_set_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
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 */
170 EXTERN int rpc_pmap_unset_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
171
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 */
186 EXTERN 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);
187
188 /*
189 * MOUNT FUNCTIONS
190 */
191 char *mountstat3_to_str(int stat);
192 int mountstat3_to_errno(int error);
193
194 /*
195 * Call MOUNT/NULL
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 */
208 EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
209
210 /*
211 * Call MOUNT/MNT
212 * Function returns
213 * 0 : The call was initiated. The callback will be invoked when the call completes.
214 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
215 *
216 * When the callback is invoked, status indicates the result:
217 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
218 * data is union mountres3.
219 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
220 * data is the error string.
221 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
222 * data is NULL.
223 */
224 EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *export, void *private_data);
225
226 /*
227 * Call MOUNT/DUMP
228 * Function returns
229 * 0 : The call was initiated. The callback will be invoked when the call completes.
230 * <0 : An error occured when trying to set up the call. 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 mount daemon.
234 * data is a mountlist.
235 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
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_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
241
242 /*
243 * Call MOUNT/UMNT
244 * Function returns
245 * 0 : The call was initiated. The callback will be invoked when the call completes.
246 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
247 *
248 * When the callback is invoked, status indicates the result:
249 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
250 * data NULL.
251 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
252 * data is the error string.
253 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
254 * data is NULL.
255 */
256 EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *export, void *private_data);
257
258 /*
259 * Call MOUNT/UMNTALL
260 * Function returns
261 * 0 : The call was initiated. The callback will be invoked when the call completes.
262 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
263 *
264 * When the callback is invoked, status indicates the result:
265 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
266 * data NULL.
267 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
268 * data is the error string.
269 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
270 * data is NULL.
271 */
272 EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
273
274 /*
275 * Call MOUNT/EXPORT
276 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
277 * returned structures.
278 *
279 * Function returns
280 * 0 : The call was initiated. The callback will be invoked when the call completes.
281 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
282 *
283 * When the callback is invoked, status indicates the result:
284 * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon.
285 * data is a pointer to an exports pointer:
286 * exports export = *(exports *)data;
287 * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon.
288 * data is the error string.
289 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
290 * data is NULL.
291 */
292 EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
293
294
295
296
297 /*
298 * NFS v3 FUNCTIONS
299 */
300 struct nfs_fh3;
301 char *nfsstat3_to_str(int error);
302 int nfsstat3_to_errno(int error);
303
304 /*
305 * Call NFS3/NULL
306 * Function returns
307 * 0 : The call was initiated. The callback will be invoked when the call completes.
308 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
309 *
310 * When the callback is invoked, status indicates the result:
311 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
312 * data is NULL.
313 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
314 * data is the error string.
315 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
316 * data is NULL.
317 */
318 EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
319 EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
320
321 /*
322 * Call NFS3/GETATTR
323 * Function returns
324 * 0 : The call was initiated. The callback will be invoked when the call completes.
325 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
326 *
327 * When the callback is invoked, status indicates the result:
328 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
329 * data is GETATTR3res
330 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
331 * data is the error string.
332 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
333 * data is NULL.
334 */
335 struct GETATTR3args;
336 EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data);
337 EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
338
339 /*
340 * Call NFS3/PATHCONF
341 * Function returns
342 * 0 : The call was initiated. The callback will be invoked when the call completes.
343 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
344 *
345 * When the callback is invoked, status indicates the result:
346 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
347 * data is PATHCONF3res
348 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
349 * data is the error string.
350 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
351 * data is NULL.
352 */
353 struct PATHCONF3args;
354 EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data);
355 EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
356
357 /*
358 * Call NFS3/LOOKUP
359 * Function returns
360 * 0 : The call was initiated. The callback will be invoked when the call completes.
361 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
362 *
363 * When the callback is invoked, status indicates the result:
364 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
365 * data is LOOKUP3res
366 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
367 * data is the error string.
368 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
369 * data is NULL.
370 */
371 struct LOOKUP3args;
372 EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data);
373 EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
374
375 /*
376 * Call NFS3/ACCESS
377 * Function returns
378 * 0 : The call was initiated. The callback will be invoked when the call completes.
379 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
380 *
381 * When the callback is invoked, status indicates the result:
382 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
383 * data is ACCESS3res
384 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
385 * data is the error string.
386 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
387 * data is NULL.
388 */
389 struct ACCESS3args;
390 EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data);
391 EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data);
392
393 /*
394 * Call NFS3/READ
395 * Function returns
396 * 0 : The call was initiated. The callback will be invoked when the call completes.
397 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
398 *
399 * When the callback is invoked, status indicates the result:
400 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
401 * data is READ3res
402 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
403 * data is the error string.
404 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
405 * data is NULL.
406 */
407 struct READ3args;
408 EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data);
409 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);
410
411 /*
412 * Call NFS3/WRITE
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 WRITE3res *
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 */
425 struct WRITE3args;
426 EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data);
427 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);
428
429 /*
430 * Call NFS3/COMMIT
431 * Function returns
432 * 0 : The call was initiated. The callback will be invoked when the call completes.
433 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
434 *
435 * When the callback is invoked, status indicates the result:
436 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
437 * data is COMMIT3res *
438 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
439 * data is the error string.
440 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
441 * data is NULL.
442 */
443 struct COMMIT3args;
444 EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data);
445 EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
446
447 /*
448 * Call NFS3/SETATTR
449 * Function returns
450 * 0 : The call was initiated. The callback will be invoked when the call completes.
451 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
452 *
453 * When the callback is invoked, status indicates the result:
454 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
455 * data is SETATTR3res *
456 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
457 * data is the error string.
458 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
459 * data is NULL.
460 */
461 struct SETATTR3args;
462 EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
463 EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
464
465 /*
466 * Call NFS3/MKDIR
467 * Function returns
468 * 0 : The call was initiated. The callback will be invoked when the call completes.
469 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
470 *
471 * When the callback is invoked, status indicates the result:
472 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
473 * data is MKDIR3res *
474 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
475 * data is the error string.
476 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
477 * data is NULL.
478 */
479 struct MKDIR3args;
480 EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
481 EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
482
483 /*
484 * Call NFS3/RMDIR
485 * Function returns
486 * 0 : The call was initiated. The callback will be invoked when the call completes.
487 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
488 *
489 * When the callback is invoked, status indicates the result:
490 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
491 * data is RMDIR3res *
492 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
493 * data is the error string.
494 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
495 * data is NULL.
496 */
497 struct RMDIR3args;
498 EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data);
499 EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data);
500
501 /*
502 * Call NFS3/CREATE
503 * Function returns
504 * 0 : The call was initiated. The callback will be invoked when the call completes.
505 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
506 *
507 * When the callback is invoked, status indicates the result:
508 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
509 * data is CREATE3res *
510 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
511 * data is the error string.
512 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
513 * data is NULL.
514 */
515 struct CREATE3args;
516 EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
517 EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
518
519 /*
520 * Call NFS3/MKNOD
521 * Function returns
522 * 0 : The call was initiated. The callback will be invoked when the call completes.
523 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
524 *
525 * When the callback is invoked, status indicates the result:
526 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
527 * data is MKNOD3res *
528 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
529 * data is the error string.
530 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
531 * data is NULL.
532 */
533 struct MKNOD3args;
534 EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data);
535 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);
536
537 /*
538 * Call NFS3/REMOVE
539 * Function returns
540 * 0 : The call was initiated. The callback will be invoked when the call completes.
541 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
542 *
543 * When the callback is invoked, status indicates the result:
544 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
545 * data is REMOVE3res *
546 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
547 * data is the error string.
548 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
549 * data is NULL.
550 */
551 struct REMOVE3args;
552 EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data);
553 EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
554
555 /*
556 * Call NFS3/READDIR
557 * Function returns
558 * 0 : The call was initiated. The callback will be invoked when the call completes.
559 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
560 *
561 * When the callback is invoked, status indicates the result:
562 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
563 * data is READDIR3res *
564 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
565 * data is the error string.
566 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
567 * data is NULL.
568 */
569 struct READDIR3args;
570 EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data);
571 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);
572
573 /*
574 * Call NFS3/READDIRPLUS
575 * Function returns
576 * 0 : The call was initiated. The callback will be invoked when the call completes.
577 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
578 *
579 * When the callback is invoked, status indicates the result:
580 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
581 * data is READDIRPLUS3res *
582 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
583 * data is the error string.
584 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
585 * data is NULL.
586 */
587 struct READDIRPLUS3args;
588 EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data);
589 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);
590
591 /*
592 * Call NFS3/FSSTAT
593 * Function returns
594 * 0 : The call was initiated. The callback will be invoked when the call completes.
595 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
596 *
597 * When the callback is invoked, status indicates the result:
598 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
599 * data is FSSTAT3res
600 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
601 * data is the error string.
602 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
603 * data is NULL.
604 */
605 struct FSSTAT3args;
606 EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data);
607 EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
608
609 /*
610 * Call NFS3/FSINFO
611 * Function returns
612 * 0 : The call was initiated. The callback will be invoked when the call completes.
613 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
614 *
615 * When the callback is invoked, status indicates the result:
616 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
617 * data is FSINFO3res
618 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
619 * data is the error string.
620 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
621 * data is NULL.
622 */
623 struct FSINFO3args;
624 EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data);
625 EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
626
627 /*
628 * Call NFS3/READLINK
629 * Function returns
630 * 0 : The call was initiated. The callback will be invoked when the call completes.
631 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
632 *
633 * When the callback is invoked, status indicates the result:
634 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
635 * data is READLINK3res *
636 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
637 * data is the error string.
638 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
639 * data is NULL.
640 */
641 struct READLINK3args;
642 EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
643 EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
644
645 /*
646 * Call NFS3/SYMLINK
647 * Function returns
648 * 0 : The call was initiated. The callback will be invoked when the call completes.
649 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
650 *
651 * When the callback is invoked, status indicates the result:
652 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
653 * data is SYMLINK3res *
654 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
655 * data is the error string.
656 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
657 * data is NULL.
658 */
659 struct SYMLINK3args;
660 EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
661 EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
662
663 /*
664 * Call NFS3/RENAME
665 * Function returns
666 * 0 : The call was initiated. The callback will be invoked when the call completes.
667 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
668 *
669 * When the callback is invoked, status indicates the result:
670 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
671 * data is RENAME3res *
672 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
673 * data is the error string.
674 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
675 * data is NULL.
676 */
677 struct RENAME3args;
678 EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data);
679 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);
680
681 /*
682 * Call NFS3/LINK
683 * Function returns
684 * 0 : The call was initiated. The callback will be invoked when the call completes.
685 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
686 *
687 * When the callback is invoked, status indicates the result:
688 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
689 * data is LINK3res *
690 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
691 * data is the error string.
692 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
693 * data is NULL.
694 */
695 struct LINK3args;
696 EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data);
697 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);
698
699
700 /*
701 * RQUOTA FUNCTIONS
702 */
703 char *rquotastat_to_str(int error);
704 int rquotastat_to_errno(int error);
705
706 /*
707 * Call RQUOTA1/NULL
708 * Function returns
709 * 0 : The call was initiated. The callback will be invoked when the call completes.
710 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
711 *
712 * When the callback is invoked, status indicates the result:
713 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
714 * data is NULL.
715 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
716 * data is the error string.
717 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
718 * data is NULL.
719 */
720 EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
721
722 /*
723 * Call RQUOTA1/GETQUOTA
724 * Function returns
725 * 0 : The call was initiated. The callback will be invoked when the call completes.
726 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
727 *
728 * When the callback is invoked, status indicates the result:
729 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
730 * data is a RQUOTA1res structure.
731 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
732 * data is the error string.
733 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
734 * data is NULL.
735 */
736 EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);
737
738 /*
739 * Call RQUOTA1/GETACTIVEQUOTA
740 * Function returns
741 * 0 : The call was initiated. The callback will be invoked when the call completes.
742 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
743 *
744 * When the callback is invoked, status indicates the result:
745 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
746 * data is a RQUOTA1res structure.
747 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
748 * data is the error string.
749 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
750 * data is NULL.
751 */
752 EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);
753
754
755
756
757 /*
758 * Call RQUOTA2/NULL
759 * Function returns
760 * 0 : The call was initiated. The callback will be invoked when the call completes.
761 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
762 *
763 * When the callback is invoked, status indicates the result:
764 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
765 * data is NULL.
766 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
767 * data is the error string.
768 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
769 * data is NULL.
770 */
771 int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
772
773 /*
774 * Call RQUOTA2/GETQUOTA
775 * Function returns
776 * 0 : The call was initiated. The callback will be invoked when the call completes.
777 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
778 *
779 * When the callback is invoked, status indicates the result:
780 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
781 * data is a RQUOTA1res structure.
782 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
783 * data is the error string.
784 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
785 * data is NULL.
786 */
787 int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int type, int uid, void *private_data);
788
789 /*
790 * Call RQUOTA2/GETACTIVEQUOTA
791 * Function returns
792 * 0 : The call was initiated. The callback will be invoked when the call completes.
793 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
794 *
795 * When the callback is invoked, status indicates the result:
796 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
797 * data is a RQUOTA1res structure.
798 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
799 * data is the error string.
800 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
801 * data is NULL.
802 */
803 int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int type, int uid, void *private_data);
804
805
806
807
808
809
810 /*
811 * NFSACL functions
812 */
813
814 /*
815 * Call NFSACL/NULL
816 * Call the NULL procedure for the NFSACL
817 *
818 * Function returns
819 * 0 : The call was initiated. The callback will be invoked when the call completes.
820 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
821 *
822 * When the callback is invoked, status indicates the result:
823 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
824 * data is NULL
825 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
826 * data is the error string.
827 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
828 * data is NULL.
829 */
830 EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
831
832 /*
833 * Call NFSACL/GETACL
834 *
835 * Function returns
836 * 0 : The call was initiated. The callback will be invoked when the call completes.
837 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
838 *
839 * When the callback is invoked, status indicates the result:
840 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
841 * data is a GETACL3res pointer
842 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
843 * data is the error string.
844 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
845 * data is NULL.
846 */
847 struct GETACL3args;
848 EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
849
850
851
852 /*
853 * Call NFSACL/SETACL
854 *
855 * Function returns
856 * 0 : The call was initiated. The callback will be invoked when the call completes.
857 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
858 *
859 * When the callback is invoked, status indicates the result:
860 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
861 * data is a SETACL3res pointer
862 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
863 * data is the error string.
864 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
865 * data is NULL.
866 */
867 struct SETACL3args;
868 EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
869
870
871
872
873 /*
874 * NLM functions
875 */
876 char *nlmstat4_to_str(int stat);
877
878 /*
879 * Call NLM/NULL
880 * Call the NULL procedure for the NLM protocol
881 *
882 * Function returns
883 * 0 : The call was initiated. The callback will be invoked when the call completes.
884 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
885 *
886 * When the callback is invoked, status indicates the result:
887 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
888 * data is NULL
889 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
890 * data is the error string.
891 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
892 * data is NULL.
893 */
894 EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
895
896 /*
897 * Call NLM/TEST
898 * Call the TEST procedure for the NLM protocol
899 *
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 nlm daemon.
906 * data is NLM4_TESTres
907 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm 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 struct NLM4_TESTargs;
913 EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
914
915 /*
916 * Call NLM/LOCK
917 * Call the LOCK procedure for the NLM protocol
918 *
919 * Function returns
920 * 0 : The call was initiated. The callback will be invoked when the call completes.
921 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
922 *
923 * When the callback is invoked, status indicates the result:
924 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
925 * data is NLM4_LOCKres
926 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
927 * data is the error string.
928 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
929 * data is NULL.
930 */
931 struct NLM4_LOCKargs;
932 EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
933
934 /*
935 * Call NLM/CANCEL
936 * Call the CANCEL procedure for the NLM protocol
937 *
938 * Function returns
939 * 0 : The call was initiated. The callback will be invoked when the call completes.
940 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
941 *
942 * When the callback is invoked, status indicates the result:
943 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
944 * data is NLM4_CANCres
945 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
946 * data is the error string.
947 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
948 * data is NULL.
949 */
950 struct NLM4_CANCargs;
951 EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
952
953 /*
954 * Call NLM/UNLOCK
955 * Call the UNLOCK procedure for the NLM protocol
956 *
957 * Function returns
958 * 0 : The call was initiated. The callback will be invoked when the call completes.
959 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
960 *
961 * When the callback is invoked, status indicates the result:
962 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
963 * data is NLM4_UNLOCKres
964 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
965 * data is the error string.
966 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
967 * data is NULL.
968 */
969 struct NLM4_UNLOCKargs;
970 EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
971
972 /*
973 * NSM functions
974 */
975 char *nsmstat1_to_str(int stat);
976
977 /*
978 * Call NSM/NULL
979 * Call the NULL procedure for the NSM protocol
980 *
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 nsm daemon.
987 * data is NULL
988 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm 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 */
993 EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
994
995 /*
996 * Call NSM/STAT
997 * Call the STAT procedure for the NSM protocol
998 *
999 * Function returns
1000 * 0 : The call was initiated. The callback will be invoked when the call completes.
1001 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1002 *
1003 * When the callback is invoked, status indicates the result:
1004 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1005 * data is NSM1_STATres
1006 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1007 * data is the error string.
1008 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1009 * data is NULL.
1010 */
1011 struct NSM1_STATargs;
1012 EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
1013
1014 /*
1015 * Call NSM/MON
1016 * Call the MON procedure for the NSM protocol
1017 *
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 nsm daemon.
1024 * data is NSM1_MONres
1025 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm 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 NSM1_MONargs;
1031 EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
1032
1033 /*
1034 * Call NSM/UNMON
1035 * Call the UNMON procedure for the NSM protocol
1036 *
1037 * Function returns
1038 * 0 : The call was initiated. The callback will be invoked when the call completes.
1039 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1040 *
1041 * When the callback is invoked, status indicates the result:
1042 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1043 * data is NSM1_UNMONres
1044 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1045 * data is the error string.
1046 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1047 * data is NULL.
1048 */
1049 struct NSM1_UNMONargs;
1050 EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
1051
1052 /*
1053 * Call NSM/UNMONALL
1054 * Call the UNMONALL procedure for the NSM protocol
1055 *
1056 * Function returns
1057 * 0 : The call was initiated. The callback will be invoked when the call completes.
1058 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1059 *
1060 * When the callback is invoked, status indicates the result:
1061 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1062 * data is NSM1_UNMONALLres
1063 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1064 * data is the error string.
1065 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1066 * data is NULL.
1067 */
1068 struct NSM1_UNMONALLargs;
1069 EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
1070
1071 /*
1072 * Call NSM/SIMUCRASH
1073 * Call the SIMUCRASH procedure for the NSM protocol
1074 *
1075 * Function returns
1076 * 0 : The call was initiated. The callback will be invoked when the call completes.
1077 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1078 *
1079 * When the callback is invoked, status indicates the result:
1080 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1081 * data is NULL
1082 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1083 * data is the error string.
1084 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1085 * data is NULL.
1086 */
1087 EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1088
1089 /*
1090 * Call NSM/NOTIFY
1091 * Call the NOTIFY procedure for the NSM protocol
1092 *
1093 * Function returns
1094 * 0 : The call was initiated. The callback will be invoked when the call completes.
1095 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1096 *
1097 * When the callback is invoked, status indicates the result:
1098 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1099 * data is NULL
1100 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1101 * data is the error string.
1102 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1103 * data is NULL.
1104 */
1105 struct NSM1_NOTIFYargs;
1106 EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
1107
1108 #endif