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.
65 EXTERN
void nfs_set_auth(struct nfs_context
*nfs
, AUTH
*auth
);
69 * When an operation failed, this function can extract a detailed error string.
71 EXTERN
char *nfs_get_error(struct nfs_context
*nfs
);
75 * Callback for all ASYNC nfs functions
77 typedef void (*nfs_cb
)(int err
, struct nfs_context
*nfs
, void *data
, void *private_data
);
80 * Callback for all ASYNC rpc functions
82 typedef void (*rpc_cb
)(struct rpc_context
*rpc
, int status
, void *data
, void *private_data
);
90 * Create an NFS c, the context.
92 * NULL : Failed to create a context.
93 * *nfs : A pointer to an nfs context.
95 EXTERN
struct nfs_context
*nfs_init_context(void);
97 * Destroy an nfs context.
99 EXTERN
void nfs_destroy_context(struct nfs_context
*nfs
);
105 * Get the maximum supported READ3 size by the server
107 EXTERN
uint64_t nfs_get_readmax(struct nfs_context
*nfs
);
110 * Get the maximum supported WRITE3 size by the server
112 EXTERN
uint64_t nfs_get_writemax(struct nfs_context
*nfs
);
121 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
122 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
124 * When the callback is invoked, status indicates the result:
127 * -errno : An error occured.
128 * data is the error string.
130 EXTERN
int nfs_mount_async(struct nfs_context
*nfs
, const char *server
, const char *exportname
, nfs_cb cb
, void *private_data
);
134 * 0 : The operation was successfull.
135 * -errno : The command failed.
137 EXTERN
int nfs_mount(struct nfs_context
*nfs
, const char *server
, const char *exportname
);
146 * Async stat(<filename>)
148 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
149 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
151 * When the callback is invoked, status indicates the result:
153 * data is struct stat *
154 * -errno : An error occured.
155 * data is the error string.
158 EXTERN
int nfs_stat_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
160 * Sync stat(<filename>)
162 * 0 : The operation was successfull.
163 * -errno : The command failed.
165 EXTERN
int nfs_stat(struct nfs_context
*nfs
, const char *path
, struct stat
*st
);
172 * Async fstat(nfsfh *)
174 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
175 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
177 * When the callback is invoked, status indicates the result:
179 * data is struct stat *
180 * -errno : An error occured.
181 * data is the error string.
183 EXTERN
int nfs_fstat_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
185 * Sync fstat(nfsfh *)
187 * 0 : The operation was successfull.
188 * -errno : The command failed.
190 EXTERN
int nfs_fstat(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, struct stat
*st
);
198 * Async open(<filename>)
200 * mode is a combination of the flags : O_RDOLNY, O_WRONLY, O_RDWR , O_SYNC
203 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
204 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
206 * When the callback is invoked, status indicates the result:
208 * data is a struct *nfsfh;
209 * The nfsfh is close using nfs_close().
210 * -errno : An error occured.
211 * data is the error string.
213 EXTERN
int nfs_open_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
215 * Sync stat(<filename>)
217 * 0 : The operation was successfull. *nfsfh is filled in.
218 * -errno : The command failed.
220 EXTERN
int nfs_open(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
232 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
233 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
235 * When the callback is invoked, status indicates the result:
238 * -errno : An error occured.
239 * data is the error string.
241 EXTERN
int nfs_close_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
245 * 0 : The operation was successfull.
246 * -errno : The command failed.
248 EXTERN
int nfs_close(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
258 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
259 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
261 * When the callback is invoked, status indicates the result:
263 * status is numer of bytes read.
264 * data is a pointer to the returned data.
265 * -errno : An error occured.
266 * data is the error string.
268 EXTERN
int nfs_pread_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, nfs_cb cb
, void *private_data
);
272 * >=0 : numer of bytes read.
273 * -errno : An error occured.
275 EXTERN
int nfs_pread(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
286 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
287 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
289 * When the callback is invoked, status indicates the result:
291 * status is numer of bytes read.
292 * data is a pointer to the returned data.
293 * -errno : An error occured.
294 * data is the error string.
296 EXTERN
int nfs_read_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, nfs_cb cb
, void *private_data
);
300 * >=0 : numer of bytes read.
301 * -errno : An error occured.
303 EXTERN
int nfs_read(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
315 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
316 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
318 * When the callback is invoked, status indicates the result:
320 * status is numer of bytes written.
321 * -errno : An error occured.
322 * data is the error string.
324 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
);
328 * >=0 : numer of bytes written.
329 * -errno : An error occured.
331 EXTERN
int nfs_pwrite(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, uint64_t count
, char *buf
);
341 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
342 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
344 * When the callback is invoked, status indicates the result:
346 * status is numer of bytes written.
347 * -errno : An error occured.
348 * data is the error string.
350 EXTERN
int nfs_write_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
, nfs_cb cb
, void *private_data
);
354 * >=0 : numer of bytes written.
355 * -errno : An error occured.
357 EXTERN
int nfs_write(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t count
, char *buf
);
367 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
368 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
370 * When the callback is invoked, status indicates the result:
372 * data is uint64_t * for the current position.
373 * -errno : An error occured.
374 * data is the error string.
376 EXTERN
int nfs_lseek_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, nfs_cb cb
, void *private_data
);
380 * >=0 : numer of bytes read.
381 * -errno : An error occured.
383 EXTERN
int nfs_lseek(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t offset
, int whence
, uint64_t *current_offset
);
393 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
394 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
396 * When the callback is invoked, status indicates the result:
398 * -errno : An error occured.
399 * data is the error string.
401 EXTERN
int nfs_fsync_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, nfs_cb cb
, void *private_data
);
406 * -errno : An error occured.
408 EXTERN
int nfs_fsync(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
);
419 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
420 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
422 * When the callback is invoked, status indicates the result:
424 * -errno : An error occured.
425 * data is the error string.
427 EXTERN
int nfs_truncate_async(struct nfs_context
*nfs
, const char *path
, uint64_t length
, nfs_cb cb
, void *private_data
);
432 * -errno : An error occured.
434 EXTERN
int nfs_truncate(struct nfs_context
*nfs
, const char *path
, uint64_t length
);
445 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
446 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
448 * When the callback is invoked, status indicates the result:
450 * -errno : An error occured.
451 * data is the error string.
453 EXTERN
int nfs_ftruncate_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
, nfs_cb cb
, void *private_data
);
458 * -errno : An error occured.
460 EXTERN
int nfs_ftruncate(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, uint64_t length
);
474 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
475 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
477 * When the callback is invoked, status indicates the result:
479 * -errno : An error occured.
480 * data is the error string.
482 EXTERN
int nfs_mkdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
487 * -errno : An error occured.
489 EXTERN
int nfs_mkdir(struct nfs_context
*nfs
, const char *path
);
500 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
501 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
503 * When the callback is invoked, status indicates the result:
505 * -errno : An error occured.
506 * data is the error string.
508 EXTERN
int nfs_rmdir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
513 * -errno : An error occured.
515 EXTERN
int nfs_rmdir(struct nfs_context
*nfs
, const char *path
);
527 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
528 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
530 * When the callback is invoked, status indicates the result:
532 * data is a struct *nfsfh;
533 * -errno : An error occured.
534 * data is the error string.
536 EXTERN
int nfs_creat_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
541 * -errno : An error occured.
543 EXTERN
int nfs_creat(struct nfs_context
*nfs
, const char *path
, int mode
, struct nfsfh
**nfsfh
);
553 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
554 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
556 * When the callback is invoked, status indicates the result:
558 * -errno : An error occured.
559 * data is the error string.
561 EXTERN
int nfs_mknod_async(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
, nfs_cb cb
, void *private_data
);
566 * -errno : An error occured.
568 EXTERN
int nfs_mknod(struct nfs_context
*nfs
, const char *path
, int mode
, int dev
);
579 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
580 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
582 * When the callback is invoked, status indicates the result:
585 * -errno : An error occured.
586 * data is the error string.
588 EXTERN
int nfs_unlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
593 * -errno : An error occured.
595 EXTERN
int nfs_unlink(struct nfs_context
*nfs
, const char *path
);
608 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
609 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
611 * When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
613 * When the callback is invoked, status indicates the result:
615 * data is struct nfsdir *
616 * -errno : An error occured.
617 * data is the error string.
619 EXTERN
int nfs_opendir_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
624 * -errno : An error occured.
626 EXTERN
int nfs_opendir(struct nfs_context
*nfs
, const char *path
, struct nfsdir
**nfsdir
);
634 struct nfsdirent
*next
;
638 /* some extra fields we get for free through the READDIRPLUS3 call. You need libnfs-raw-nfs.h for these */
639 uint32_t type
; /* NF3REG, NF3DIR, NF3BLK, ... */
642 struct timeval atime
;
643 struct timeval mtime
;
644 struct timeval ctime
;
647 * nfs_readdir() never blocks, so no special sync/async versions are available
649 EXTERN
struct nfsdirent
*nfs_readdir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
657 * nfs_closedir() never blocks, so no special sync/async versions are available
659 EXTERN
void nfs_closedir(struct nfs_context
*nfs
, struct nfsdir
*nfsdir
);
667 * Async statvfs(<dirname>)
669 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
670 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
672 * When the callback is invoked, status indicates the result:
674 * data is struct statvfs *
675 * -errno : An error occured.
676 * data is the error string.
679 EXTERN
int nfs_statvfs_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
681 * Sync statvfs(<dirname>)
683 * 0 : The operation was successfull.
684 * -errno : The command failed.
686 EXTERN
int nfs_statvfs(struct nfs_context
*nfs
, const char *path
, struct statvfs
*svfs
);
693 * Async readlink(<name>)
695 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
696 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
698 * When the callback is invoked, status indicates the result:
701 * data is only valid during the callback and is automatically freed when the callback returns.
702 * -errno : An error occured.
703 * data is the error string.
706 EXTERN
int nfs_readlink_async(struct nfs_context
*nfs
, const char *path
, nfs_cb cb
, void *private_data
);
708 * Sync readlink(<name>)
710 * 0 : The operation was successfull.
711 * -errno : The command failed.
713 EXTERN
int nfs_readlink(struct nfs_context
*nfs
, const char *path
, char *buf
, int bufsize
);
721 * Async chmod(<name>)
723 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
724 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
726 * When the callback is invoked, status indicates the result:
729 * -errno : An error occured.
730 * data is the error string.
732 EXTERN
int nfs_chmod_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
736 * 0 : The operation was successfull.
737 * -errno : The command failed.
739 EXTERN
int nfs_chmod(struct nfs_context
*nfs
, const char *path
, int mode
);
747 * Async fchmod(<handle>)
749 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
750 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
752 * When the callback is invoked, status indicates the result:
755 * -errno : An error occured.
756 * data is the error string.
758 EXTERN
int nfs_fchmod_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
, nfs_cb cb
, void *private_data
);
760 * Sync fchmod(<handle>)
762 * 0 : The operation was successfull.
763 * -errno : The command failed.
765 EXTERN
int nfs_fchmod(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int mode
);
773 * Async chown(<name>)
775 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
776 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
778 * When the callback is invoked, status indicates the result:
781 * -errno : An error occured.
782 * data is the error string.
784 EXTERN
int nfs_chown_async(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
788 * 0 : The operation was successfull.
789 * -errno : The command failed.
791 EXTERN
int nfs_chown(struct nfs_context
*nfs
, const char *path
, int uid
, int gid
);
799 * Async fchown(<handle>)
801 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
802 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
804 * When the callback is invoked, status indicates the result:
807 * -errno : An error occured.
808 * data is the error string.
810 EXTERN
int nfs_fchown_async(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
, nfs_cb cb
, void *private_data
);
812 * Sync fchown(<handle>)
814 * 0 : The operation was successfull.
815 * -errno : The command failed.
817 EXTERN
int nfs_fchown(struct nfs_context
*nfs
, struct nfsfh
*nfsfh
, int uid
, int gid
);
826 * Async utimes(<path>)
828 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
829 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
831 * When the callback is invoked, status indicates the result:
834 * -errno : An error occured.
835 * data is the error string.
837 EXTERN
int nfs_utimes_async(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
, nfs_cb cb
, void *private_data
);
839 * Sync utimes(<path>)
841 * 0 : The operation was successfull.
842 * -errno : The command failed.
844 EXTERN
int nfs_utimes(struct nfs_context
*nfs
, const char *path
, struct timeval
*times
);
851 * Async utime(<path>)
853 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
854 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
856 * When the callback is invoked, status indicates the result:
859 * -errno : An error occured.
860 * data is the error string.
863 EXTERN
int nfs_utime_async(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
, nfs_cb cb
, void *private_data
);
867 * 0 : The operation was successfull.
868 * -errno : The command failed.
870 EXTERN
int nfs_utime(struct nfs_context
*nfs
, const char *path
, struct utimbuf
*times
);
879 * Async access(<path>)
881 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
882 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
884 * When the callback is invoked, status indicates the result:
887 * -errno : An error occured.
888 * data is the error string.
890 EXTERN
int nfs_access_async(struct nfs_context
*nfs
, const char *path
, int mode
, nfs_cb cb
, void *private_data
);
892 * Sync access(<path>)
894 * 0 : The operation was successfull.
895 * -errno : The command failed.
897 EXTERN
int nfs_access(struct nfs_context
*nfs
, const char *path
, int mode
);
906 * Async symlink(<path>)
908 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
909 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
911 * When the callback is invoked, status indicates the result:
914 * -errno : An error occured.
915 * data is the error string.
917 EXTERN
int nfs_symlink_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
919 * Sync symlink(<path>)
921 * 0 : The operation was successfull.
922 * -errno : The command failed.
924 EXTERN
int nfs_symlink(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
931 * Async rename(<oldpath>, <newpath>)
933 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
934 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
936 * When the callback is invoked, status indicates the result:
939 * -errno : An error occured.
940 * data is the error string.
942 EXTERN
int nfs_rename_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
944 * Sync rename(<oldpath>, <newpath>)
946 * 0 : The operation was successfull.
947 * -errno : The command failed.
949 EXTERN
int nfs_rename(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
957 * Async link(<oldpath>, <newpath>)
959 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
960 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
962 * When the callback is invoked, status indicates the result:
965 * -errno : An error occured.
966 * data is the error string.
968 EXTERN
int nfs_link_async(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
, nfs_cb cb
, void *private_data
);
970 * Sync link(<oldpath>, <newpath>)
972 * 0 : The operation was successfull.
973 * -errno : The command failed.
975 EXTERN
int nfs_link(struct nfs_context
*nfs
, const char *oldpath
, const char *newpath
);
983 * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the
984 * returned structures.
986 * This function will return the list of exports from an NFS server.
989 * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
990 * <0 : An error occured when trying to set up the operation. The callback will not be invoked.
992 * When the callback is invoked, status indicates the result:
994 * data is a pointer to an exports pointer:
995 * exports export = *(exports *)data;
996 * -errno : An error occured.
997 * data is the error string.
999 EXTERN
int mount_getexports_async(struct rpc_context
*rpc
, const char *server
, rpc_cb cb
, void *private_data
);
1001 * Sync getexports(<server>)
1003 * NULL : something failed
1004 * exports export : a linked list of exported directories
1006 * returned data must be freed by calling mount_free_export_list(exportnode);
1008 EXTERN
struct exportnode
*mount_getexports(const char *server
);
1010 EXTERN
void mount_free_export_list(struct exportnode
*exports
);
1013 //qqq replace later with lseek(cur, 0)
1014 uint64_t nfs_get_current_offset(struct nfsfh
*nfsfh
);
1020 struct nfs_server_list
{
1021 struct nfs_server_list
*next
;
1026 * Sync find_local_servers(<server>)
1027 * This function will probe all local networks for NFS server. This function will
1028 * block for one second while awaiting for all nfs servers to respond.
1031 * NULL : something failed
1033 * struct nfs_server_list : a linked list of all discovered servers
1035 * returned data must be freed by nfs_free_srvr_list(srv);
1037 struct nfs_server_list
*nfs_find_local_servers(void);
1038 void free_nfs_srvr_list(struct nfs_server_list
*srv
);