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