X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Flibnfs.h;h=3a8304a00f9187f782d951d1fa0ae9996d2c9e0e;hb=0804e67d7a512585cebd3c453e5d05986b8ad218;hp=81febb23ec34cb4b7182dc8f98a3e18594842002;hpb=552c766578d37c4d1eb150436da7eeed104f1fe9;p=deb_libnfs.git diff --git a/include/libnfs.h b/include/libnfs.h index 81febb2..3a8304a 100644 --- a/include/libnfs.h +++ b/include/libnfs.h @@ -582,6 +582,14 @@ struct nfsdirent { struct nfsdirent *next; char *name; uint64_t inode; + + /* some extra fields we get for free through the READDIRPLUS3 call. You need libnfs-raw-nfs.h for these */ + uint32_t type; /* NF3REG, NF3DIR, NF3BLK, ... */ + uint32_t mode; + uint64_t size; + struct timeval atime; + struct timeval mtime; + struct timeval ctime; }; /* * nfs_readdir() never blocks, so no special sync/async versions are available @@ -955,10 +963,24 @@ off_t nfs_get_current_offset(struct nfsfh *nfsfh); + + struct nfs_server_list { struct nfs_server_list *next; char *addr; }; +/* + * Sync find_local_servers() + * This function will probe all local networks for NFS server. This function will + * block for one second while awaiting for all nfs servers to respond. + * + * Function returns + * NULL : something failed + * + * struct nfs_server_list : a linked list of all discovered servers + * + * returned data must be freed by nfs_free_srvr_list(srv); + */ struct nfs_server_list *nfs_find_local_servers(void); void free_nfs_srvr_list(struct nfs_server_list *srv);