2 Copyright (C) 2010 by Ronnie Sahlberg <ronniesahlberg@gmail.com>
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.
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.
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/>.
18 * This is the highlevel interface to access NFS resources using a posix-like interface
32 #define EXTERN __declspec( dllexport )
61 * Used for interfacing the async version of the api into an external eventsystem
63 EXTERN
int nfs_get_fd(struct nfs_context
*nfs
);
64 EXTERN
int nfs_which_events(struct nfs_context
*nfs
);
65 EXTERN
int nfs_service(struct nfs_context
*nfs
, int revents
);
66 EXTERN
int nfs_queue_length(struct nfs_context
*nfs
);
69 * Used if you need different credentials than the default for the current user.
72 EXTERN
void nfs_set_auth(struct nfs_context
*nfs
, struct AUTH
*auth
);
76 * When an operation failed, this function can extract a detailed error string.
78 EXTERN
char *nfs_get_error(struct nfs_context
*nfs
);
82 * Callback for all ASYNC nfs functions
84 typedef void (*nfs_cb
)(int err
, struct nfs_context
*nfs
, void *data
, void *private_data
);
87 * Callback for all ASYNC rpc functions
89 typedef void (*rpc_cb
)(struct rpc_context
*rpc
, int status
, void *data
, void *private_data
);
97 * Create an NFS c, the context.
99 * NULL : Failed to create a context.
100 * *nfs : A pointer to an nfs context.
102 EXTERN
struct nfs_context
*nfs_init_context(void);
104 * Destroy an nfs context.
106 EXTERN
void nfs_destroy_context(struct nfs_context
*nfs
);
112 * Get the maximum supported READ3 size by the server
114 EXTERN
uint64_t nfs_get_readmax(struct nfs_context
*nfs
);
117 * Get the maximum supported WRITE3 size by the server
119 EXTERN
uint64_t nfs_get_writemax(struct nfs_context
*nfs
);
128 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
129 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
131 * When the callback is invoked, status indicates the result:
134 * -errno : An error occured.
135 * data is the error string.
137 EXTERN
int nfs_mount_async(struct nfs_context
*nfs
, const char *server
, const char *exportname
, nfs_cb cb
, void *private_data
);
141 * 0 : The operation was successfull.
142 * -errno : The command failed.
144 EXTERN
int nfs_mount(struct nfs_context
*nfs
, const char *server
, const char *exportname
);
153 * Async stat(<filename>)
155 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
156 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
158 * When the callback is invoked, status indicates the result:
160 * data is struct stat *
161 * -errno : An error occured.
162 * data is the error string.
165 EXTERN
int nfs_stat_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
167 * Sync stat(<filename>)
169 * 0 : The operation was successfull.
170 * -errno : The command failed.
173 EXTERN
int nfs_stat(struct nfs_context
*nfs
, const char *path
, struct __stat64
*st
);
175 EXTERN
int nfs_stat(struct nfs_context
*nfs
, const char *path
, struct stat
*st
);
182 * Async fstat(nfsfh *)
184 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
185 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
187 * When the callback is invoked, status indicates the result:
189 * data is struct stat *
190 * -errno : An error occured.
191 * data is the error string.
193 EXTERN
int nfs_fstat_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
195 * Sync fstat(nfsfh *)
197 * 0 : The operation was successfull.
198 * -errno : The command failed.
201 EXTERN
int nfs_fstat(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, struct __stat64
*st
);
203 EXTERN
int nfs_fstat(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, struct stat
*st
);
212 * Async open(<filename>)
214 * mode is a combination of the flags : O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC
217 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
218 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
220 * When the callback is invoked, status indicates the result:
222 * data is a struct *nfsfh;
223 * The nfsfh is close using nfs_close().
224 * -errno : An error occured.
225 * data is the error string.
227 EXTERN
int nfs_open_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
229 * Sync stat(<filename>)
231 * 0 : The operation was successfull. *nfsfh is filled in.
232 * -errno : The command failed.
234 EXTERN
int nfs_open(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
246 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
247 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
249 * When the callback is invoked, status indicates the result:
252 * -errno : An error occured.
253 * data is the error string.
255 EXTERN
int nfs_close_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
259 * 0 : The operation was successfull.
260 * -errno : The command failed.
262 EXTERN
int nfs_close(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
272 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
273 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
275 * When the callback is invoked, status indicates the result:
277 * status is numer of bytes read.
278 * data is a pointer to the returned data.
279 * -errno : An error occured.
280 * data is the error string.
282 EXTERN
int nfs_pread_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, nfs_cb cb
, void *private_data
);
286 * >=0 : numer of bytes read.
287 * -errno : An error occured.
289 EXTERN
int nfs_pread(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
300 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
301 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
303 * When the callback is invoked, status indicates the result:
305 * status is numer of bytes read.
306 * data is a pointer to the returned data.
307 * -errno : An error occured.
308 * data is the error string.
310 EXTERN
int nfs_read_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, nfs_cb cb
, void *private_data
);
314 * >=0 : numer of bytes read.
315 * -errno : An error occured.
317 EXTERN
int nfs_read(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
329 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
330 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
332 * When the callback is invoked, status indicates the result:
334 * status is numer of bytes written.
335 * -errno : An error occured.
336 * data is the error string.
338 EXTERN
int nfs_pwrite_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
, nfs_cb cb
, void *private_data
);
342 * >=0 : numer of bytes written.
343 * -errno : An error occured.
345 EXTERN
int nfs_pwrite(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
355 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
356 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
358 * When the callback is invoked, status indicates the result:
360 * status is numer of bytes written.
361 * -errno : An error occured.
362 * data is the error string.
364 EXTERN
int nfs_write_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
, nfs_cb cb
, void *private_data
);
368 * >=0 : numer of bytes written.
369 * -errno : An error occured.
371 EXTERN
int nfs_write(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
381 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
382 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
384 * When the callback is invoked, status indicates the result:
386 * data is uint64_t * for the current position.
387 * -errno : An error occured.
388 * data is the error string.
390 EXTERN
int nfs_lseek_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, nfs_cb cb
, void *private_data
);
394 * >=0 : numer of bytes read.
395 * -errno : An error occured.
397 EXTERN
int nfs_lseek(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, uint64_t *current_offset
);
407 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
408 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
410 * When the callback is invoked, status indicates the result:
412 * -errno : An error occured.
413 * data is the error string.
415 EXTERN
int nfs_fsync_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
420 * -errno : An error occured.
422 EXTERN
int nfs_fsync(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
433 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
434 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
436 * When the callback is invoked, status indicates the result:
438 * -errno : An error occured.
439 * data is the error string.
441 EXTERN
int nfs_truncate_async(struct nfs_context
*nfs
, const char *path
, uint64_t length
, nfs_cb cb
, void *private_data
);
446 * -errno : An error occured.
448 EXTERN
int nfs_truncate(struct nfs_context
*nfs
, const char *path
, uint64_t length
);
459 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
460 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
462 * When the callback is invoked, status indicates the result:
464 * -errno : An error occured.
465 * data is the error string.
467 EXTERN
int nfs_ftruncate_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
, nfs_cb cb
, void *private_data
);
472 * -errno : An error occured.
474 EXTERN
int nfs_ftruncate(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
);
488 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
489 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
491 * When the callback is invoked, status indicates the result:
493 * -errno : An error occured.
494 * data is the error string.
496 EXTERN
int nfs_mkdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
501 * -errno : An error occured.
503 EXTERN
int nfs_mkdir(struct nfs_context
*nfs
, const char *path
);
514 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
515 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
517 * When the callback is invoked, status indicates the result:
519 * -errno : An error occured.
520 * data is the error string.
522 EXTERN
int nfs_rmdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
527 * -errno : An error occured.
529 EXTERN
int nfs_rmdir(struct nfs_context
*nfs
, const char *path
);
541 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
542 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
544 * When the callback is invoked, status indicates the result:
546 * data is a struct *nfsfh;
547 * -errno : An error occured.
548 * data is the error string.
550 EXTERN
int nfs_creat_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
555 * -errno : An error occured.
557 EXTERN
int nfs_creat(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
567 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
568 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
570 * When the callback is invoked, status indicates the result:
572 * -errno : An error occured.
573 * data is the error string.
575 EXTERN
int nfs_mknod_async(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
, nfs_cb cb
, void *private_data
);
580 * -errno : An error occured.
582 EXTERN
int nfs_mknod(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
);
593 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
594 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
596 * When the callback is invoked, status indicates the result:
599 * -errno : An error occured.
600 * data is the error string.
602 EXTERN
int nfs_unlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
607 * -errno : An error occured.
609 EXTERN
int nfs_unlink(struct nfs_context
*nfs
, const char *path
);
622 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
623 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
625 * When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
627 * When the callback is invoked, status indicates the result:
629 * data is struct nfsdir *
630 * -errno : An error occured.
631 * data is the error string.
633 EXTERN
int nfs_opendir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
638 * -errno : An error occured.
640 EXTERN
int nfs_opendir(struct nfs_context
*nfs
, const char *path
, struct nfsdir
**nfsdir
);
648 struct nfsdirent
*next
;
652 /* some extra fields we get for free through the READDIRPLUS3 call. You need libnfs-raw-nfs.h for these */
653 uint32_t type
; /* NF3REG, NF3DIR, NF3BLK, ... */
656 struct timeval atime
;
657 struct timeval mtime
;
658 struct timeval ctime
;
661 * nfs_readdir() never blocks, so no special sync/async versions are available
663 EXTERN
struct nfsdirent
*nfs_readdir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
671 * nfs_closedir() never blocks, so no special sync/async versions are available
673 EXTERN
void nfs_closedir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
681 * Async statvfs(<dirname>)
683 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
684 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
686 * When the callback is invoked, status indicates the result:
688 * data is struct statvfs *
689 * -errno : An error occured.
690 * data is the error string.
693 EXTERN
int nfs_statvfs_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
695 * Sync statvfs(<dirname>)
697 * 0 : The operation was successfull.
698 * -errno : The command failed.
700 EXTERN
int nfs_statvfs(struct nfs_context
*nfs
, const char *path
, struct statvfs
*svfs
);
707 * Async readlink(<name>)
709 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
710 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
712 * When the callback is invoked, status indicates the result:
715 * data is only valid during the callback and is automatically freed when the callback returns.
716 * -errno : An error occured.
717 * data is the error string.
720 EXTERN
int nfs_readlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
722 * Sync readlink(<name>)
724 * 0 : The operation was successfull.
725 * -errno : The command failed.
727 EXTERN
int nfs_readlink(struct nfs_context
*nfs
, const char *path
, char *buf
, int bufsize
);
735 * Async chmod(<name>)
737 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
738 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
740 * When the callback is invoked, status indicates the result:
743 * -errno : An error occured.
744 * data is the error string.
746 EXTERN
int nfs_chmod_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
750 * 0 : The operation was successfull.
751 * -errno : The command failed.
753 EXTERN
int nfs_chmod(struct nfs_context
*nfs
, const char *path
, int mode
);
761 * Async fchmod(<handle>)
763 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
764 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
766 * When the callback is invoked, status indicates the result:
769 * -errno : An error occured.
770 * data is the error string.
772 EXTERN
int nfs_fchmod_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
, nfs_cb cb
, void *private_data
);
774 * Sync fchmod(<handle>)
776 * 0 : The operation was successfull.
777 * -errno : The command failed.
779 EXTERN
int nfs_fchmod(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
);
787 * Async chown(<name>)
789 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
790 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
792 * When the callback is invoked, status indicates the result:
795 * -errno : An error occured.
796 * data is the error string.
798 EXTERN
int nfs_chown_async(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
802 * 0 : The operation was successfull.
803 * -errno : The command failed.
805 EXTERN
int nfs_chown(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
);
813 * Async fchown(<handle>)
815 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
816 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
818 * When the callback is invoked, status indicates the result:
821 * -errno : An error occured.
822 * data is the error string.
824 EXTERN
int nfs_fchown_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
826 * Sync fchown(<handle>)
828 * 0 : The operation was successfull.
829 * -errno : The command failed.
831 EXTERN
int nfs_fchown(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
);
840 * Async utimes(<path>)
842 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
843 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
845 * When the callback is invoked, status indicates the result:
848 * -errno : An error occured.
849 * data is the error string.
851 EXTERN
int nfs_utimes_async(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
, nfs_cb cb
, void *private_data
);
853 * Sync utimes(<path>)
855 * 0 : The operation was successfull.
856 * -errno : The command failed.
858 EXTERN
int nfs_utimes(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
);
865 * Async utime(<path>)
867 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
868 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
870 * When the callback is invoked, status indicates the result:
873 * -errno : An error occured.
874 * data is the error string.
877 EXTERN
int nfs_utime_async(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
, nfs_cb cb
, void *private_data
);
881 * 0 : The operation was successfull.
882 * -errno : The command failed.
884 EXTERN
int nfs_utime(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
);
893 * Async access(<path>)
895 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
896 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
898 * When the callback is invoked, status indicates the result:
901 * -errno : An error occured.
902 * data is the error string.
904 EXTERN
int nfs_access_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
906 * Sync access(<path>)
908 * 0 : The operation was successfull.
909 * -errno : The command failed.
911 EXTERN
int nfs_access(struct nfs_context
*nfs
, const char *path
, int mode
);
920 * Async symlink(<path>)
922 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
923 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
925 * When the callback is invoked, status indicates the result:
928 * -errno : An error occured.
929 * data is the error string.
931 EXTERN
int nfs_symlink_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
933 * Sync symlink(<path>)
935 * 0 : The operation was successfull.
936 * -errno : The command failed.
938 EXTERN
int nfs_symlink(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
945 * Async rename(<oldpath>, <newpath>)
947 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
948 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
950 * When the callback is invoked, status indicates the result:
953 * -errno : An error occured.
954 * data is the error string.
956 EXTERN
int nfs_rename_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
958 * Sync rename(<oldpath>, <newpath>)
960 * 0 : The operation was successfull.
961 * -errno : The command failed.
963 EXTERN
int nfs_rename(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
971 * Async link(<oldpath>, <newpath>)
973 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
974 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
976 * When the callback is invoked, status indicates the result:
979 * -errno : An error occured.
980 * data is the error string.
982 EXTERN
int nfs_link_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
984 * Sync link(<oldpath>, <newpath>)
986 * 0 : The operation was successfull.
987 * -errno : The command failed.
989 EXTERN
int nfs_link(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
997 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
998 * returned structures.
1000 * This function will return the list of exports from an NFS server.
1003 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
1004 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
1006 * When the callback is invoked, status indicates the result:
1008 * data is a pointer to an exports pointer:
1009 * exports export = *(exports *)data;
1010 * -errno : An error occured.
1011 * data is the error string.
1013 EXTERN
int mount_getexports_async(struct rpc_context
*rpc
, const char *server
, rpc_cb cb
, void *private_data
);
1015 * Sync getexports(<server>)
1017 * NULL : something failed
1018 * exports export : a linked list of exported directories
1020 * returned data must be freed by calling mount_free_export_list(exportnode);
1022 EXTERN
struct exportnode
*mount_getexports(const char *server
);
1024 EXTERN
void mount_free_export_list(struct exportnode
*exports
);
1027 //qqq replace later with lseek(cur, 0)
1028 uint64_t nfs_get_current_offset(struct nfsfh
*nfsfh
);
1034 struct nfs_server_list
{
1035 struct nfs_server_list
*next
;
1040 * Sync find_local_servers(<server>)
1041 * This function will probe all local networks for NFS server. This function will
1042 * block for one second while awaiting for all nfs servers to respond.
1045 * NULL : something failed
1047 * struct nfs_server_list : a linked list of all discovered servers
1049 * returned data must be freed by nfs_free_srvr_list(srv);
1051 struct nfs_server_list
*nfs_find_local_servers(void);
1052 void free_nfs_srvr_list(struct nfs_server_list
*srv
);