NFS: Add new function signatures for rpc_nfs3_ that takes *3args arguments
[deb_libnfs.git] / include / nfsc / libnfs-raw.h
CommitLineData
84004dbf
RS
1/*
2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>.
16*/
17/*
18 * This is the lowlevel interface to access NFS resources.
19 * Through this interface you have access to the full gamut of nfs and nfs related
20 * protocol as well as the XDR encoded/decoded structures.
21 */
f9bb21ad
RS
22#ifndef _LIBNFS_RAW_H_
23#define _LIBNFS_RAW_H_
24
84004dbf 25#include <stdint.h>
e803ae57 26#include <nfsc/libnfs-zdr.h>
84004dbf
RS
27
28struct rpc_data {
29 int size;
30 unsigned char *data;
31};
32
33struct rpc_context;
34struct rpc_context *rpc_init_context(void);
35void rpc_destroy_context(struct rpc_context *rpc);
36
67ba2239 37void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
84004dbf
RS
38
39int rpc_get_fd(struct rpc_context *rpc);
40int rpc_which_events(struct rpc_context *rpc);
41int rpc_service(struct rpc_context *rpc, int revents);
42char *rpc_get_error(struct rpc_context *rpc);
83aa785d 43int rpc_queue_length(struct rpc_context *rpc);
84004dbf 44
fa3c25be
RS
45/* Utility function to get an RPC context from a NFS context. Useful for doing low level NFSACL
46 * calls on a NFS context.
47 */
48struct rpc_context *nfs_get_rpc_context(struct nfs_context *nfs);
49
50/* This function returns the nfs_fh3 structure from a nfsfh structure.
51 This allows to use a file onened with nfs_open() together with low-level
52 rpc functions that thake a nfs filehandle
53*/
54struct nfs_fh3 *nfs_get_fh(struct nfsfh *nfsfh);
84004dbf 55
3b943d2f
RS
56/* Control what the next XID value to be used on the context will be.
57 This can be used when multiple contexts are used to the same server
58 to avoid that the two contexts have xid collissions.
59 */
60void rpc_set_next_xid(struct rpc_context *rpc, uint32_t xid);
61
84004dbf
RS
62#define RPC_STATUS_SUCCESS 0
63#define RPC_STATUS_ERROR 1
64#define RPC_STATUS_CANCEL 2
65
84004dbf
RS
66/*
67 * Async connection to the tcp port at server:port.
68 * Function returns
69 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
70 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
71 *
72 * When the callback is invoked, status indicates the result:
73 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
74 * data is NULL.
75 * RPC_STATUS_ERROR : The connection failed to establish.
76 * data is the erro string.
77 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
78 * : data is NULL.
79 */
80int rpc_connect_async(struct rpc_context *rpc, const char *server, int port, rpc_cb cb, void *private_data);
8733f38d
RS
81/*
82 * Async function to connect to a specific RPC program/version
83 * Function returns
84 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
85 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
86 *
87 * When the callback is invoked, status indicates the result:
88 * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
89 * data is NULL.
90 * RPC_STATUS_ERROR : The connection failed to establish.
91 * data is the erro string.
92 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
93 * : data is NULL.
94 */
95int rpc_connect_program_async(struct rpc_context *rpc, char *server, int program, int version, rpc_cb cb, void *private_data);
84004dbf
RS
96/*
97 * When disconnecting a connection in flight. All commands in flight will be called with the callback
98 * and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
99 */
100int rpc_disconnect(struct rpc_context *rpc, char *error);
101
84004dbf
RS
102
103/*
104 * PORTMAP FUNCTIONS
105 */
106
107/*
108 * Call PORTMAPPER/NULL
109 * Function returns
110 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
111 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
112 *
113 * When the callback is invoked, status indicates the result:
114 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
115 * data is NULL.
116 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
117 * data is the error string.
118 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
119 * data is NULL.
120 */
21668dce 121EXTERN int rpc_pmap_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
122
123
124/*
125 * Call PORTMAPPER/GETPORT.
126 * Function returns
127 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
128 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
129 *
130 * When the callback is invoked, status indicates the result:
131 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
132 * data is a (uint32_t *), containing the port returned.
133 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
134 * data is the error string.
135 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
136 * data is NULL.
137 */
463d59bf 138EXTERN int rpc_pmap_getport_async(struct rpc_context *rpc, int program, int version, int protocol, rpc_cb cb, void *private_data);
84004dbf 139
1fbe4080
RS
140/*
141 * Call PORTMAPPER/SET
142 * Function returns
143 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
144 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
145 *
146 * When the callback is invoked, status indicates the result:
147 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
148 * data is a (uint32_t *), containing status
149 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
150 * data is the error string.
151 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
152 * data is NULL.
153 */
463d59bf 154EXTERN int rpc_pmap_set_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
1fbe4080
RS
155
156/*
157 * Call PORTMAPPER/UNSET
158 * Function returns
159 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
160 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
161 *
162 * When the callback is invoked, status indicates the result:
163 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon.
164 * data is a (uint32_t *), containing status
165 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
166 * data is the error string.
167 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
168 * data is NULL.
169 */
463d59bf 170EXTERN int rpc_pmap_unset_async(struct rpc_context *rpc, int program, int version, int protocol, int port, rpc_cb cb, void *private_data);
84004dbf 171
fd59fd0d
RS
172/*
173 * Call PORTMAPPER/CALLIT.
174 * Function returns
175 * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
176 * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
177 *
178 * When the callback is invoked, status indicates the result:
179 * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon
180 * data is a 'pmap_call_result' pointer.
181 * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper.
182 * data is the error string.
183 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
184 * data is NULL.
185 */
463d59bf 186EXTERN int rpc_pmap_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data);
84004dbf
RS
187
188/*
189 * MOUNT FUNCTIONS
190 */
191char *mountstat3_to_str(int stat);
192int 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 */
21668dce 208EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
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 */
21668dce 224EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *export, void *private_data);
84004dbf
RS
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 */
21668dce 240EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
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 */
21668dce 256EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *export, void *private_data);
84004dbf
RS
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 */
21668dce 272EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
273
274/*
275 * Call MOUNT/EXPORT
7f0242ca
RS
276 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
277 * returned structures.
278 *
84004dbf
RS
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.
7f0242ca
RS
285 * data is a pointer to an exports pointer:
286 * exports export = *(exports *)data;
84004dbf
RS
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 */
21668dce 292EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
293
294
295
296
297/*
463d59bf 298 * NFS v3 FUNCTIONS
84004dbf
RS
299 */
300struct nfs_fh3;
301char *nfsstat3_to_str(int error);
302int nfsstat3_to_errno(int error);
303
304/*
463d59bf 305 * Call NFS3/NULL
84004dbf
RS
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 */
463d59bf 318EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
21668dce 319EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
84004dbf
RS
320
321/*
463d59bf 322 * Call NFS3/GETATTR
84004dbf
RS
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 */
463d59bf
RS
335struct GETATTR3args;
336EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data);
21668dce 337EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 338
6f914247 339/*
463d59bf 340 * Call NFS3/PATHCONF
6f914247
RS
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 */
463d59bf
RS
353struct PATHCONF3args;
354EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data);
21668dce 355EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
6f914247 356
84004dbf 357/*
463d59bf 358 * Call NFS3/LOOKUP
84004dbf
RS
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 */
463d59bf
RS
371struct LOOKUP3args;
372EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data);
21668dce 373EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf
RS
374
375/*
463d59bf 376 * Call NFS3/ACCESS
84004dbf
RS
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 */
463d59bf
RS
389struct ACCESS3args;
390EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data);
21668dce 391EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data);
84004dbf
RS
392
393/*
463d59bf 394 * Call NFS3/READ
84004dbf
RS
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.
b426ef04 401 * data is READ3res
84004dbf
RS
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 */
463d59bf
RS
407struct READ3args;
408EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data);
21668dce 409EXTERN int rpc_nfs_read_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, uint64_t offset, uint64_t count, void *private_data);
84004dbf
RS
410
411/*
463d59bf 412 * Call NFS3/WRITE
84004dbf
RS
413 * Function returns
414 * 0 : The call was initiated. The callback will be invoked when the call completes.
415 * <0 : An error occured when trying to set up the call. The callback will not be invoked.
416 *
417 * When the callback is invoked, status indicates the result:
418 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
419 * data is 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 */
463d59bf
RS
425struct WRITE3args;
426EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data);
21668dce 427EXTERN int rpc_nfs_write_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *buf, uint64_t offset, uint64_t count, int stable_how, void *private_data);
84004dbf
RS
428
429/*
463d59bf 430 * Call NFS3/COMMIT
84004dbf
RS
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 */
463d59bf
RS
443struct COMMIT3args;
444EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data);
21668dce 445EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 446
84004dbf 447/*
463d59bf 448 * Call NFS3/SETATTR
84004dbf
RS
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 */
461struct SETATTR3args;
463d59bf 462EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
21668dce 463EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data);
84004dbf 464
84004dbf 465/*
463d59bf 466 * Call NFS3/MKDIR
84004dbf
RS
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 */
7edc9026 479struct MKDIR3args;
463d59bf 480EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
21668dce 481EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data);
84004dbf 482
84004dbf 483/*
463d59bf 484 * Call NFS3/RMDIR
84004dbf
RS
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 */
463d59bf
RS
497struct RMDIR3args;
498EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data);
21668dce 499EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data);
84004dbf 500
84004dbf 501/*
463d59bf 502 * Call NFS3/CREATE
84004dbf
RS
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 */
c985c015 515struct CREATE3args;
463d59bf 516EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
21668dce 517EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data);
84004dbf 518
1ec6b50a 519/*
463d59bf 520 * Call NFS3/MKNOD
1ec6b50a
RS
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 */
463d59bf
RS
533struct MKNOD3args;
534EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data);
21668dce 535EXTERN int rpc_nfs_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *file, int mode, int major, int minor, void *private_data);
84004dbf 536
84004dbf 537/*
463d59bf 538 * Call NFS3/REMOVE
84004dbf
RS
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 */
463d59bf
RS
551struct REMOVE3args;
552EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data);
21668dce 553EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data);
84004dbf 554
84004dbf 555/*
463d59bf 556 * Call NFS3/READDIR
84004dbf
RS
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 */
463d59bf
RS
569struct READDIR3args;
570EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data);
21668dce 571EXTERN int rpc_nfs_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, uint64_t cookie, char *cookieverf, int count, void *private_data);
84004dbf 572
f390f181 573/*
463d59bf 574 * Call NFS3/READDIRPLUS
f390f181
RS
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 */
463d59bf
RS
587struct READDIRPLUS3args;
588EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data);
21668dce 589EXTERN int rpc_nfs_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, uint64_t cookie, char *cookieverf, int count, void *private_data);
f390f181 590
84004dbf 591/*
463d59bf 592 * Call NFS3/FSSTAT
84004dbf
RS
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 */
463d59bf
RS
605struct FSSTAT3args;
606EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data);
21668dce 607EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
84004dbf 608
1058201e 609/*
463d59bf 610 * Call NFS3/FSINFO
1058201e
RS
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 */
463d59bf
RS
623struct FSINFO3args;
624EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data);
21668dce 625EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data);
1058201e 626
84004dbf 627/*
463d59bf 628 * Call NFS3/READLINK
84004dbf
RS
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 */
16104b27 641struct READLINK3args;
463d59bf 642EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
21668dce 643EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data);
84004dbf 644
84004dbf 645/*
463d59bf 646 * Call NFS3/SYMLINK
84004dbf
RS
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 */
8e255816 659struct SYMLINK3args;
463d59bf 660EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
21668dce 661EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data);
84004dbf 662
84004dbf 663/*
463d59bf 664 * Call NFS3/RENAME
84004dbf
RS
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 */
463d59bf
RS
677struct RENAME3args;
678EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data);
21668dce 679EXTERN int rpc_nfs_rename_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *olddir, char *oldname, struct nfs_fh3 *newdir, char *newname, void *private_data);
84004dbf 680
84004dbf 681/*
463d59bf 682 * Call NFS3/LINK
84004dbf
RS
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 */
463d59bf
RS
695struct LINK3args;
696EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data);
21668dce 697EXTERN int rpc_nfs_link_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *file, struct nfs_fh3 *newdir, char *newname, void *private_data);
84004dbf
RS
698
699
05a777d9
RS
700/*
701 * RQUOTA FUNCTIONS
702 */
703char *rquotastat_to_str(int error);
704int 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 */
21668dce 720EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
05a777d9
RS
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 */
21668dce 736EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);
19e74f5a
RS
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 */
21668dce 752EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);
77c23b46
RS
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 */
771int 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 */
787int 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 */
803int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int type, int uid, void *private_data);
3847f8f6
RS
804
805
806
6916a665
RS
807
808
809
810/*
811 * NFSACL functions
812 */
813
3847f8f6
RS
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 */
21668dce 830EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
3847f8f6
RS
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:
fa3c25be 840 * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon.
3847f8f6 841 * data is a GETACL3res pointer
fa3c25be 842 * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon.
3847f8f6
RS
843 * data is the error string.
844 * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
845 * data is NULL.
846 */
0118a5f0 847struct GETACL3args;
21668dce 848EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data);
3847f8f6 849
fa3c25be
RS
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 */
867struct SETACL3args;
21668dce 868EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data);
6916a665
RS
869
870
871
872
873/*
874 * NLM functions
875 */
876char *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 */
463d59bf 894EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
e01ed6a2
RS
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 */
912struct NLM4_TESTargs;
463d59bf 913EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data);
e01ed6a2 914
a171d4da
RS
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 */
931struct NLM4_LOCKargs;
463d59bf 932EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data);
a171d4da
RS
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 */
950struct NLM4_CANCargs;
463d59bf 951EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data);
a171d4da
RS
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 */
969struct NLM4_UNLOCKargs;
463d59bf 970EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
f9bb21ad 971
ed09b567
RS
972/*
973 * NSM functions
974 */
975char *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 */
463d59bf 993EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
ed09b567 994
1e7a5136
RS
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 */
1011struct NSM1_STATargs;
463d59bf 1012EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
1e7a5136
RS
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 */
1030struct NSM1_MONargs;
463d59bf 1031EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
1e7a5136
RS
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 */
1049struct NSM1_UNMONargs;
463d59bf 1050EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
1e7a5136
RS
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 */
1068struct NSM1_UNMONALLargs;
463d59bf 1069EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
1e7a5136
RS
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 */
463d59bf 1087EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
1e7a5136
RS
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 */
1105struct NSM1_NOTIFYargs;
463d59bf 1106EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
ed09b567 1107
f9bb21ad 1108#endif