X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Fnfsclient-sync.c;h=aeb3eedf4b6ecca8082a51d70234bca67175321e;hb=763cd6e3e2bbb6906186e7ed6a86660276b596b7;hp=a481652f01489c0fc05c91891bd10ef060efb504;hpb=dba24f1079c0814f2efde0f8394b0c180f868c3c;p=deb_libnfs.git diff --git a/examples/nfsclient-sync.c b/examples/nfsclient-sync.c index a481652..aeb3eed 100644 --- a/examples/nfsclient-sync.c +++ b/examples/nfsclient-sync.c @@ -48,8 +48,8 @@ WSADATA wsaData; #include #include #include +#include "libnfs-zdr.h" #include "libnfs.h" -#include /* for authunix_create() */ #include "libnfs-raw.h" #include "libnfs-raw-mount.h" @@ -61,13 +61,28 @@ struct client { }; +void PrintServerList() +{ + struct nfs_server_list *srvrs; + struct nfs_server_list *srv; + + srvrs = nfs_find_local_servers(); + + for (srv=srvrs; srv; srv = srv->next) + { + printf("Found nfs server: %s\n", srv->addr); + + } + free_nfs_srvr_list(srvrs); +} + char buf[3*1024*1024+337]; int main(int argc _U_, char *argv[] _U_) { struct nfs_context *nfs; int i, ret; - off_t offset; + uint64_t offset; struct client client; struct stat st; struct nfsfh *nfsfh; @@ -86,6 +101,9 @@ int main(int argc _U_, char *argv[] _U_) client.server = SERVER; client.export = EXPORT; client.is_finished = 0; + + PrintServerList(); + export = mount_getexports(SERVER); if (export != NULL) { printf("exports on server %s\n", SERVER);