1fb619597c9e41d768ff581cc846241d30a65374
[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 * NFS v2 FUNCTIONS
701 */
702
703 /*
704 * Call NFS2/NULL
705 * Function returns
706 * 0 : The call was initiated. The callback will be invoked when the call completes.
707 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
708 *
709 * When the callback is invoked, status indicates the result:
710 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
711 * data is NULL.
712 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
713 * data is the error string.
714 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
715 * data is NULL.
716 */
717 EXTERN int rpc_nfs2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
718
719 /*
720 * Call NFS2/GETATTR
721 * Function returns
722 * 0 : The call was initiated. The callback will be invoked when the call completes.
723 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
724 *
725 * When the callback is invoked, status indicates the result:
726 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
727 * data is GETATTR2res
728 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
729 * data is the error string.
730 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
731 * data is NULL.
732 */
733 struct GETATTR2args;
734 EXTERN int rpc_nfs2_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR2args *args, void *private_data);
735
736 /*
737 * Call NFS2/SETATTR
738 * Function returns
739 * 0 : The call was initiated. The callback will be invoked when the call completes.
740 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
741 *
742 * When the callback is invoked, status indicates the result:
743 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
744 * data is SETATTR2res *
745 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
746 * data is the error string.
747 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
748 * data is NULL.
749 */
750 struct SETATTR2args;
751 EXTERN int rpc_nfs2_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR2args *args, void *private_data);
752
753 /*
754 * Call NFS2/LOOKUP
755 * Function returns
756 * 0 : The call was initiated. The callback will be invoked when the call completes.
757 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
758 *
759 * When the callback is invoked, status indicates the result:
760 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
761 * data is LOOKUP2res
762 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
763 * data is the error string.
764 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
765 * data is NULL.
766 */
767 struct LOOKUP2args;
768 EXTERN int rpc_nfs2_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP2args *args, void *private_data);
769
770 /*
771 * Call NFS2/READLINK
772 * Function returns
773 * 0 : The call was initiated. The callback will be invoked when the call completes.
774 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
775 *
776 * When the callback is invoked, status indicates the result:
777 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
778 * data is READLINK2res *
779 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
780 * data is the error string.
781 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
782 * data is NULL.
783 */
784 struct READLINK2args;
785 EXTERN int rpc_nfs32_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK2args *args, void *private_data);
786
787 /*
788 * Call NFS2/READ
789 * Function returns
790 * 0 : The call was initiated. The callback will be invoked when the call completes.
791 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
792 *
793 * When the callback is invoked, status indicates the result:
794 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
795 * data is READ2res
796 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
797 * data is the error string.
798 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
799 * data is NULL.
800 */
801 struct READ2args;
802 EXTERN int rpc_nfs2_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ2args *args, void *private_data);
803
804 /*
805 * Call NFS2/WRITE
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 WRITE2res *
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 WRITE2args;
819 EXTERN int rpc_nfs2_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE2args *args, void *private_data);
820
821 /*
822 * Call NFS2/CREATE
823 * Function returns
824 * 0 : The call was initiated. The callback will be invoked when the call completes.
825 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
826 *
827 * When the callback is invoked, status indicates the result:
828 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
829 * data is CREATE2res *
830 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
831 * data is the error string.
832 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
833 * data is NULL.
834 */
835 struct CREATE2args;
836 EXTERN int rpc_nfs2_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE2args *args, void *private_data);
837
838 /*
839 * Call NFS2/REMOVE
840 * Function returns
841 * 0 : The call was initiated. The callback will be invoked when the call completes.
842 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
843 *
844 * When the callback is invoked, status indicates the result:
845 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
846 * data is REMOVE2res *
847 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
848 * data is the error string.
849 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
850 * data is NULL.
851 */
852 struct REMOVE2args;
853 EXTERN int rpc_nfs2_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE2args *args, void *private_data);
854
855 /*
856 * Call NFS2/RENAME
857 * Function returns
858 * 0 : The call was initiated. The callback will be invoked when the call completes.
859 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
860 *
861 * When the callback is invoked, status indicates the result:
862 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
863 * data is RENAME2res *
864 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
865 * data is the error string.
866 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
867 * data is NULL.
868 */
869 struct RENAME2args;
870 EXTERN int rpc_nfs2_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME2args *args, void *private_data);
871
872 /*
873 * Call NFS2/LINK
874 * Function returns
875 * 0 : The call was initiated. The callback will be invoked when the call completes.
876 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
877 *
878 * When the callback is invoked, status indicates the result:
879 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
880 * data is LINK2res *
881 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
882 * data is the error string.
883 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
884 * data is NULL.
885 */
886 struct LINK2args;
887 EXTERN int rpc_nfs2_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK2args *args, void *private_data);
888
889 /*
890 * Call NFS2/SYMLINK
891 * Function returns
892 * 0 : The call was initiated. The callback will be invoked when the call completes.
893 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
894 *
895 * When the callback is invoked, status indicates the result:
896 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
897 * data is SYMLINK2res *
898 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
899 * data is the error string.
900 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
901 * data is NULL.
902 */
903 struct SYMLINK2args;
904 EXTERN int rpc_nfs2_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK2args *args, void *private_data);
905
906 /*
907 * Call NFS2/MKDIR
908 * Function returns
909 * 0 : The call was initiated. The callback will be invoked when the call completes.
910 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
911 *
912 * When the callback is invoked, status indicates the result:
913 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
914 * data is MKDIR2res *
915 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
916 * data is the error string.
917 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
918 * data is NULL.
919 */
920 struct MKDIR2args;
921 EXTERN int rpc_nfs2_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR2args *args, void *private_data);
922
923 /*
924 * Call NFS2/RMDIR
925 * Function returns
926 * 0 : The call was initiated. The callback will be invoked when the call completes.
927 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
928 *
929 * When the callback is invoked, status indicates the result:
930 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
931 * data is RMDIR2res *
932 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
933 * data is the error string.
934 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
935 * data is NULL.
936 */
937 struct RMDIR2args;
938 EXTERN int rpc_nfs2_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR2args *args, void *private_data);
939
940 /*
941 * Call NFS2/READDIR
942 * Function returns
943 * 0 : The call was initiated. The callback will be invoked when the call completes.
944 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
945 *
946 * When the callback is invoked, status indicates the result:
947 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
948 * data is READDIR2res *
949 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
950 * data is the error string.
951 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
952 * data is NULL.
953 */
954 struct READDIR2args;
955 EXTERN int rpc_nfs2_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR2args *args, void *private_data);
956
957 /*
958 * Call NFS2/STATFS
959 * Function returns
960 * 0 : The call was initiated. The callback will be invoked when the call completes.
961 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
962 *
963 * When the callback is invoked, status indicates the result:
964 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
965 * data is STATFS2res *
966 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
967 * data is the error string.
968 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
969 * data is NULL.
970 */
971 struct STATFS2args;
972 EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data);
973
974 /*
975 * RQUOTA FUNCTIONS
976 */
977 char *rquotastat_to_str(int error);
978 int rquotastat_to_errno(int error);
979
980 /*
981 * Call RQUOTA1/NULL
982 * Function returns
983 * 0 : The call was initiated. The callback will be invoked when the call completes.
984 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
985 *
986 * When the callback is invoked, status indicates the result:
987 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
988 * data is NULL.
989 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
990 * data is the error string.
991 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
992 * data is NULL.
993 */
994 EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
995
996 /*
997 * Call RQUOTA1/GETQUOTA
998 * Function returns
999 * 0 : The call was initiated. The callback will be invoked when the call completes.
1000 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1001 *
1002 * When the callback is invoked, status indicates the result:
1003 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1004 * data is a RQUOTA1res structure.
1005 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1006 * data is the error string.
1007 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1008 * data is NULL.
1009 */
1010 EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);
1011
1012 /*
1013 * Call RQUOTA1/GETACTIVEQUOTA
1014 * Function returns
1015 * 0 : The call was initiated. The callback will be invoked when the call completes.
1016 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1017 *
1018 * When the callback is invoked, status indicates the result:
1019 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1020 * data is a RQUOTA1res structure.
1021 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1022 * data is the error string.
1023 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1024 * data is NULL.
1025 */
1026 EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);
1027
1028
1029
1030
1031 /*
1032 * Call RQUOTA2/NULL
1033 * Function returns
1034 * 0 : The call was initiated. The callback will be invoked when the call completes.
1035 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1036 *
1037 * When the callback is invoked, status indicates the result:
1038 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1039 * data is NULL.
1040 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1041 * data is the error string.
1042 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1043 * data is NULL.
1044 */
1045 int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1046
1047 /*
1048 * Call RQUOTA2/GETQUOTA
1049 * Function returns
1050 * 0 : The call was initiated. The callback will be invoked when the call completes.
1051 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1052 *
1053 * When the callback is invoked, status indicates the result:
1054 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1055 * data is a RQUOTA1res structure.
1056 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1057 * data is the error string.
1058 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1059 * data is NULL.
1060 */
1061 int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int type, int uid, void *private_data);
1062
1063 /*
1064 * Call RQUOTA2/GETACTIVEQUOTA
1065 * Function returns
1066 * 0 : The call was initiated. The callback will be invoked when the call completes.
1067 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1068 *
1069 * When the callback is invoked, status indicates the result:
1070 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1071 * data is a RQUOTA1res structure.
1072 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1073 * data is the error string.
1074 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1075 * data is NULL.
1076 */
1077 int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int type, int uid, void *private_data);
1078
1079
1080
1081
1082
1083
1084 /*
1085 * NFSACL functions
1086 */
1087
1088 /*
1089 * Call NFSACL/NULL
1090 * Call the NULL procedure for the NFSACL
1091 *
1092 * Function returns
1093 * 0 : The call was initiated. The callback will be invoked when the call completes.
1094 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1095 *
1096 * When the callback is invoked, status indicates the result:
1097 * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
1098 * data is NULL
1099 * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon.
1100 * data is the error string.
1101 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1102 * data is NULL.
1103 */
1104 EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1105
1106 /*
1107 * Call NFSACL/GETACL
1108 *
1109 * Function returns
1110 * 0 : The call was initiated. The callback will be invoked when the call completes.
1111 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1112 *
1113 * When the callback is invoked, status indicates the result:
1114 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1115 * data is a GETACL3res pointer
1116 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1117 * data is the error string.
1118 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1119 * data is NULL.
1120 */
1121 struct GETACL3args;
1122 EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
1123
1124
1125
1126 /*
1127 * Call NFSACL/SETACL
1128 *
1129 * Function returns
1130 * 0 : The call was initiated. The callback will be invoked when the call completes.
1131 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1132 *
1133 * When the callback is invoked, status indicates the result:
1134 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
1135 * data is a SETACL3res pointer
1136 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
1137 * data is the error string.
1138 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1139 * data is NULL.
1140 */
1141 struct SETACL3args;
1142 EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
1143
1144
1145
1146
1147 /*
1148 * NLM functions
1149 */
1150 char *nlmstat4_to_str(int stat);
1151
1152 /*
1153 * Call NLM/NULL
1154 * Call the NULL procedure for the NLM protocol
1155 *
1156 * Function returns
1157 * 0 : The call was initiated. The callback will be invoked when the call completes.
1158 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1159 *
1160 * When the callback is invoked, status indicates the result:
1161 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1162 * data is NULL
1163 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1164 * data is the error string.
1165 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1166 * data is NULL.
1167 */
1168 EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1169
1170 /*
1171 * Call NLM/TEST
1172 * Call the TEST procedure for the NLM protocol
1173 *
1174 * Function returns
1175 * 0 : The call was initiated. The callback will be invoked when the call completes.
1176 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1177 *
1178 * When the callback is invoked, status indicates the result:
1179 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1180 * data is NLM4_TESTres
1181 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1182 * data is the error string.
1183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1184 * data is NULL.
1185 */
1186 struct NLM4_TESTargs;
1187 EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
1188
1189 /*
1190 * Call NLM/LOCK
1191 * Call the LOCK procedure for the NLM protocol
1192 *
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 nlm daemon.
1199 * data is NLM4_LOCKres
1200 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm 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 struct NLM4_LOCKargs;
1206 EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
1207
1208 /*
1209 * Call NLM/CANCEL
1210 * Call the CANCEL procedure for the NLM protocol
1211 *
1212 * Function returns
1213 * 0 : The call was initiated. The callback will be invoked when the call completes.
1214 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1215 *
1216 * When the callback is invoked, status indicates the result:
1217 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1218 * data is NLM4_CANCres
1219 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1220 * data is the error string.
1221 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1222 * data is NULL.
1223 */
1224 struct NLM4_CANCargs;
1225 EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
1226
1227 /*
1228 * Call NLM/UNLOCK
1229 * Call the UNLOCK procedure for the NLM protocol
1230 *
1231 * Function returns
1232 * 0 : The call was initiated. The callback will be invoked when the call completes.
1233 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1234 *
1235 * When the callback is invoked, status indicates the result:
1236 * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon.
1237 * data is NLM4_UNLOCKres
1238 * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon.
1239 * data is the error string.
1240 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1241 * data is NULL.
1242 */
1243 struct NLM4_UNLOCKargs;
1244 EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
1245
1246 /*
1247 * NSM functions
1248 */
1249 char *nsmstat1_to_str(int stat);
1250
1251 /*
1252 * Call NSM/NULL
1253 * Call the NULL procedure for the NSM protocol
1254 *
1255 * Function returns
1256 * 0 : The call was initiated. The callback will be invoked when the call completes.
1257 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1258 *
1259 * When the callback is invoked, status indicates the result:
1260 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1261 * data is NULL
1262 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1263 * data is the error string.
1264 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1265 * data is NULL.
1266 */
1267 EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1268
1269 /*
1270 * Call NSM/STAT
1271 * Call the STAT procedure for the NSM protocol
1272 *
1273 * Function returns
1274 * 0 : The call was initiated. The callback will be invoked when the call completes.
1275 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1276 *
1277 * When the callback is invoked, status indicates the result:
1278 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1279 * data is NSM1_STATres
1280 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1281 * data is the error string.
1282 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1283 * data is NULL.
1284 */
1285 struct NSM1_STATargs;
1286 EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
1287
1288 /*
1289 * Call NSM/MON
1290 * Call the MON procedure for the NSM protocol
1291 *
1292 * Function returns
1293 * 0 : The call was initiated. The callback will be invoked when the call completes.
1294 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1295 *
1296 * When the callback is invoked, status indicates the result:
1297 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1298 * data is NSM1_MONres
1299 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1300 * data is the error string.
1301 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1302 * data is NULL.
1303 */
1304 struct NSM1_MONargs;
1305 EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
1306
1307 /*
1308 * Call NSM/UNMON
1309 * Call the UNMON procedure for the NSM protocol
1310 *
1311 * Function returns
1312 * 0 : The call was initiated. The callback will be invoked when the call completes.
1313 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1314 *
1315 * When the callback is invoked, status indicates the result:
1316 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1317 * data is NSM1_UNMONres
1318 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1319 * data is the error string.
1320 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1321 * data is NULL.
1322 */
1323 struct NSM1_UNMONargs;
1324 EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
1325
1326 /*
1327 * Call NSM/UNMONALL
1328 * Call the UNMONALL procedure for the NSM protocol
1329 *
1330 * Function returns
1331 * 0 : The call was initiated. The callback will be invoked when the call completes.
1332 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1333 *
1334 * When the callback is invoked, status indicates the result:
1335 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1336 * data is NSM1_UNMONALLres
1337 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1338 * data is the error string.
1339 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1340 * data is NULL.
1341 */
1342 struct NSM1_UNMONALLargs;
1343 EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
1344
1345 /*
1346 * Call NSM/SIMUCRASH
1347 * Call the SIMUCRASH procedure for the NSM protocol
1348 *
1349 * Function returns
1350 * 0 : The call was initiated. The callback will be invoked when the call completes.
1351 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1352 *
1353 * When the callback is invoked, status indicates the result:
1354 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1355 * data is NULL
1356 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1357 * data is the error string.
1358 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1359 * data is NULL.
1360 */
1361 EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1362
1363 /*
1364 * Call NSM/NOTIFY
1365 * Call the NOTIFY procedure for the NSM protocol
1366 *
1367 * Function returns
1368 * 0 : The call was initiated. The callback will be invoked when the call completes.
1369 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
1370 *
1371 * When the callback is invoked, status indicates the result:
1372 * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
1373 * data is NULL
1374 * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
1375 * data is the error string.
1376 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
1377 * data is NULL.
1378 */
1379 struct NSM1_NOTIFYargs;
1380 EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
1381
1382 #endif