094de3c27027bad8280853d924f6a2a1fd3aed9b
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.
172 EXTERN
int nfs_stat(struct nfs_context
*nfs
, const char *path
, struct stat
*st
);
179 * Async fstat(nfsfh *)
181 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
182 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
184 * When the callback is invoked, status indicates the result:
186 * data is struct stat *
187 * -errno : An error occured.
188 * data is the error string.
190 EXTERN
int nfs_fstat_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
192 * Sync fstat(nfsfh *)
194 * 0 : The operation was successfull.
195 * -errno : The command failed.
197 EXTERN
int nfs_fstat(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, struct stat
*st
);
205 * Async open(<filename>)
207 * mode is a combination of the flags : O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC
210 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
211 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
213 * When the callback is invoked, status indicates the result:
215 * data is a struct *nfsfh;
216 * The nfsfh is close using nfs_close().
217 * -errno : An error occured.
218 * data is the error string.
220 EXTERN
int nfs_open_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
222 * Sync stat(<filename>)
224 * 0 : The operation was successfull. *nfsfh is filled in.
225 * -errno : The command failed.
227 EXTERN
int nfs_open(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
239 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
240 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
242 * When the callback is invoked, status indicates the result:
245 * -errno : An error occured.
246 * data is the error string.
248 EXTERN
int nfs_close_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
252 * 0 : The operation was successfull.
253 * -errno : The command failed.
255 EXTERN
int nfs_close(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
265 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
266 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
268 * When the callback is invoked, status indicates the result:
270 * status is numer of bytes read.
271 * data is a pointer to the returned data.
272 * -errno : An error occured.
273 * data is the error string.
275 EXTERN
int nfs_pread_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, nfs_cb cb
, void *private_data
);
279 * >=0 : numer of bytes read.
280 * -errno : An error occured.
282 EXTERN
int nfs_pread(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
293 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
294 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
296 * When the callback is invoked, status indicates the result:
298 * status is numer of bytes read.
299 * data is a pointer to the returned data.
300 * -errno : An error occured.
301 * data is the error string.
303 EXTERN
int nfs_read_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, nfs_cb cb
, void *private_data
);
307 * >=0 : numer of bytes read.
308 * -errno : An error occured.
310 EXTERN
int nfs_read(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
322 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
323 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
325 * When the callback is invoked, status indicates the result:
327 * status is numer of bytes written.
328 * -errno : An error occured.
329 * data is the error string.
331 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
);
335 * >=0 : numer of bytes written.
336 * -errno : An error occured.
338 EXTERN
int nfs_pwrite(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
348 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
349 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
351 * When the callback is invoked, status indicates the result:
353 * status is numer of bytes written.
354 * -errno : An error occured.
355 * data is the error string.
357 EXTERN
int nfs_write_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
, nfs_cb cb
, void *private_data
);
361 * >=0 : numer of bytes written.
362 * -errno : An error occured.
364 EXTERN
int nfs_write(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
374 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
375 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
377 * When the callback is invoked, status indicates the result:
379 * data is uint64_t * for the current position.
380 * -errno : An error occured.
381 * data is the error string.
383 EXTERN
int nfs_lseek_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, nfs_cb cb
, void *private_data
);
387 * >=0 : numer of bytes read.
388 * -errno : An error occured.
390 EXTERN
int nfs_lseek(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, uint64_t *current_offset
);
400 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
401 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
403 * When the callback is invoked, status indicates the result:
405 * -errno : An error occured.
406 * data is the error string.
408 EXTERN
int nfs_fsync_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
413 * -errno : An error occured.
415 EXTERN
int nfs_fsync(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
426 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
427 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
429 * When the callback is invoked, status indicates the result:
431 * -errno : An error occured.
432 * data is the error string.
434 EXTERN
int nfs_truncate_async(struct nfs_context
*nfs
, const char *path
, uint64_t length
, nfs_cb cb
, void *private_data
);
439 * -errno : An error occured.
441 EXTERN
int nfs_truncate(struct nfs_context
*nfs
, const char *path
, uint64_t length
);
452 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
453 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
455 * When the callback is invoked, status indicates the result:
457 * -errno : An error occured.
458 * data is the error string.
460 EXTERN
int nfs_ftruncate_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
, nfs_cb cb
, void *private_data
);
465 * -errno : An error occured.
467 EXTERN
int nfs_ftruncate(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
);
481 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
482 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
484 * When the callback is invoked, status indicates the result:
486 * -errno : An error occured.
487 * data is the error string.
489 EXTERN
int nfs_mkdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
494 * -errno : An error occured.
496 EXTERN
int nfs_mkdir(struct nfs_context
*nfs
, const char *path
);
507 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
508 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
510 * When the callback is invoked, status indicates the result:
512 * -errno : An error occured.
513 * data is the error string.
515 EXTERN
int nfs_rmdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
520 * -errno : An error occured.
522 EXTERN
int nfs_rmdir(struct nfs_context
*nfs
, const char *path
);
534 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
535 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
537 * When the callback is invoked, status indicates the result:
539 * data is a struct *nfsfh;
540 * -errno : An error occured.
541 * data is the error string.
543 EXTERN
int nfs_creat_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
548 * -errno : An error occured.
550 EXTERN
int nfs_creat(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
560 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
561 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
563 * When the callback is invoked, status indicates the result:
565 * -errno : An error occured.
566 * data is the error string.
568 EXTERN
int nfs_mknod_async(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
, nfs_cb cb
, void *private_data
);
573 * -errno : An error occured.
575 EXTERN
int nfs_mknod(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
);
586 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
587 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
589 * When the callback is invoked, status indicates the result:
592 * -errno : An error occured.
593 * data is the error string.
595 EXTERN
int nfs_unlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
600 * -errno : An error occured.
602 EXTERN
int nfs_unlink(struct nfs_context
*nfs
, const char *path
);
615 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
616 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
618 * When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
620 * When the callback is invoked, status indicates the result:
622 * data is struct nfsdir *
623 * -errno : An error occured.
624 * data is the error string.
626 EXTERN
int nfs_opendir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
631 * -errno : An error occured.
633 EXTERN
int nfs_opendir(struct nfs_context
*nfs
, const char *path
, struct nfsdir
**nfsdir
);
641 struct nfsdirent
*next
;
645 /* some extra fields we get for free through the READDIRPLUS3 call. You need libnfs-raw-nfs.h for these */
646 uint32_t type
; /* NF3REG, NF3DIR, NF3BLK, ... */
649 struct timeval atime
;
650 struct timeval mtime
;
651 struct timeval ctime
;
654 * nfs_readdir() never blocks, so no special sync/async versions are available
656 EXTERN
struct nfsdirent
*nfs_readdir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
664 * nfs_closedir() never blocks, so no special sync/async versions are available
666 EXTERN
void nfs_closedir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
674 * Async statvfs(<dirname>)
676 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
677 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
679 * When the callback is invoked, status indicates the result:
681 * data is struct statvfs *
682 * -errno : An error occured.
683 * data is the error string.
686 EXTERN
int nfs_statvfs_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
688 * Sync statvfs(<dirname>)
690 * 0 : The operation was successfull.
691 * -errno : The command failed.
693 EXTERN
int nfs_statvfs(struct nfs_context
*nfs
, const char *path
, struct statvfs
*svfs
);
700 * Async readlink(<name>)
702 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
703 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
705 * When the callback is invoked, status indicates the result:
708 * data is only valid during the callback and is automatically freed when the callback returns.
709 * -errno : An error occured.
710 * data is the error string.
713 EXTERN
int nfs_readlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
715 * Sync readlink(<name>)
717 * 0 : The operation was successfull.
718 * -errno : The command failed.
720 EXTERN
int nfs_readlink(struct nfs_context
*nfs
, const char *path
, char *buf
, int bufsize
);
728 * Async chmod(<name>)
730 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
731 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
733 * When the callback is invoked, status indicates the result:
736 * -errno : An error occured.
737 * data is the error string.
739 EXTERN
int nfs_chmod_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
743 * 0 : The operation was successfull.
744 * -errno : The command failed.
746 EXTERN
int nfs_chmod(struct nfs_context
*nfs
, const char *path
, int mode
);
754 * Async fchmod(<handle>)
756 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
757 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
759 * When the callback is invoked, status indicates the result:
762 * -errno : An error occured.
763 * data is the error string.
765 EXTERN
int nfs_fchmod_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
, nfs_cb cb
, void *private_data
);
767 * Sync fchmod(<handle>)
769 * 0 : The operation was successfull.
770 * -errno : The command failed.
772 EXTERN
int nfs_fchmod(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
);
780 * Async chown(<name>)
782 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
783 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
785 * When the callback is invoked, status indicates the result:
788 * -errno : An error occured.
789 * data is the error string.
791 EXTERN
int nfs_chown_async(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
795 * 0 : The operation was successfull.
796 * -errno : The command failed.
798 EXTERN
int nfs_chown(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
);
806 * Async fchown(<handle>)
808 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
809 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
811 * When the callback is invoked, status indicates the result:
814 * -errno : An error occured.
815 * data is the error string.
817 EXTERN
int nfs_fchown_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
819 * Sync fchown(<handle>)
821 * 0 : The operation was successfull.
822 * -errno : The command failed.
824 EXTERN
int nfs_fchown(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
);
833 * Async utimes(<path>)
835 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
836 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
838 * When the callback is invoked, status indicates the result:
841 * -errno : An error occured.
842 * data is the error string.
844 EXTERN
int nfs_utimes_async(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
, nfs_cb cb
, void *private_data
);
846 * Sync utimes(<path>)
848 * 0 : The operation was successfull.
849 * -errno : The command failed.
851 EXTERN
int nfs_utimes(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
);
858 * Async utime(<path>)
860 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
861 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
863 * When the callback is invoked, status indicates the result:
866 * -errno : An error occured.
867 * data is the error string.
870 EXTERN
int nfs_utime_async(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
, nfs_cb cb
, void *private_data
);
874 * 0 : The operation was successfull.
875 * -errno : The command failed.
877 EXTERN
int nfs_utime(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
);
886 * Async access(<path>)
888 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
889 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
891 * When the callback is invoked, status indicates the result:
894 * -errno : An error occured.
895 * data is the error string.
897 EXTERN
int nfs_access_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
899 * Sync access(<path>)
901 * 0 : The operation was successfull.
902 * -errno : The command failed.
904 EXTERN
int nfs_access(struct nfs_context
*nfs
, const char *path
, int mode
);
913 * Async symlink(<path>)
915 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
916 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
918 * When the callback is invoked, status indicates the result:
921 * -errno : An error occured.
922 * data is the error string.
924 EXTERN
int nfs_symlink_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
926 * Sync symlink(<path>)
928 * 0 : The operation was successfull.
929 * -errno : The command failed.
931 EXTERN
int nfs_symlink(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
938 * Async rename(<oldpath>, <newpath>)
940 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
941 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
943 * When the callback is invoked, status indicates the result:
946 * -errno : An error occured.
947 * data is the error string.
949 EXTERN
int nfs_rename_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
951 * Sync rename(<oldpath>, <newpath>)
953 * 0 : The operation was successfull.
954 * -errno : The command failed.
956 EXTERN
int nfs_rename(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
964 * Async link(<oldpath>, <newpath>)
966 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
967 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
969 * When the callback is invoked, status indicates the result:
972 * -errno : An error occured.
973 * data is the error string.
975 EXTERN
int nfs_link_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
977 * Sync link(<oldpath>, <newpath>)
979 * 0 : The operation was successfull.
980 * -errno : The command failed.
982 EXTERN
int nfs_link(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
990 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
991 * returned structures.
993 * This function will return the list of exports from an NFS server.
996 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
997 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
999 * When the callback is invoked, status indicates the result:
1001 * data is a pointer to an exports pointer:
1002 * exports export = *(exports *)data;
1003 * -errno : An error occured.
1004 * data is the error string.
1006 EXTERN
int mount_getexports_async(struct rpc_context
*rpc
, const char *server
, rpc_cb cb
, void *private_data
);
1008 * Sync getexports(<server>)
1010 * NULL : something failed
1011 * exports export : a linked list of exported directories
1013 * returned data must be freed by calling mount_free_export_list(exportnode);
1015 EXTERN
struct exportnode
*mount_getexports(const char *server
);
1017 EXTERN
void mount_free_export_list(struct exportnode
*exports
);
1020 //qqq replace later with lseek(cur, 0)
1021 uint64_t nfs_get_current_offset(struct nfsfh
*nfsfh
);
1027 struct nfs_server_list
{
1028 struct nfs_server_list
*next
;
1033 * Sync find_local_servers(<server>)
1034 * This function will probe all local networks for NFS server. This function will
1035 * block for one second while awaiting for all nfs servers to respond.
1038 * NULL : something failed
1040 * struct nfs_server_list : a linked list of all discovered servers
1042 * returned data must be freed by nfs_free_srvr_list(srv);
1044 struct nfs_server_list
*nfs_find_local_servers(void);
1045 void free_nfs_srvr_list(struct nfs_server_list
*srv
);