Commit Graph

97 Commits (aacee393caf013ead4e76906b881e77b229109bd)

Author SHA1 Message Date
Peter Lieven beaa838637 fix some compiler warnings
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-06-19 13:49:17 +02:00
Ronnie Sahlberg 08ea9a3138 UTILS: move nfs-cp from examples to utils
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-24 07:50:43 -07:00
Ronnie Sahlberg ec3a3afeae EXAMPLES: convert remaining nfs_[f]stat to nfs_[f]stat64
The old nfs_[f]stat calls are deprecated. Convert to the newer
nfs_[f]stat64 call that takes struct nfs_stat_64

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-24 07:38:17 -07:00
Ronnie Sahlberg 6f2727468d FUSE: use nfs_stat64() not nfs_stat()
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-24 07:19:01 -07:00
Alexander Graf a5042b9857 fuse_nfs: Disable multithreading
If we blindly spawn new threads based on existing open NFS shares, all
threads will concurrently still run on the same file descriptors for NFS
traffic, colliding sooner or later.

This is what happens with the fuse-nfs example program. To steer us back
into safety, we can just tell fuse to not do multi-threading which this
patch does.

This patch fixes random connection aborts with fuse_nfs for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
2015-02-15 01:49:23 +01:00
Marlies Heijkoop 7e967f4de2 Print usage when missing mandatory arguments 2014-08-16 16:38:25 +02:00
Marlies Heijkoop 6a88df2924 Fix usage message to match expected arguments 2014-08-16 16:26:17 +02:00
Ronnie Sahlberg 2db42ce2fc ZDR: remove dependency on zdr.h from the examples and nfs-ls
Signed-off-by: Ronnie Sahlberg <sahlberg@localhost>
2014-07-05 12:44:18 -07:00
Ronnie Sahlberg c7ddf2e5cb NFS-LS: Build nfs-ls as utils and make it install under bin 2014-03-21 18:31:05 -07:00
Ronnie Sahlberg a562a7f5fb examples/Makefile.am Remove stuff we do not need 2014-03-21 17:33:14 -07:00
Ronnie Sahlberg 1f8134ebe4 PORTMAP client: Pass length as sockaddr_storage, not sockaddr_in6 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg ea20b4ec24 PORTMAP client: Parse and print the actual sockaddr that UADDR2TADDR returned 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 75ec99d519 PORTMAP client: Add commands to send v3 SET/UNSET 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 24f45c5452 PORTMAP: Rename pmap3_getaddr_result to pmap3_string_result 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 729266a796 PORTMAP: Add PMAP v3 UADDR2TADDR support 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 5245608a65 PORTMAP: Add v3 GETTIME support 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 7fbedfdefd PORTMAP: Add support for PORTMAP v3 GETADDR 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 4edd78302d PORTMAPv3: Add NULL and DUMP commands. Also add portmap example client. 2014-03-19 18:25:50 -07:00
Ronnie Sahlberg 0f0e352f49 PORTMAP: Rename the functions in PMAP to PMAP2 to desribe the version of PMAP we use.
Future patches will add PMAP3 which we will need for IPv6 support.
2014-03-19 18:25:49 -07:00
Ronnie Sahlberg 55125e894a Merge pull request #68 from plieven/for-1.9.3
examples/nfs-ls: fix summary output
2014-03-17 10:29:43 -07:00
Peter Lieven 9ecd7868a6 examples/nfs-ls: fix summary output
Signed-off-by: Peter Lieven <pl@kamp.de>
2014-03-17 18:06:21 +01:00
Ronnie Sahlberg 8ae943f608 PORTMAP: Add support for V3 DUMP command
This implements the missing procedure from Issue #65
2014-03-16 14:17:06 -07:00
Ronnie Sahlberg 479302f729 Add a new nfs_stat64() function that operates on a always-64-bit stat structure 2014-03-04 19:40:05 -08:00
Ronnie Sahlberg d84d168f0f Change license for the ld preload hack to gplv3 2014-02-11 18:36:24 -08:00
Ronnie Sahlberg b8c28d541e Add a simple LD_PRELOAD toy to make cat and cp nfs-aware 2014-02-02 18:03:50 -08:00
Maxim Koltsov 5581436f5f Adjust Makefile.am's to support out-of-source builds 2014-01-08 12:36:09 +04:00
Ronnie Sahlberg c4ba61c51c Change all calls to rpc_nfs_fsinfo to rpc_nfs3_fsinfo 2013-12-31 15:06:25 -08:00
Ronnie Sahlberg 8aab33e33c Merge pull request #44 from plieven/master
fix 3 flaws detected by valgrind and bump version to intermediate version
2013-12-26 11:00:04 -08:00
Ronnie Sahlberg dc3ed8c3ab Fix some compiler warnings and bugs
Add missing %s to two example programs and fix incorrect argument to
rpc_nfs3_fsinfo_async()
2013-12-26 10:40:37 -08:00
Peter Lieven 22fbc5dad8 nfs-cp: don't leave file_context->url unitialized
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-26 14:03:57 +01:00
Ronnie Sahlberg 6d89ace041 Merge pull request #43 from plieven/master
URL parsing functions and minor fixes + enhancements
2013-12-25 16:11:29 -08:00
Ronnie Sahlberg 767a479c37 Write the total number of bytes copied by nfs-cp, not just the last block written. 2013-12-24 13:05:04 -08:00
Peter Lieven 17d3cbb136 examples/nfs-ls: add discovery mode
this adds the ability for nfs-ls to discover

a) local NFS servers

examples/nfs-ls -D nfs://

b) NFS shares on a server

examples/nfs-ls -D nfs://10.0.0.1

c) all shares on local NFS servers

examples/nfs-ls -D -R nfs://

Enjoy!

Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 15:12:50 +01:00
Peter Lieven 6bdcd5b676 examples: add nfs-io example
this simple example tool allows to
- creat and unlink files
- mkdir and rmdir directories
- stat

Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 14:50:09 +01:00
Peter Lieven 82f5df21eb examples/nfs-cp: use nfs_parse_url_full
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 14:07:01 +01:00
Peter Lieven d2ec73c75a add URL parsing functions
this adds the following 4 functions. see libnfs.h for details.

struct nfs_url *nfs_parse_url_full(struct nfs_context *nfs, char *url);
struct nfs_url *nfs_parse_url_dir(struct nfs_context *nfs, char *url);
struct nfs_url *nfs_parse_url_incomplete(struct nfs_context *nfs, char *url);
void nfs_destroy_url(struct nfs_url *url);

Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 14:03:00 +01:00
Peter Lieven 1dc9ea0d52 examples/nfs-ls: recursion and summary support
this adds recusrion and summary support, fixes some compiler warnings,
fixes exit codes and avoids a possible sprintf buffer overflow.

Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 12:46:26 +01:00
Ronnie Sahlberg b4598f416f Remove some debug residuals from fuse_nfs 2013-11-04 06:36:50 -08:00
Ronnie Sahlberg 8ca7b275f8 We don't need -odebug for the fuse nfs client anymore 2013-11-03 21:01:11 -08:00
Ronnie Sahlberg c6bd90a235 Add a simple FUSE filesystem based on libnfs. 2013-11-03 19:36:57 -08:00
Memphiz 292e2d9097 [win32] - add projects for examples to the solution and make them compile (all compile but nfsclient-bcast) 2013-05-29 18:41:31 +02:00
Ronnie Sahlberg 2384420387 Configure check for sys/time.h 2013-05-28 18:08:02 -07:00
Ronnie Sahlberg bff8fe460d Some more configure checks for headers 2013-05-28 17:54:12 -07:00
Ronnie Sahlberg 7057e733c1 Add configure checks for sys/socket.h 2013-05-28 17:43:47 -07:00
Ronnie Sahlberg 728970051c Add configure checks for whether netinet/in.h is available or not 2013-05-28 17:38:37 -07:00
Ronnie Sahlberg 67a9f57e67 WIN32 fixes 2013-05-28 16:15:16 -07:00
Ronnie Sahlberg 3d574b1eab Change nfs-cp.c example to use lseek+read/write instead of pread/pwrite since some platforms (==amiga) dont have pread/pwrite
Build nfs-ls and nfs-cp for amiga/aros
2013-04-16 18:28:50 -07:00
Ronnie Sahlberg a6bc1707f7 Add two more examples: nfs-ls and nfs-cp 2013-04-15 21:41:38 -07:00
Ronnie Sahlberg 108c622a95 more include cleanups it starts to look almost decent now 2013-04-14 10:32:01 -07:00
Ronnie Sahlberg 00748f36c5 more header include cleanups 2013-04-14 10:11:48 -07:00