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
26 #define EXTERN __declspec( dllexport )
55 * Used for interfacing the async version of the api into an external eventsystem
57 EXTERN
int nfs_get_fd(struct nfs_context
*nfs
);
58 EXTERN
int nfs_which_events(struct nfs_context
*nfs
);
59 EXTERN
int nfs_service(struct nfs_context
*nfs
, int revents
);
60 EXTERN
int nfs_queue_length(struct nfs_context
*nfs
);
63 * Used if you need different credentials than the default for the current user.
66 EXTERN
void nfs_set_auth(struct nfs_context
*nfs
, struct AUTH
*auth
);
70 * When an operation failed, this function can extract a detailed error string.
72 EXTERN
char *nfs_get_error(struct nfs_context
*nfs
);
76 * Callback for all ASYNC nfs functions
78 typedef void (*nfs_cb
)(int err
, struct nfs_context
*nfs
, void *data
, void *private_data
);
81 * Callback for all ASYNC rpc functions
83 typedef void (*rpc_cb
)(struct rpc_context
*rpc
, int status
, void *data
, void *private_data
);
91 * Create an NFS c, the context.
93 * NULL : Failed to create a context.
94 * *nfs : A pointer to an nfs context.
96 EXTERN
struct nfs_context
*nfs_init_context(void);
98 * Destroy an nfs context.
100 EXTERN
void nfs_destroy_context(struct nfs_context
*nfs
);
106 * Get the maximum supported READ3 size by the server
108 EXTERN
uint64_t nfs_get_readmax(struct nfs_context
*nfs
);
111 * Get the maximum supported WRITE3 size by the server
113 EXTERN
uint64_t nfs_get_writemax(struct nfs_context
*nfs
);
122 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
123 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
125 * When the callback is invoked, status indicates the result:
128 * -errno : An error occured.
129 * data is the error string.
131 EXTERN
int nfs_mount_async(struct nfs_context
*nfs
, const char *server
, const char *exportname
, nfs_cb cb
, void *private_data
);
135 * 0 : The operation was successfull.
136 * -errno : The command failed.
138 EXTERN
int nfs_mount(struct nfs_context
*nfs
, const char *server
, const char *exportname
);
147 * Async stat(<filename>)
149 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
150 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
152 * When the callback is invoked, status indicates the result:
154 * data is struct stat *
155 * -errno : An error occured.
156 * data is the error string.
159 EXTERN
int nfs_stat_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
161 * Sync stat(<filename>)
163 * 0 : The operation was successfull.
164 * -errno : The command failed.
166 EXTERN
int nfs_stat(struct nfs_context
*nfs
, const char *path
, struct stat
*st
);
173 * Async fstat(nfsfh *)
175 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
176 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
178 * When the callback is invoked, status indicates the result:
180 * data is struct stat *
181 * -errno : An error occured.
182 * data is the error string.
184 EXTERN
int nfs_fstat_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
186 * Sync fstat(nfsfh *)
188 * 0 : The operation was successfull.
189 * -errno : The command failed.
191 EXTERN
int nfs_fstat(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, struct stat
*st
);
199 * Async open(<filename>)
201 * mode is a combination of the flags : O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC
204 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
205 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
207 * When the callback is invoked, status indicates the result:
209 * data is a struct *nfsfh;
210 * The nfsfh is close using nfs_close().
211 * -errno : An error occured.
212 * data is the error string.
214 EXTERN
int nfs_open_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
216 * Sync stat(<filename>)
218 * 0 : The operation was successfull. *nfsfh is filled in.
219 * -errno : The command failed.
221 EXTERN
int nfs_open(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
233 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
234 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
236 * When the callback is invoked, status indicates the result:
239 * -errno : An error occured.
240 * data is the error string.
242 EXTERN
int nfs_close_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
246 * 0 : The operation was successfull.
247 * -errno : The command failed.
249 EXTERN
int nfs_close(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
259 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
260 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
262 * When the callback is invoked, status indicates the result:
264 * status is numer of bytes read.
265 * data is a pointer to the returned data.
266 * -errno : An error occured.
267 * data is the error string.
269 EXTERN
int nfs_pread_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, nfs_cb cb
, void *private_data
);
273 * >=0 : numer of bytes read.
274 * -errno : An error occured.
276 EXTERN
int nfs_pread(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
287 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
288 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
290 * When the callback is invoked, status indicates the result:
292 * status is numer of bytes read.
293 * data is a pointer to the returned data.
294 * -errno : An error occured.
295 * data is the error string.
297 EXTERN
int nfs_read_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, nfs_cb cb
, void *private_data
);
301 * >=0 : numer of bytes read.
302 * -errno : An error occured.
304 EXTERN
int nfs_read(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
316 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
317 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
319 * When the callback is invoked, status indicates the result:
321 * status is numer of bytes written.
322 * -errno : An error occured.
323 * data is the error string.
325 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
);
329 * >=0 : numer of bytes written.
330 * -errno : An error occured.
332 EXTERN
int nfs_pwrite(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
342 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
343 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
345 * When the callback is invoked, status indicates the result:
347 * status is numer of bytes written.
348 * -errno : An error occured.
349 * data is the error string.
351 EXTERN
int nfs_write_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
, nfs_cb cb
, void *private_data
);
355 * >=0 : numer of bytes written.
356 * -errno : An error occured.
358 EXTERN
int nfs_write(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
368 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
369 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
371 * When the callback is invoked, status indicates the result:
373 * data is uint64_t * for the current position.
374 * -errno : An error occured.
375 * data is the error string.
377 EXTERN
int nfs_lseek_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, nfs_cb cb
, void *private_data
);
381 * >=0 : numer of bytes read.
382 * -errno : An error occured.
384 EXTERN
int nfs_lseek(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, uint64_t *current_offset
);
394 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
395 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
397 * When the callback is invoked, status indicates the result:
399 * -errno : An error occured.
400 * data is the error string.
402 EXTERN
int nfs_fsync_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
407 * -errno : An error occured.
409 EXTERN
int nfs_fsync(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
420 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
421 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
423 * When the callback is invoked, status indicates the result:
425 * -errno : An error occured.
426 * data is the error string.
428 EXTERN
int nfs_truncate_async(struct nfs_context
*nfs
, const char *path
, uint64_t length
, nfs_cb cb
, void *private_data
);
433 * -errno : An error occured.
435 EXTERN
int nfs_truncate(struct nfs_context
*nfs
, const char *path
, uint64_t length
);
446 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
447 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
449 * When the callback is invoked, status indicates the result:
451 * -errno : An error occured.
452 * data is the error string.
454 EXTERN
int nfs_ftruncate_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
, nfs_cb cb
, void *private_data
);
459 * -errno : An error occured.
461 EXTERN
int nfs_ftruncate(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
);
475 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
476 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
478 * When the callback is invoked, status indicates the result:
480 * -errno : An error occured.
481 * data is the error string.
483 EXTERN
int nfs_mkdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
488 * -errno : An error occured.
490 EXTERN
int nfs_mkdir(struct nfs_context
*nfs
, const char *path
);
501 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
502 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
504 * When the callback is invoked, status indicates the result:
506 * -errno : An error occured.
507 * data is the error string.
509 EXTERN
int nfs_rmdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
514 * -errno : An error occured.
516 EXTERN
int nfs_rmdir(struct nfs_context
*nfs
, const char *path
);
528 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
529 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
531 * When the callback is invoked, status indicates the result:
533 * data is a struct *nfsfh;
534 * -errno : An error occured.
535 * data is the error string.
537 EXTERN
int nfs_creat_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
542 * -errno : An error occured.
544 EXTERN
int nfs_creat(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
554 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
555 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
557 * When the callback is invoked, status indicates the result:
559 * -errno : An error occured.
560 * data is the error string.
562 EXTERN
int nfs_mknod_async(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
, nfs_cb cb
, void *private_data
);
567 * -errno : An error occured.
569 EXTERN
int nfs_mknod(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
);
580 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
581 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
583 * When the callback is invoked, status indicates the result:
586 * -errno : An error occured.
587 * data is the error string.
589 EXTERN
int nfs_unlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
594 * -errno : An error occured.
596 EXTERN
int nfs_unlink(struct nfs_context
*nfs
, const char *path
);
609 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
610 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
612 * When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
614 * When the callback is invoked, status indicates the result:
616 * data is struct nfsdir *
617 * -errno : An error occured.
618 * data is the error string.
620 EXTERN
int nfs_opendir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
625 * -errno : An error occured.
627 EXTERN
int nfs_opendir(struct nfs_context
*nfs
, const char *path
, struct nfsdir
**nfsdir
);
635 struct nfsdirent
*next
;
639 /* some extra fields we get for free through the READDIRPLUS3 call. You need libnfs-raw-nfs.h for these */
640 uint32_t type
; /* NF3REG, NF3DIR, NF3BLK, ... */
643 struct timeval atime
;
644 struct timeval mtime
;
645 struct timeval ctime
;
648 * nfs_readdir() never blocks, so no special sync/async versions are available
650 EXTERN
struct nfsdirent
*nfs_readdir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
658 * nfs_closedir() never blocks, so no special sync/async versions are available
660 EXTERN
void nfs_closedir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
668 * Async statvfs(<dirname>)
670 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
671 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
673 * When the callback is invoked, status indicates the result:
675 * data is struct statvfs *
676 * -errno : An error occured.
677 * data is the error string.
680 EXTERN
int nfs_statvfs_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
682 * Sync statvfs(<dirname>)
684 * 0 : The operation was successfull.
685 * -errno : The command failed.
687 EXTERN
int nfs_statvfs(struct nfs_context
*nfs
, const char *path
, struct statvfs
*svfs
);
694 * Async readlink(<name>)
696 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
697 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
699 * When the callback is invoked, status indicates the result:
702 * data is only valid during the callback and is automatically freed when the callback returns.
703 * -errno : An error occured.
704 * data is the error string.
707 EXTERN
int nfs_readlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
709 * Sync readlink(<name>)
711 * 0 : The operation was successfull.
712 * -errno : The command failed.
714 EXTERN
int nfs_readlink(struct nfs_context
*nfs
, const char *path
, char *buf
, int bufsize
);
722 * Async chmod(<name>)
724 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
725 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
727 * When the callback is invoked, status indicates the result:
730 * -errno : An error occured.
731 * data is the error string.
733 EXTERN
int nfs_chmod_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
737 * 0 : The operation was successfull.
738 * -errno : The command failed.
740 EXTERN
int nfs_chmod(struct nfs_context
*nfs
, const char *path
, int mode
);
748 * Async fchmod(<handle>)
750 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
751 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
753 * When the callback is invoked, status indicates the result:
756 * -errno : An error occured.
757 * data is the error string.
759 EXTERN
int nfs_fchmod_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
, nfs_cb cb
, void *private_data
);
761 * Sync fchmod(<handle>)
763 * 0 : The operation was successfull.
764 * -errno : The command failed.
766 EXTERN
int nfs_fchmod(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
);
774 * Async chown(<name>)
776 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
777 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
779 * When the callback is invoked, status indicates the result:
782 * -errno : An error occured.
783 * data is the error string.
785 EXTERN
int nfs_chown_async(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
789 * 0 : The operation was successfull.
790 * -errno : The command failed.
792 EXTERN
int nfs_chown(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
);
800 * Async fchown(<handle>)
802 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
803 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
805 * When the callback is invoked, status indicates the result:
808 * -errno : An error occured.
809 * data is the error string.
811 EXTERN
int nfs_fchown_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
813 * Sync fchown(<handle>)
815 * 0 : The operation was successfull.
816 * -errno : The command failed.
818 EXTERN
int nfs_fchown(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
);
827 * Async utimes(<path>)
829 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
830 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
832 * When the callback is invoked, status indicates the result:
835 * -errno : An error occured.
836 * data is the error string.
838 EXTERN
int nfs_utimes_async(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
, nfs_cb cb
, void *private_data
);
840 * Sync utimes(<path>)
842 * 0 : The operation was successfull.
843 * -errno : The command failed.
845 EXTERN
int nfs_utimes(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
);
852 * Async utime(<path>)
854 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
855 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
857 * When the callback is invoked, status indicates the result:
860 * -errno : An error occured.
861 * data is the error string.
864 EXTERN
int nfs_utime_async(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
, nfs_cb cb
, void *private_data
);
868 * 0 : The operation was successfull.
869 * -errno : The command failed.
871 EXTERN
int nfs_utime(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
);
880 * Async access(<path>)
882 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
883 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
885 * When the callback is invoked, status indicates the result:
888 * -errno : An error occured.
889 * data is the error string.
891 EXTERN
int nfs_access_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
893 * Sync access(<path>)
895 * 0 : The operation was successfull.
896 * -errno : The command failed.
898 EXTERN
int nfs_access(struct nfs_context
*nfs
, const char *path
, int mode
);
907 * Async symlink(<path>)
909 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
910 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
912 * When the callback is invoked, status indicates the result:
915 * -errno : An error occured.
916 * data is the error string.
918 EXTERN
int nfs_symlink_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
920 * Sync symlink(<path>)
922 * 0 : The operation was successfull.
923 * -errno : The command failed.
925 EXTERN
int nfs_symlink(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
932 * Async rename(<oldpath>, <newpath>)
934 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
935 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
937 * When the callback is invoked, status indicates the result:
940 * -errno : An error occured.
941 * data is the error string.
943 EXTERN
int nfs_rename_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
945 * Sync rename(<oldpath>, <newpath>)
947 * 0 : The operation was successfull.
948 * -errno : The command failed.
950 EXTERN
int nfs_rename(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
958 * Async link(<oldpath>, <newpath>)
960 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
961 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
963 * When the callback is invoked, status indicates the result:
966 * -errno : An error occured.
967 * data is the error string.
969 EXTERN
int nfs_link_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
971 * Sync link(<oldpath>, <newpath>)
973 * 0 : The operation was successfull.
974 * -errno : The command failed.
976 EXTERN
int nfs_link(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
984 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
985 * returned structures.
987 * This function will return the list of exports from an NFS server.
990 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
991 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
993 * When the callback is invoked, status indicates the result:
995 * data is a pointer to an exports pointer:
996 * exports export = *(exports *)data;
997 * -errno : An error occured.
998 * data is the error string.
1000 EXTERN
int mount_getexports_async(struct rpc_context
*rpc
, const char *server
, rpc_cb cb
, void *private_data
);
1002 * Sync getexports(<server>)
1004 * NULL : something failed
1005 * exports export : a linked list of exported directories
1007 * returned data must be freed by calling mount_free_export_list(exportnode);
1009 EXTERN
struct exportnode
*mount_getexports(const char *server
);
1011 EXTERN
void mount_free_export_list(struct exportnode
*exports
);
1014 //qqq replace later with lseek(cur, 0)
1015 uint64_t nfs_get_current_offset(struct nfsfh
*nfsfh
);
1021 struct nfs_server_list
{
1022 struct nfs_server_list
*next
;
1027 * Sync find_local_servers(<server>)
1028 * This function will probe all local networks for NFS server. This function will
1029 * block for one second while awaiting for all nfs servers to respond.
1032 * NULL : something failed
1034 * struct nfs_server_list : a linked list of all discovered servers
1036 * returned data must be freed by nfs_free_srvr_list(srv);
1038 struct nfs_server_list
*nfs_find_local_servers(void);
1039 void free_nfs_srvr_list(struct nfs_server_list
*srv
);