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 | ||
d731e94c RS |
242 | /* |
243 | * Call PORTMAPPER3/SET. | |
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 uint32_t * | |
251 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
252 | * data is the error string. | |
253 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
254 | * data is NULL. | |
255 | */ | |
256 | struct pmap3_mapping; | |
257 | EXTERN int rpc_pmap3_set_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data); | |
258 | ||
259 | /* | |
260 | * Call PORTMAPPER3/UNSET. | |
261 | * Function returns | |
262 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
263 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
264 | * | |
265 | * When the callback is invoked, status indicates the result: | |
266 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
267 | * data is uint32_t * | |
268 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
269 | * data is the error string. | |
270 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
271 | * data is NULL. | |
272 | */ | |
273 | EXTERN int rpc_pmap3_unset_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data); | |
274 | ||
7fbedfde RS |
275 | /* |
276 | * Call PORTMAPPER3/GETADDR. | |
277 | * Function returns | |
278 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
279 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
280 | * | |
281 | * When the callback is invoked, status indicates the result: | |
282 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
283 | * data is struct pmap3_getaddr_result. | |
284 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
285 | * data is the error string. | |
286 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
287 | * data is NULL. | |
288 | */ | |
7fbedfde RS |
289 | EXTERN int rpc_pmap3_getaddr_async(struct rpc_context *rpc, struct pmap3_mapping *map, rpc_cb cb, void *private_data); |
290 | ||
4edd7830 RS |
291 | /* |
292 | * Call PORTMAPPER3/DUMP. | |
293 | * Function returns | |
294 | * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked. | |
295 | * <0 : An error occured when trying to set up the connection. The callback will not be invoked. | |
296 | * | |
297 | * When the callback is invoked, status indicates the result: | |
298 | * RPC_STATUS_SUCCESS : We got a successful response from the portmapper daemon. | |
299 | * data is struct pmap3_dump_result. | |
300 | * RPC_STATUS_ERROR : An error occured when trying to contact the portmapper. | |
301 | * data is the error string. | |
302 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
303 | * data is NULL. | |
304 | */ | |
305 | EXTERN int rpc_pmap3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
306 | ||
307 | ||
3751901f | 308 | /* |
04e90341 | 309 | * MOUNT v3 FUNCTIONS |
84004dbf RS |
310 | */ |
311 | char *mountstat3_to_str(int stat); | |
312 | int mountstat3_to_errno(int error); | |
313 | ||
314 | /* | |
04e90341 | 315 | * Call MOUNT3/NULL |
84004dbf RS |
316 | * Function returns |
317 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
318 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
319 | * | |
320 | * When the callback is invoked, status indicates the result: | |
321 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
322 | * data is NULL. | |
323 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
324 | * data is the error string. | |
325 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
326 | * data is NULL. | |
327 | */ | |
04e90341 | 328 | EXTERN int rpc_mount3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 329 | EXTERN int rpc_mount_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
330 | |
331 | /* | |
04e90341 | 332 | * Call MOUNT3/MNT |
84004dbf RS |
333 | * Function returns |
334 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
335 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
336 | * | |
337 | * When the callback is invoked, status indicates the result: | |
338 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
339 | * data is union mountres3. | |
340 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
341 | * data is the error string. | |
342 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
343 | * data is NULL. | |
344 | */ | |
e94d5a7d AR |
345 | EXTERN int rpc_mount3_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
346 | EXTERN int rpc_mount_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); | |
84004dbf RS |
347 | |
348 | /* | |
04e90341 | 349 | * Call MOUNT3/DUMP |
84004dbf RS |
350 | * Function returns |
351 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
352 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
353 | * | |
354 | * When the callback is invoked, status indicates the result: | |
355 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
356 | * data is a mountlist. | |
357 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
358 | * data is the error string. | |
359 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
360 | * data is NULL. | |
361 | */ | |
04e90341 | 362 | EXTERN int rpc_mount3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 363 | EXTERN int rpc_mount_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
364 | |
365 | /* | |
04e90341 | 366 | * Call MOUNT3/UMNT |
84004dbf RS |
367 | * Function returns |
368 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
369 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
370 | * | |
371 | * When the callback is invoked, status indicates the result: | |
372 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
373 | * data NULL. | |
374 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
375 | * data is the error string. | |
376 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
377 | * data is NULL. | |
378 | */ | |
e94d5a7d AR |
379 | EXTERN int rpc_mount3_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
380 | EXTERN int rpc_mount_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); | |
84004dbf RS |
381 | |
382 | /* | |
04e90341 | 383 | * Call MOUNT3/UMNTALL |
84004dbf RS |
384 | * Function returns |
385 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
386 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
387 | * | |
388 | * When the callback is invoked, status indicates the result: | |
389 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
390 | * data NULL. | |
391 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
392 | * data is the error string. | |
393 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
394 | * data is NULL. | |
395 | */ | |
04e90341 | 396 | EXTERN int rpc_mount3_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 397 | EXTERN int rpc_mount_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
398 | |
399 | /* | |
04e90341 | 400 | * Call MOUNT3/EXPORT |
7f0242ca RS |
401 | * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the |
402 | * returned structures. | |
403 | * | |
84004dbf RS |
404 | * Function returns |
405 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
406 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
407 | * | |
408 | * When the callback is invoked, status indicates the result: | |
409 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
7f0242ca RS |
410 | * data is a pointer to an exports pointer: |
411 | * exports export = *(exports *)data; | |
84004dbf RS |
412 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. |
413 | * data is the error string. | |
414 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
415 | * data is NULL. | |
416 | */ | |
04e90341 | 417 | EXTERN int rpc_mount3_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 418 | EXTERN int rpc_mount_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf | 419 | |
3751901f | 420 | /* |
04e90341 RS |
421 | * MOUNT v1 FUNCTIONS (Used with NFSv2) |
422 | */ | |
423 | /* | |
424 | * Call MOUNT1/NULL | |
425 | * Function returns | |
426 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
427 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
428 | * | |
429 | * When the callback is invoked, status indicates the result: | |
430 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
431 | * data is NULL. | |
432 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
433 | * data is the error string. | |
434 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
435 | * data is NULL. | |
436 | */ | |
437 | EXTERN int rpc_mount1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
438 | ||
439 | /* | |
440 | * Call MOUNT1/MNT | |
441 | * Function returns | |
442 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
443 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
444 | * | |
445 | * When the callback is invoked, status indicates the result: | |
446 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
447 | * data is union mountres1. | |
448 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
449 | * data is the error string. | |
450 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
451 | * data is NULL. | |
452 | */ | |
e94d5a7d | 453 | EXTERN int rpc_mount1_mnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
04e90341 RS |
454 | |
455 | /* | |
456 | * Call MOUNT1/DUMP | |
457 | * Function returns | |
458 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
459 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
460 | * | |
461 | * When the callback is invoked, status indicates the result: | |
462 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
463 | * data is a mountlist. | |
464 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
465 | * data is the error string. | |
466 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
467 | * data is NULL. | |
468 | */ | |
469 | EXTERN int rpc_mount1_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
84004dbf | 470 | |
04e90341 RS |
471 | /* |
472 | * Call MOUNT1/UMNT | |
473 | * Function returns | |
474 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
475 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
476 | * | |
477 | * When the callback is invoked, status indicates the result: | |
478 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
479 | * data NULL. | |
480 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
481 | * data is the error string. | |
482 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
483 | * data is NULL. | |
484 | */ | |
e94d5a7d | 485 | EXTERN int rpc_mount1_umnt_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, void *private_data); |
04e90341 RS |
486 | |
487 | /* | |
488 | * Call MOUNT1/UMNTALL | |
489 | * Function returns | |
490 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
491 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
492 | * | |
493 | * When the callback is invoked, status indicates the result: | |
494 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
495 | * data NULL. | |
496 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
497 | * data is the error string. | |
498 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
499 | * data is NULL. | |
500 | */ | |
501 | EXTERN int rpc_mount1_umntall_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
502 | ||
503 | /* | |
504 | * Call MOUNT1/EXPORT | |
505 | * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the | |
506 | * returned structures. | |
507 | * | |
508 | * Function returns | |
509 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
510 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
511 | * | |
512 | * When the callback is invoked, status indicates the result: | |
513 | * RPC_STATUS_SUCCESS : We got a successful response from the mount daemon. | |
514 | * data is a pointer to an exports pointer: | |
515 | * exports export = *(exports *)data; | |
516 | * RPC_STATUS_ERROR : An error occured when trying to contact the mount daemon. | |
517 | * data is the error string. | |
518 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
519 | * data is NULL. | |
520 | */ | |
521 | EXTERN int rpc_mount1_export_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
84004dbf RS |
522 | |
523 | ||
3751901f | 524 | /* |
463d59bf | 525 | * NFS v3 FUNCTIONS |
84004dbf RS |
526 | */ |
527 | struct nfs_fh3; | |
528 | char *nfsstat3_to_str(int error); | |
529 | int nfsstat3_to_errno(int error); | |
530 | ||
531 | /* | |
463d59bf | 532 | * Call NFS3/NULL |
84004dbf RS |
533 | * Function returns |
534 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
535 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
536 | * | |
537 | * When the callback is invoked, status indicates the result: | |
538 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
539 | * data is NULL. | |
540 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
541 | * data is the error string. | |
542 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
543 | * data is NULL. | |
544 | */ | |
463d59bf | 545 | EXTERN int rpc_nfs3_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
21668dce | 546 | EXTERN int rpc_nfs_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
84004dbf RS |
547 | |
548 | /* | |
463d59bf | 549 | * Call NFS3/GETATTR |
84004dbf RS |
550 | * Function returns |
551 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
552 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
553 | * | |
554 | * When the callback is invoked, status indicates the result: | |
555 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
556 | * data is GETATTR3res | |
557 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
558 | * data is the error string. | |
559 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
560 | * data is NULL. | |
561 | */ | |
463d59bf RS |
562 | struct GETATTR3args; |
563 | EXTERN int rpc_nfs3_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR3args *args, void *private_data); | |
21668dce | 564 | EXTERN int rpc_nfs_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
84004dbf | 565 | |
6f914247 | 566 | /* |
463d59bf | 567 | * Call NFS3/PATHCONF |
6f914247 RS |
568 | * Function returns |
569 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
570 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
571 | * | |
572 | * When the callback is invoked, status indicates the result: | |
573 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
574 | * data is PATHCONF3res | |
575 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
576 | * data is the error string. | |
577 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
578 | * data is NULL. | |
579 | */ | |
463d59bf RS |
580 | struct PATHCONF3args; |
581 | EXTERN int rpc_nfs3_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct PATHCONF3args *args, void *private_data); | |
21668dce | 582 | EXTERN int rpc_nfs_pathconf_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
6f914247 | 583 | |
84004dbf | 584 | /* |
463d59bf | 585 | * Call NFS3/LOOKUP |
84004dbf RS |
586 | * Function returns |
587 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
588 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
589 | * | |
590 | * When the callback is invoked, status indicates the result: | |
591 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
592 | * data is LOOKUP3res | |
593 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
594 | * data is the error string. | |
595 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
596 | * data is NULL. | |
597 | */ | |
463d59bf RS |
598 | struct LOOKUP3args; |
599 | EXTERN int rpc_nfs3_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP3args *args, void *private_data); | |
21668dce | 600 | EXTERN int rpc_nfs_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data); |
84004dbf RS |
601 | |
602 | /* | |
463d59bf | 603 | * Call NFS3/ACCESS |
84004dbf RS |
604 | * Function returns |
605 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
606 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
607 | * | |
608 | * When the callback is invoked, status indicates the result: | |
609 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
610 | * data is ACCESS3res | |
611 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
612 | * data is the error string. | |
613 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
614 | * data is NULL. | |
615 | */ | |
463d59bf RS |
616 | struct ACCESS3args; |
617 | EXTERN int rpc_nfs3_access_async(struct rpc_context *rpc, rpc_cb cb, struct ACCESS3args *args, void *private_data); | |
21668dce | 618 | EXTERN int rpc_nfs_access_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, int access, void *private_data); |
84004dbf RS |
619 | |
620 | /* | |
463d59bf | 621 | * Call NFS3/READ |
84004dbf RS |
622 | * Function returns |
623 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
624 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
625 | * | |
626 | * When the callback is invoked, status indicates the result: | |
627 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
b426ef04 | 628 | * data is READ3res |
84004dbf RS |
629 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. |
630 | * data is the error string. | |
631 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
632 | * data is NULL. | |
633 | */ | |
463d59bf RS |
634 | struct READ3args; |
635 | EXTERN int rpc_nfs3_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ3args *args, void *private_data); | |
21668dce | 636 | 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 |
637 | |
638 | /* | |
463d59bf | 639 | * Call NFS3/WRITE |
84004dbf RS |
640 | * Function returns |
641 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
642 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
643 | * | |
644 | * When the callback is invoked, status indicates the result: | |
645 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
646 | * data is WRITE3res * | |
647 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
648 | * data is the error string. | |
649 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
650 | * data is NULL. | |
651 | */ | |
463d59bf RS |
652 | struct WRITE3args; |
653 | EXTERN int rpc_nfs3_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE3args *args, void *private_data); | |
21668dce | 654 | 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 |
655 | |
656 | /* | |
463d59bf | 657 | * Call NFS3/COMMIT |
84004dbf RS |
658 | * Function returns |
659 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
660 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
661 | * | |
662 | * When the callback is invoked, status indicates the result: | |
663 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
664 | * data is COMMIT3res * | |
665 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
666 | * data is the error string. | |
667 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
668 | * data is NULL. | |
669 | */ | |
463d59bf RS |
670 | struct COMMIT3args; |
671 | EXTERN int rpc_nfs3_commit_async(struct rpc_context *rpc, rpc_cb cb, struct COMMIT3args *args, void *private_data); | |
21668dce | 672 | EXTERN int rpc_nfs_commit_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
84004dbf | 673 | |
84004dbf | 674 | /* |
463d59bf | 675 | * Call NFS3/SETATTR |
84004dbf RS |
676 | * Function returns |
677 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
678 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
679 | * | |
680 | * When the callback is invoked, status indicates the result: | |
681 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
682 | * data is SETATTR3res * | |
683 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
684 | * data is the error string. | |
685 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
686 | * data is NULL. | |
687 | */ | |
688 | struct SETATTR3args; | |
463d59bf | 689 | EXTERN int rpc_nfs3_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data); |
21668dce | 690 | EXTERN int rpc_nfs_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR3args *args, void *private_data); |
84004dbf | 691 | |
84004dbf | 692 | /* |
463d59bf | 693 | * Call NFS3/MKDIR |
84004dbf RS |
694 | * Function returns |
695 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
696 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
697 | * | |
698 | * When the callback is invoked, status indicates the result: | |
699 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
700 | * data is MKDIR3res * | |
701 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
702 | * data is the error string. | |
703 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
704 | * data is NULL. | |
705 | */ | |
7edc9026 | 706 | struct MKDIR3args; |
463d59bf | 707 | EXTERN int rpc_nfs3_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data); |
21668dce | 708 | EXTERN int rpc_nfs_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR3args *args, void *private_data); |
84004dbf | 709 | |
84004dbf | 710 | /* |
463d59bf | 711 | * Call NFS3/RMDIR |
84004dbf RS |
712 | * Function returns |
713 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
714 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
715 | * | |
716 | * When the callback is invoked, status indicates the result: | |
717 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
718 | * data is RMDIR3res * | |
719 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
720 | * data is the error string. | |
721 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
722 | * data is NULL. | |
723 | */ | |
463d59bf RS |
724 | struct RMDIR3args; |
725 | EXTERN int rpc_nfs3_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR3args *args, void *private_data); | |
21668dce | 726 | EXTERN int rpc_nfs_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *dir, void *private_data); |
84004dbf | 727 | |
84004dbf | 728 | /* |
463d59bf | 729 | * Call NFS3/CREATE |
84004dbf RS |
730 | * Function returns |
731 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
732 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
733 | * | |
734 | * When the callback is invoked, status indicates the result: | |
735 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
736 | * data is CREATE3res * | |
737 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
738 | * data is the error string. | |
739 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
740 | * data is NULL. | |
741 | */ | |
c985c015 | 742 | struct CREATE3args; |
463d59bf | 743 | EXTERN int rpc_nfs3_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data); |
21668dce | 744 | EXTERN int rpc_nfs_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE3args *args, void *private_data); |
84004dbf | 745 | |
1ec6b50a | 746 | /* |
463d59bf | 747 | * Call NFS3/MKNOD |
1ec6b50a RS |
748 | * Function returns |
749 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
750 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
751 | * | |
752 | * When the callback is invoked, status indicates the result: | |
753 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
754 | * data is MKNOD3res * | |
755 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
756 | * data is the error string. | |
757 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
758 | * data is NULL. | |
759 | */ | |
463d59bf RS |
760 | struct MKNOD3args; |
761 | EXTERN int rpc_nfs3_mknod_async(struct rpc_context *rpc, rpc_cb cb, struct MKNOD3args *args, void *private_data); | |
21668dce | 762 | 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 | 763 | |
84004dbf | 764 | /* |
463d59bf | 765 | * Call NFS3/REMOVE |
84004dbf RS |
766 | * Function returns |
767 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
768 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
769 | * | |
770 | * When the callback is invoked, status indicates the result: | |
771 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
772 | * data is REMOVE3res * | |
773 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
774 | * data is the error string. | |
775 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
776 | * data is NULL. | |
777 | */ | |
463d59bf RS |
778 | struct REMOVE3args; |
779 | EXTERN int rpc_nfs3_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE3args *args, void *private_data); | |
21668dce | 780 | EXTERN int rpc_nfs_remove_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, char *name, void *private_data); |
84004dbf | 781 | |
84004dbf | 782 | /* |
463d59bf | 783 | * Call NFS3/READDIR |
84004dbf RS |
784 | * Function returns |
785 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
786 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
787 | * | |
788 | * When the callback is invoked, status indicates the result: | |
789 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
790 | * data is READDIR3res * | |
791 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
792 | * data is the error string. | |
793 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
794 | * data is NULL. | |
795 | */ | |
463d59bf RS |
796 | struct READDIR3args; |
797 | EXTERN int rpc_nfs3_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR3args *args, void *private_data); | |
21668dce | 798 | 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 | 799 | |
f390f181 | 800 | /* |
463d59bf | 801 | * Call NFS3/READDIRPLUS |
f390f181 RS |
802 | * Function returns |
803 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
804 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
805 | * | |
806 | * When the callback is invoked, status indicates the result: | |
807 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
808 | * data is READDIRPLUS3res * | |
809 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
810 | * data is the error string. | |
811 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
812 | * data is NULL. | |
813 | */ | |
463d59bf RS |
814 | struct READDIRPLUS3args; |
815 | EXTERN int rpc_nfs3_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct READDIRPLUS3args *args, void *private_data); | |
21668dce | 816 | 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 | 817 | |
84004dbf | 818 | /* |
463d59bf | 819 | * Call NFS3/FSSTAT |
84004dbf RS |
820 | * Function returns |
821 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
822 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
823 | * | |
824 | * When the callback is invoked, status indicates the result: | |
825 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
826 | * data is FSSTAT3res | |
827 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
828 | * data is the error string. | |
829 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
830 | * data is NULL. | |
831 | */ | |
463d59bf RS |
832 | struct FSSTAT3args; |
833 | EXTERN int rpc_nfs3_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct FSSTAT3args *args, void *private_data); | |
21668dce | 834 | EXTERN int rpc_nfs_fsstat_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
84004dbf | 835 | |
1058201e | 836 | /* |
463d59bf | 837 | * Call NFS3/FSINFO |
1058201e RS |
838 | * Function returns |
839 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
840 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
841 | * | |
842 | * When the callback is invoked, status indicates the result: | |
843 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
844 | * data is FSINFO3res | |
845 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
846 | * data is the error string. | |
847 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
848 | * data is NULL. | |
849 | */ | |
463d59bf RS |
850 | struct FSINFO3args; |
851 | EXTERN int rpc_nfs3_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct FSINFO3args *args, void *private_data); | |
21668dce | 852 | EXTERN int rpc_nfs_fsinfo_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *fh, void *private_data); |
1058201e | 853 | |
84004dbf | 854 | /* |
463d59bf | 855 | * Call NFS3/READLINK |
84004dbf RS |
856 | * Function returns |
857 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
858 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
859 | * | |
860 | * When the callback is invoked, status indicates the result: | |
861 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
862 | * data is READLINK3res * | |
863 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
864 | * data is the error string. | |
865 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
866 | * data is NULL. | |
867 | */ | |
16104b27 | 868 | struct READLINK3args; |
463d59bf | 869 | EXTERN int rpc_nfs3_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data); |
21668dce | 870 | EXTERN int rpc_nfs_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK3args *args, void *private_data); |
84004dbf | 871 | |
84004dbf | 872 | /* |
463d59bf | 873 | * Call NFS3/SYMLINK |
84004dbf RS |
874 | * Function returns |
875 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
876 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
877 | * | |
878 | * When the callback is invoked, status indicates the result: | |
879 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
880 | * data is SYMLINK3res * | |
881 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
882 | * data is the error string. | |
883 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
884 | * data is NULL. | |
885 | */ | |
8e255816 | 886 | struct SYMLINK3args; |
463d59bf | 887 | EXTERN int rpc_nfs3_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data); |
21668dce | 888 | EXTERN int rpc_nfs_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK3args *args, void *private_data); |
84004dbf | 889 | |
84004dbf | 890 | /* |
463d59bf | 891 | * Call NFS3/RENAME |
84004dbf RS |
892 | * Function returns |
893 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
894 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
895 | * | |
896 | * When the callback is invoked, status indicates the result: | |
897 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
898 | * data is RENAME3res * | |
899 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
900 | * data is the error string. | |
901 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
902 | * data is NULL. | |
903 | */ | |
463d59bf RS |
904 | struct RENAME3args; |
905 | EXTERN int rpc_nfs3_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME3args *args, void *private_data); | |
21668dce | 906 | 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 | 907 | |
84004dbf | 908 | /* |
463d59bf | 909 | * Call NFS3/LINK |
84004dbf RS |
910 | * Function returns |
911 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
912 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
913 | * | |
914 | * When the callback is invoked, status indicates the result: | |
915 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
916 | * data is LINK3res * | |
917 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
918 | * data is the error string. | |
919 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
920 | * data is NULL. | |
921 | */ | |
463d59bf RS |
922 | struct LINK3args; |
923 | EXTERN int rpc_nfs3_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK3args *args, void *private_data); | |
21668dce | 924 | 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 | 925 | |
3751901f | 926 | /* |
f38aacf8 RS |
927 | * NFS v2 FUNCTIONS |
928 | */ | |
929 | ||
930 | /* | |
931 | * Call NFS2/NULL | |
932 | * Function returns | |
933 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
934 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
935 | * | |
936 | * When the callback is invoked, status indicates the result: | |
937 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
938 | * data is NULL. | |
939 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
940 | * data is the error string. | |
941 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
942 | * data is NULL. | |
943 | */ | |
944 | EXTERN int rpc_nfs2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
945 | ||
946 | /* | |
947 | * Call NFS2/GETATTR | |
948 | * Function returns | |
949 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
950 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
951 | * | |
952 | * When the callback is invoked, status indicates the result: | |
953 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
954 | * data is GETATTR2res | |
955 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
956 | * data is the error string. | |
957 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
958 | * data is NULL. | |
959 | */ | |
960 | struct GETATTR2args; | |
961 | EXTERN int rpc_nfs2_getattr_async(struct rpc_context *rpc, rpc_cb cb, struct GETATTR2args *args, void *private_data); | |
962 | ||
963 | /* | |
964 | * Call NFS2/SETATTR | |
965 | * Function returns | |
966 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
967 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
968 | * | |
969 | * When the callback is invoked, status indicates the result: | |
970 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
971 | * data is SETATTR2res * | |
972 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
973 | * data is the error string. | |
974 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
975 | * data is NULL. | |
976 | */ | |
977 | struct SETATTR2args; | |
978 | EXTERN int rpc_nfs2_setattr_async(struct rpc_context *rpc, rpc_cb cb, struct SETATTR2args *args, void *private_data); | |
979 | ||
980 | /* | |
981 | * Call NFS2/LOOKUP | |
982 | * Function returns | |
983 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
984 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
985 | * | |
986 | * When the callback is invoked, status indicates the result: | |
987 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
988 | * data is LOOKUP2res | |
989 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
990 | * data is the error string. | |
991 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
992 | * data is NULL. | |
993 | */ | |
994 | struct LOOKUP2args; | |
995 | EXTERN int rpc_nfs2_lookup_async(struct rpc_context *rpc, rpc_cb cb, struct LOOKUP2args *args, void *private_data); | |
996 | ||
997 | /* | |
998 | * Call NFS2/READLINK | |
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 nfs daemon. | |
1005 | * data is READLINK2res * | |
1006 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1007 | * data is the error string. | |
1008 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1009 | * data is NULL. | |
1010 | */ | |
1011 | struct READLINK2args; | |
1012 | EXTERN int rpc_nfs32_readlink_async(struct rpc_context *rpc, rpc_cb cb, struct READLINK2args *args, void *private_data); | |
1013 | ||
1014 | /* | |
1015 | * Call NFS2/READ | |
1016 | * Function returns | |
1017 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1018 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1019 | * | |
1020 | * When the callback is invoked, status indicates the result: | |
1021 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1022 | * data is READ2res | |
1023 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1024 | * data is the error string. | |
1025 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1026 | * data is NULL. | |
1027 | */ | |
1028 | struct READ2args; | |
1029 | EXTERN int rpc_nfs2_read_async(struct rpc_context *rpc, rpc_cb cb, struct READ2args *args, void *private_data); | |
1030 | ||
1031 | /* | |
1032 | * Call NFS2/WRITE | |
1033 | * Function returns | |
1034 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1035 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1036 | * | |
1037 | * When the callback is invoked, status indicates the result: | |
1038 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1039 | * data is WRITE2res * | |
1040 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1041 | * data is the error string. | |
1042 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1043 | * data is NULL. | |
1044 | */ | |
1045 | struct WRITE2args; | |
1046 | EXTERN int rpc_nfs2_write_async(struct rpc_context *rpc, rpc_cb cb, struct WRITE2args *args, void *private_data); | |
1047 | ||
1048 | /* | |
1049 | * Call NFS2/CREATE | |
1050 | * Function returns | |
1051 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1052 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1053 | * | |
1054 | * When the callback is invoked, status indicates the result: | |
1055 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1056 | * data is CREATE2res * | |
1057 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1058 | * data is the error string. | |
1059 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1060 | * data is NULL. | |
1061 | */ | |
1062 | struct CREATE2args; | |
1063 | EXTERN int rpc_nfs2_create_async(struct rpc_context *rpc, rpc_cb cb, struct CREATE2args *args, void *private_data); | |
1064 | ||
1065 | /* | |
1066 | * Call NFS2/REMOVE | |
1067 | * Function returns | |
1068 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1069 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1070 | * | |
1071 | * When the callback is invoked, status indicates the result: | |
1072 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1073 | * data is REMOVE2res * | |
1074 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1075 | * data is the error string. | |
1076 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1077 | * data is NULL. | |
1078 | */ | |
1079 | struct REMOVE2args; | |
1080 | EXTERN int rpc_nfs2_remove_async(struct rpc_context *rpc, rpc_cb cb, struct REMOVE2args *args, void *private_data); | |
1081 | ||
1082 | /* | |
1083 | * Call NFS2/RENAME | |
1084 | * Function returns | |
1085 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1086 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1087 | * | |
1088 | * When the callback is invoked, status indicates the result: | |
1089 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1090 | * data is RENAME2res * | |
1091 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1092 | * data is the error string. | |
1093 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1094 | * data is NULL. | |
1095 | */ | |
1096 | struct RENAME2args; | |
1097 | EXTERN int rpc_nfs2_rename_async(struct rpc_context *rpc, rpc_cb cb, struct RENAME2args *args, void *private_data); | |
1098 | ||
1099 | /* | |
1100 | * Call NFS2/LINK | |
1101 | * Function returns | |
1102 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1103 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1104 | * | |
1105 | * When the callback is invoked, status indicates the result: | |
1106 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1107 | * data is LINK2res * | |
1108 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1109 | * data is the error string. | |
1110 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1111 | * data is NULL. | |
1112 | */ | |
1113 | struct LINK2args; | |
1114 | EXTERN int rpc_nfs2_link_async(struct rpc_context *rpc, rpc_cb cb, struct LINK2args *args, void *private_data); | |
1115 | ||
1116 | /* | |
1117 | * Call NFS2/SYMLINK | |
1118 | * Function returns | |
1119 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1120 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1121 | * | |
1122 | * When the callback is invoked, status indicates the result: | |
1123 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1124 | * data is SYMLINK2res * | |
1125 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1126 | * data is the error string. | |
1127 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1128 | * data is NULL. | |
1129 | */ | |
1130 | struct SYMLINK2args; | |
1131 | EXTERN int rpc_nfs2_symlink_async(struct rpc_context *rpc, rpc_cb cb, struct SYMLINK2args *args, void *private_data); | |
1132 | ||
1133 | /* | |
1134 | * Call NFS2/MKDIR | |
1135 | * Function returns | |
1136 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1137 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1138 | * | |
1139 | * When the callback is invoked, status indicates the result: | |
1140 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1141 | * data is MKDIR2res * | |
1142 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1143 | * data is the error string. | |
1144 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1145 | * data is NULL. | |
1146 | */ | |
1147 | struct MKDIR2args; | |
1148 | EXTERN int rpc_nfs2_mkdir_async(struct rpc_context *rpc, rpc_cb cb, struct MKDIR2args *args, void *private_data); | |
1149 | ||
1150 | /* | |
1151 | * Call NFS2/RMDIR | |
1152 | * Function returns | |
1153 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1154 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1155 | * | |
1156 | * When the callback is invoked, status indicates the result: | |
1157 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1158 | * data is RMDIR2res * | |
1159 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1160 | * data is the error string. | |
1161 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1162 | * data is NULL. | |
1163 | */ | |
1164 | struct RMDIR2args; | |
1165 | EXTERN int rpc_nfs2_rmdir_async(struct rpc_context *rpc, rpc_cb cb, struct RMDIR2args *args, void *private_data); | |
1166 | ||
1167 | /* | |
1168 | * Call NFS2/READDIR | |
1169 | * Function returns | |
1170 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1171 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1172 | * | |
1173 | * When the callback is invoked, status indicates the result: | |
1174 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1175 | * data is READDIR2res * | |
1176 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1177 | * data is the error string. | |
1178 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1179 | * data is NULL. | |
1180 | */ | |
1181 | struct READDIR2args; | |
1182 | EXTERN int rpc_nfs2_readdir_async(struct rpc_context *rpc, rpc_cb cb, struct READDIR2args *args, void *private_data); | |
1183 | ||
1184 | /* | |
1185 | * Call NFS2/STATFS | |
1186 | * Function returns | |
1187 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1188 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1189 | * | |
1190 | * When the callback is invoked, status indicates the result: | |
1191 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1192 | * data is STATFS2res * | |
1193 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1194 | * data is the error string. | |
1195 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1196 | * data is NULL. | |
1197 | */ | |
1198 | struct STATFS2args; | |
1199 | EXTERN int rpc_nfs2_statfs_async(struct rpc_context *rpc, rpc_cb cb, struct STATFS2args *args, void *private_data); | |
84004dbf | 1200 | |
3751901f | 1201 | /* |
05a777d9 RS |
1202 | * RQUOTA FUNCTIONS |
1203 | */ | |
1204 | char *rquotastat_to_str(int error); | |
1205 | int rquotastat_to_errno(int error); | |
1206 | ||
1207 | /* | |
1208 | * Call RQUOTA1/NULL | |
1209 | * Function returns | |
1210 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1211 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1212 | * | |
1213 | * When the callback is invoked, status indicates the result: | |
1214 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1215 | * data is NULL. | |
1216 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1217 | * data is the error string. | |
1218 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1219 | * data is NULL. | |
1220 | */ | |
21668dce | 1221 | EXTERN int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
05a777d9 RS |
1222 | |
1223 | /* | |
1224 | * Call RQUOTA1/GETQUOTA | |
1225 | * Function returns | |
1226 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1227 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1228 | * | |
1229 | * When the callback is invoked, status indicates the result: | |
1230 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1231 | * data is a RQUOTA1res structure. | |
1232 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1233 | * data is the error string. | |
1234 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1235 | * data is NULL. | |
1236 | */ | |
e94d5a7d | 1237 | EXTERN int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data); |
19e74f5a RS |
1238 | |
1239 | /* | |
1240 | * Call RQUOTA1/GETACTIVEQUOTA | |
1241 | * Function returns | |
1242 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1243 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1244 | * | |
1245 | * When the callback is invoked, status indicates the result: | |
1246 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1247 | * data is a RQUOTA1res structure. | |
1248 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1249 | * data is the error string. | |
1250 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1251 | * data is NULL. | |
1252 | */ | |
e94d5a7d | 1253 | EXTERN int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int uid, void *private_data); |
77c23b46 RS |
1254 | |
1255 | ||
1256 | ||
1257 | ||
1258 | /* | |
1259 | * Call RQUOTA2/NULL | |
1260 | * Function returns | |
1261 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1262 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1263 | * | |
1264 | * When the callback is invoked, status indicates the result: | |
1265 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1266 | * data is NULL. | |
1267 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1268 | * data is the error string. | |
1269 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1270 | * data is NULL. | |
1271 | */ | |
1272 | int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); | |
1273 | ||
1274 | /* | |
1275 | * Call RQUOTA2/GETQUOTA | |
1276 | * Function returns | |
1277 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1278 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1279 | * | |
1280 | * When the callback is invoked, status indicates the result: | |
1281 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1282 | * data is a RQUOTA1res structure. | |
1283 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1284 | * data is the error string. | |
1285 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1286 | * data is NULL. | |
1287 | */ | |
e94d5a7d | 1288 | int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data); |
77c23b46 RS |
1289 | |
1290 | /* | |
1291 | * Call RQUOTA2/GETACTIVEQUOTA | |
1292 | * Function returns | |
1293 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1294 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1295 | * | |
1296 | * When the callback is invoked, status indicates the result: | |
1297 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1298 | * data is a RQUOTA1res structure. | |
1299 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1300 | * data is the error string. | |
1301 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1302 | * data is NULL. | |
1303 | */ | |
e94d5a7d | 1304 | int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *exportname, int type, int uid, void *private_data); |
3847f8f6 RS |
1305 | |
1306 | ||
1307 | ||
6916a665 RS |
1308 | |
1309 | ||
1310 | ||
1311 | /* | |
3751901f | 1312 | * NFSACL functions |
6916a665 RS |
1313 | */ |
1314 | ||
3847f8f6 RS |
1315 | /* |
1316 | * Call NFSACL/NULL | |
1317 | * Call the NULL procedure for the NFSACL | |
1318 | * | |
1319 | * Function returns | |
1320 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1321 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1322 | * | |
1323 | * When the callback is invoked, status indicates the result: | |
1324 | * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon. | |
1325 | * data is NULL | |
1326 | * RPC_STATUS_ERROR : An error occured when trying to contact the rquota daemon. | |
1327 | * data is the error string. | |
1328 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1329 | * data is NULL. | |
1330 | */ | |
21668dce | 1331 | EXTERN int rpc_nfsacl_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
3847f8f6 RS |
1332 | |
1333 | /* | |
1334 | * Call NFSACL/GETACL | |
1335 | * | |
1336 | * Function returns | |
1337 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1338 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1339 | * | |
1340 | * When the callback is invoked, status indicates the result: | |
fa3c25be | 1341 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. |
3847f8f6 | 1342 | * data is a GETACL3res pointer |
fa3c25be | 1343 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. |
3847f8f6 RS |
1344 | * data is the error string. |
1345 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1346 | * data is NULL. | |
1347 | */ | |
0118a5f0 | 1348 | struct GETACL3args; |
21668dce | 1349 | EXTERN int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3args *args, void *private_data); |
3847f8f6 | 1350 | |
fa3c25be RS |
1351 | |
1352 | ||
1353 | /* | |
1354 | * Call NFSACL/SETACL | |
1355 | * | |
1356 | * Function returns | |
1357 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1358 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1359 | * | |
1360 | * When the callback is invoked, status indicates the result: | |
1361 | * RPC_STATUS_SUCCESS : We got a successful response from the nfs daemon. | |
1362 | * data is a SETACL3res pointer | |
1363 | * RPC_STATUS_ERROR : An error occured when trying to contact the nfs daemon. | |
1364 | * data is the error string. | |
1365 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1366 | * data is NULL. | |
1367 | */ | |
1368 | struct SETACL3args; | |
21668dce | 1369 | EXTERN int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data); |
6916a665 RS |
1370 | |
1371 | ||
1372 | ||
1373 | ||
1374 | /* | |
1375 | * NLM functions | |
1376 | */ | |
1377 | char *nlmstat4_to_str(int stat); | |
3751901f | 1378 | |
6916a665 RS |
1379 | /* |
1380 | * Call NLM/NULL | |
1381 | * Call the NULL procedure for the NLM protocol | |
1382 | * | |
1383 | * Function returns | |
1384 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1385 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1386 | * | |
1387 | * When the callback is invoked, status indicates the result: | |
1388 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1389 | * data is NULL | |
1390 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1391 | * data is the error string. | |
1392 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1393 | * data is NULL. | |
1394 | */ | |
463d59bf | 1395 | EXTERN int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
e01ed6a2 RS |
1396 | |
1397 | /* | |
1398 | * Call NLM/TEST | |
1399 | * Call the TEST procedure for the NLM protocol | |
1400 | * | |
1401 | * Function returns | |
1402 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1403 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1404 | * | |
1405 | * When the callback is invoked, status indicates the result: | |
1406 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1407 | * data is NLM4_TESTres | |
1408 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1409 | * data is the error string. | |
1410 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1411 | * data is NULL. | |
1412 | */ | |
1413 | struct NLM4_TESTargs; | |
463d59bf | 1414 | EXTERN int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data); |
e01ed6a2 | 1415 | |
a171d4da RS |
1416 | /* |
1417 | * Call NLM/LOCK | |
1418 | * Call the LOCK procedure for the NLM protocol | |
1419 | * | |
1420 | * Function returns | |
1421 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1422 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1423 | * | |
1424 | * When the callback is invoked, status indicates the result: | |
1425 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1426 | * data is NLM4_LOCKres | |
1427 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1428 | * data is the error string. | |
1429 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1430 | * data is NULL. | |
1431 | */ | |
1432 | struct NLM4_LOCKargs; | |
463d59bf | 1433 | EXTERN int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data); |
a171d4da RS |
1434 | |
1435 | /* | |
1436 | * Call NLM/CANCEL | |
1437 | * Call the CANCEL procedure for the NLM protocol | |
1438 | * | |
1439 | * Function returns | |
1440 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1441 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1442 | * | |
1443 | * When the callback is invoked, status indicates the result: | |
1444 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1445 | * data is NLM4_CANCres | |
1446 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1447 | * data is the error string. | |
1448 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1449 | * data is NULL. | |
1450 | */ | |
1451 | struct NLM4_CANCargs; | |
463d59bf | 1452 | EXTERN int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data); |
a171d4da RS |
1453 | |
1454 | /* | |
1455 | * Call NLM/UNLOCK | |
1456 | * Call the UNLOCK procedure for the NLM protocol | |
1457 | * | |
1458 | * Function returns | |
1459 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1460 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1461 | * | |
1462 | * When the callback is invoked, status indicates the result: | |
1463 | * RPC_STATUS_SUCCESS : We got a successful response from the nlm daemon. | |
1464 | * data is NLM4_UNLOCKres | |
1465 | * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. | |
1466 | * data is the error string. | |
1467 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1468 | * data is NULL. | |
1469 | */ | |
1470 | struct NLM4_UNLOCKargs; | |
463d59bf | 1471 | EXTERN int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data); |
f9bb21ad | 1472 | |
ed09b567 RS |
1473 | /* |
1474 | * NSM functions | |
1475 | */ | |
1476 | char *nsmstat1_to_str(int stat); | |
3751901f | 1477 | |
ed09b567 RS |
1478 | /* |
1479 | * Call NSM/NULL | |
1480 | * Call the NULL procedure for the NSM protocol | |
1481 | * | |
1482 | * Function returns | |
1483 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1484 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1485 | * | |
1486 | * When the callback is invoked, status indicates the result: | |
1487 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1488 | * data is NULL | |
1489 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1490 | * data is the error string. | |
1491 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1492 | * data is NULL. | |
1493 | */ | |
463d59bf | 1494 | EXTERN int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
ed09b567 | 1495 | |
1e7a5136 RS |
1496 | /* |
1497 | * Call NSM/STAT | |
1498 | * Call the STAT procedure for the NSM protocol | |
1499 | * | |
1500 | * Function returns | |
1501 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1502 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1503 | * | |
1504 | * When the callback is invoked, status indicates the result: | |
1505 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1506 | * data is NSM1_STATres | |
1507 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1508 | * data is the error string. | |
1509 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1510 | * data is NULL. | |
1511 | */ | |
1512 | struct NSM1_STATargs; | |
463d59bf | 1513 | EXTERN int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data); |
1e7a5136 RS |
1514 | |
1515 | /* | |
1516 | * Call NSM/MON | |
1517 | * Call the MON procedure for the NSM protocol | |
1518 | * | |
1519 | * Function returns | |
1520 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1521 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1522 | * | |
1523 | * When the callback is invoked, status indicates the result: | |
1524 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1525 | * data is NSM1_MONres | |
1526 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1527 | * data is the error string. | |
1528 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1529 | * data is NULL. | |
1530 | */ | |
1531 | struct NSM1_MONargs; | |
463d59bf | 1532 | EXTERN int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data); |
1e7a5136 RS |
1533 | |
1534 | /* | |
1535 | * Call NSM/UNMON | |
1536 | * Call the UNMON procedure for the NSM protocol | |
1537 | * | |
1538 | * Function returns | |
1539 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1540 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1541 | * | |
1542 | * When the callback is invoked, status indicates the result: | |
1543 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1544 | * data is NSM1_UNMONres | |
1545 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1546 | * data is the error string. | |
1547 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1548 | * data is NULL. | |
1549 | */ | |
1550 | struct NSM1_UNMONargs; | |
463d59bf | 1551 | EXTERN int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data); |
1e7a5136 RS |
1552 | |
1553 | /* | |
1554 | * Call NSM/UNMONALL | |
1555 | * Call the UNMONALL procedure for the NSM protocol | |
1556 | * | |
1557 | * Function returns | |
1558 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1559 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1560 | * | |
1561 | * When the callback is invoked, status indicates the result: | |
1562 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1563 | * data is NSM1_UNMONALLres | |
1564 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1565 | * data is the error string. | |
1566 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1567 | * data is NULL. | |
1568 | */ | |
1569 | struct NSM1_UNMONALLargs; | |
463d59bf | 1570 | EXTERN int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data); |
1e7a5136 RS |
1571 | |
1572 | /* | |
1573 | * Call NSM/SIMUCRASH | |
1574 | * Call the SIMUCRASH procedure for the NSM protocol | |
1575 | * | |
1576 | * Function returns | |
1577 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1578 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1579 | * | |
1580 | * When the callback is invoked, status indicates the result: | |
1581 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1582 | * data is NULL | |
1583 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1584 | * data is the error string. | |
1585 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1586 | * data is NULL. | |
1587 | */ | |
463d59bf | 1588 | EXTERN int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); |
1e7a5136 RS |
1589 | |
1590 | /* | |
1591 | * Call NSM/NOTIFY | |
1592 | * Call the NOTIFY procedure for the NSM protocol | |
1593 | * | |
1594 | * Function returns | |
1595 | * 0 : The call was initiated. The callback will be invoked when the call completes. | |
1596 | * <0 : An error occured when trying to set up the call. The callback will not be invoked. | |
1597 | * | |
1598 | * When the callback is invoked, status indicates the result: | |
1599 | * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon. | |
1600 | * data is NULL | |
1601 | * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon. | |
1602 | * data is the error string. | |
1603 | * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. | |
1604 | * data is NULL. | |
1605 | */ | |
1606 | struct NSM1_NOTIFYargs; | |
463d59bf | 1607 | EXTERN int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data); |
ed09b567 | 1608 | |
4641d36e AR |
1609 | #ifdef __cplusplus |
1610 | } | |
1611 | #endif | |
1612 | ||
f9bb21ad | 1613 | #endif |