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>
libnfs_zdr_opaque: make valgrind happy

valgrind complains about unitialized memory

Signed-off-by: Peter Lieven <pl@kamp.de>
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>
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>
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>
examples/nfs-cp: use nfs_parse_url_full

Signed-off-by: Peter Lieven <pl@kamp.de>