Ronnie Sahlberg
6bdc803366
Merge pull request #48 from plieven/master
...
make adjustments for v6 of the qemu NFS driver
2014-01-13 06:28:46 -08:00
Peter Lieven
d43a8953f5
make adjustments for v6 of the qemu NFS driver
...
Signed-off-by: Peter Lieven <pl@kamp.de>
2014-01-13 11:22:21 +01:00
Ronnie Sahlberg
c9cc77a538
Merge pull request #47 from Memphiz/win32fix3
...
[win32] - fixed bad number casting when using libnfs on 64bit win8 syste...
2014-01-12 15:18:59 -08:00
Memphiz
be184101ca
[win32] - fixed bad number casting when using libnfs on 64bit win8 systems - force the usage of struct __stat64 as its done on other platforms implicitly
2014-01-12 14:42:56 +01:00
Ronnie Sahlberg
2d22ee9662
Merge pull request #45 from maksbotan/master
...
Adjust Makefile.am's to support out-of-source builds
2014-01-08 06:32:07 -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
7bda8bad00
Add uid/gid to the stat data returned in the readdir directoryentry
...
We also get uid/gid for free when using READDIRPLU3 (and READDIRPLUS3 emulation)
so store these too so applications that needs to look at the uid/gid can avoid
the extra call to nfs_stat()
2013-12-31 16:25:01 -08:00
Ronnie Sahlberg
2452c57f9b
Assign the whole nfs_fh3 structure instead of element by element when possible
2013-12-31 16:11:11 -08:00
Ronnie Sahlberg
1a5b83c98c
Change rpc_nfs_readdirplus to rpc_nfs3_readdirplus
2013-12-31 15:58:59 -08:00
Ronnie Sahlberg
a64a16a2e9
Change rpc_nfs_readdir to rpc_nfs3_readir
2013-12-31 15:53:40 -08:00
Ronnie Sahlberg
7cd23ccc67
Change rpc_nfs_readlink to rpc_nfs3_readlink
2013-12-31 15:46:32 -08:00
Ronnie Sahlberg
87f81c853a
Change rpc_nfs_symlink to rpc_nfs3_symlink
2013-12-31 15:44:15 -08:00
Ronnie Sahlberg
560f94344d
Chane rpc_nfs_link to rpc_nfs3_link
2013-12-31 15:43:00 -08:00
Ronnie Sahlberg
5940c705a6
Change rpc_nfs_rename to rpc_nfs3_rename
2013-12-31 15:37:40 -08:00
Ronnie Sahlberg
b17cb0a255
Change rpc_nfs_mknod to rpc_nfs3_mknod
2013-12-31 15:33:36 -08:00
Ronnie Sahlberg
a0a5aa26f1
Change rpc_nfs_remove to rpc_nfs3_remove
2013-12-31 15:23:44 -08:00
Ronnie Sahlberg
789c3f1205
Change rpc_nfs_create to rpc_nfs3_create
2013-12-31 15:21:20 -08:00
Ronnie Sahlberg
bf817ee694
Change rpc_nfs_rmdir to rpc_nfs3_rmdir
2013-12-31 15:20:28 -08:00
Ronnie Sahlberg
acabd6bf14
Change rpc_nfs_mkdir to rpc_nfs3_mkdir
2013-12-31 15:17:16 -08:00
Ronnie Sahlberg
1a5636ffa7
Change rpc_nfs_commit to rpc_nfs3_commit
2013-12-31 15:16:02 -08:00
Ronnie Sahlberg
b701254d40
Change rpc_nfs_setattr to rpc_nfs3_setattr
2013-12-31 15:12:32 -08:00
Ronnie Sahlberg
0249c17be0
Change all calls to rpc_nfs_fsstat to rpc_nfs3_fsstat
2013-12-31 15:08:11 -08: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
3f30ac7800
Create SOCURRENT/SOREVISION/SOAGE in lib/Makefile.am
2013-12-26 10:52:43 -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
Ronnie Sahlberg
eda77ec3f3
Change rpc_mount_* to rpc_mount3_* and make it explicit which version of
...
the protocol we are using.
2013-12-26 09:11:05 -08:00
Ronnie Sahlberg
20d6926ed6
Change rpc_set_context_args to nfs_set_context_args and make it static
...
It only makes sense to pass url arguments to an nfs URL and thus a nfs context.
While some arguments may apply to the underlying raw rpc context (uid, gid,
tcp settings etc) some future arguments may need to apply to the nfs context
instead, such as selecting nfs version, whether or not to force sync writes
etc.
2013-12-26 09:08:26 -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
Peter Lieven
eb2759c62b
bump version to 1.8.90
...
I need this to detect that we have (almost) version 1.9.0 in qemu,
but I think we should do some more testing before releasing 1.9.0.
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-26 12:49:28 +01:00
Peter Lieven
b70567b62c
nfs_parse_url: initialize memory
...
the urls struct was accidently left unitialized.
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-26 12:48:21 +01:00
Peter Lieven
1f1b1c5c93
nfs_parse_url_incomplete: fix use after free in param parsing
...
if no server is specified flagsp points into urls->server.
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-26 10:43:15 +01:00
Ronnie Sahlberg
36f488dc7a
Create a new function rpc_set_context_args where we parse and set the context
...
arguments.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2013-12-25 16:57:52 -08:00
Ronnie Sahlberg
eca514653d
MOUNT: The wrappers for the old MOUNT rpc calls should call the new functions and not recurse
2013-12-25 16:46:52 -08:00
Ronnie Sahlberg
b2a4b99ee9
Add the url parsing functions to libnfs-win32.def
2013-12-25 16:29:00 -08:00
Ronnie Sahlberg
0961765a56
Document the URL syntax
2013-12-25 16:27:10 -08: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
Ronnie Sahlberg
35280fd7a4
Grow the marshalling buffer from 64k to 1M so we can marshall really large WRITE3s
2013-12-24 13:03:50 -08:00
Ronnie Sahlberg
04e9034165
MOUNT: Add RPC support for MOUNTv1
2013-12-24 12:20:41 -08:00
Ronnie Sahlberg
f38aacf8c9
Add NFSv2 RPC support
2013-12-24 11:28:56 -08:00
Ronnie Sahlberg
463d59bf8e
NFS: Add new function signatures for rpc_nfs3_ that takes *3args arguments
...
to match the XDR.
Leave the existing ad-hoc rpc_nfs_* functions for backward compatibility.
2013-12-24 11:16:21 -08:00
Ronnie Sahlberg
21668dcef4
Add missing symbols to libnfs-win32.def and make them EXTERN
2013-12-24 08:54:28 -08:00
Ronnie Sahlberg
cd954dd55e
NFS: Update compile_rpc and regenerate the nfs marshalling/unmarshalling code
...
We had some manual changes to the nfs code to handle ANDROID and WIN32.
Update the rpc generation target to add these extra define.
2013-12-24 08:34:38 -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
9126c9c036
add uid and gid URL param to specify alternate uid and/or gid
...
This allows to connect with an alternate uid or gid than that
of the current user.
Example:
examples/nfs-ls nfs://10.0.0.1/export?uid=1000&gid=33
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 14:03:26 +01:00
Peter Lieven
1c8b4547ce
add tcp-syncnt URL param to adjust TCP_SYNCNT sockopt
...
This allows indirect support for a configurable connect timeout.
Linux uses a exponential backoff for SYN retries starting
with 1 second.
This means for a value n for TCP_SYNCNT, the connect will
effectively timeout after 2^(n+1)-1 seconds.
Example:
examples/nfs-ls nfs://10.0.0.1/export?tcp-syncnt=1
Signed-off-by: Peter Lieven <pl@kamp.de>
2013-12-23 14:03:18 +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