sahlberg/libnfs — pull request #41 by plieven (2013-12-17 15:27:01+00:00)
Title: add environment variable to set TCP_SYNCNT

this adds the possibility to set the TCP_SYNCNT sockopt to alternate value
via environment variable LIBNFS_TCP_SYNCNT.

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:
LIBNFS_TCP_SYNCNT=1 examples/nfs-ls nfs://10.0.0.1/export

Signed-off-by: Peter Lieven