diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-14 14:35:31 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-14 14:35:31 +0000 |
commit | 1c2b2798b4118451a6a915a756cb26423d779ac3 (patch) | |
tree | 1650ef4245e7dd509784c670e2a5d0e2771c5f6e /nuttx/include | |
parent | c3cba922650428a04863083e0c891aeec57746a4 (diff) | |
download | px4-firmware-1c2b2798b4118451a6a915a756cb26423d779ac3.tar.gz px4-firmware-1c2b2798b4118451a6a915a756cb26423d779ac3.tar.bz2 px4-firmware-1c2b2798b4118451a6a915a756cb26423d779ac3.zip |
Clean up NFS user interface; Fix NFS disconnect bug
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4841 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/fs/nfs.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/nuttx/include/nuttx/fs/nfs.h b/nuttx/include/nuttx/fs/nfs.h index 3dbcc6dc8..2b1404461 100644 --- a/nuttx/include/nuttx/fs/nfs.h +++ b/nuttx/include/nuttx/fs/nfs.h @@ -53,8 +53,18 @@ * Pre-processor Definitions ****************************************************************************/ -#define NFS_NFSV3 0x00000200 /* Use NFS Version 3 protocol */ -#define NFS_PMAPPORT 111 +/* NFS mount option flags */ + +#define NFSMNT_SOFT (1 << 0) /* Soft mount (hard is default) */ +#define NFSMNT_WSIZE (1 << 1) /* Set write size */ +#define NFSMNT_RSIZE (1 << 2) /* Set read size */ +#define NFSMNT_TIMEO (1 << 3) /* Set initial timeout */ +#define NFSMNT_RETRANS (1 << 4) /* Set number of request retries */ +#define NFSMNT_READDIRSIZE (1 << 5) /* Set readdir size */ + +/* Default PMAP port number to provide */ + +#define NFS_PMAPPORT 111 /**************************************************************************** * Public Types @@ -64,12 +74,12 @@ struct nfs_args { uint8_t addrlen; /* Length of address */ uint8_t sotype; /* Socket type */ - uint32_t flags; /* Flags */ - int wsize; /* Write size in bytes */ - int rsize; /* Read size in bytes */ - int readdirsize; /* readdir size in bytes */ - int timeo; /* Initial timeout in .1 secs */ - int retrans; /* Times to retry send */ + uint8_t flags; /* Flags, determines if following are valid: */ + uint8_t timeo; /* Initial timeout in .1 secs (with NFSMNT_TIMEO) */ + uint8_t retrans; /* Times to retry send (with NFSMNT_RETRANS) */ + uint16_t wsize; /* Write size in bytes (with NFSMNT_WSIZE) */ + uint16_t rsize; /* Read size in bytes (with NFSMNT_RSIZE) */ + uint16_t readdirsize; /* readdir size in bytes (with NFSMNT_READDIRSIZE) */ char *path; /* Server's path of the directory being mount */ struct sockaddr_storage addr; /* File server address (requires 32-bit alignment) */ }; |