summaryrefslogtreecommitdiff
path: root/nuttx/fs/nfs/rpc.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-19 01:46:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-19 01:46:02 +0000
commite5350e893168b675cfd96b36fd7aad3ccfabf791 (patch)
tree3cefb182c5003c538a217ec64505b34759a04353 /nuttx/fs/nfs/rpc.h
parenta591b9ca86b86684f2804cedf5d0c17a3614e913 (diff)
downloadpx4-nuttx-e5350e893168b675cfd96b36fd7aad3ccfabf791.tar.gz
px4-nuttx-e5350e893168b675cfd96b36fd7aad3ccfabf791.tar.bz2
px4-nuttx-e5350e893168b675cfd96b36fd7aad3ccfabf791.zip
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4749 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/rpc.h')
-rw-r--r--nuttx/fs/nfs/rpc.h54
1 files changed, 43 insertions, 11 deletions
diff --git a/nuttx/fs/nfs/rpc.h b/nuttx/fs/nfs/rpc.h
index 52694ccbd..47cfc2c0f 100644
--- a/nuttx/fs/nfs/rpc.h
+++ b/nuttx/fs/nfs/rpc.h
@@ -112,7 +112,7 @@
struct xidr
{
- uint32_t xid;
+ uint32_t xid;
};
/* PMAP headers */
@@ -126,20 +126,20 @@ struct call_args_pmap
struct call_result_pmap
{
- uint16_t port;
+ uint32_t port;
};
/* MOUNTD headers */
struct call_args_mount
{
+ uint32_t len;
char *rpath;
- uint8_t len;
};
struct call_result_mount
{
- uint16_t problem;
+ uint32_t problem;
nfsfh_t fhandle;
};
@@ -251,31 +251,63 @@ struct rpc_call_fs
/* Generic RPC reply headers */
+enum msg_type
+{
+ CALL = 0,
+ REPLY = 1
+};
+
+enum reply_stat
+{
+ MSG_ACCEPTED = 0,
+ MSG_DENIED = 1
+};
+
+enum accept_stat
+{
+ SUCCESS = 0, /* RPC executed successfully */
+ PROG_UNAVAIL = 1, /* remote hasn't exported program */
+ PROG_MISMATCH = 2, /* remote can't support version # */
+ PROC_UNAVAIL = 3, /* program can't support procedure */
+ GARBAGE_ARGS = 4, /* procedure can't decode params */
+ SYSTEM_ERR = 5 /* e.g. memory allocation failure */
+};
+
+enum reject_stat
+{
+ RPC_MISMATCH = 0, /* RPC version number != 2 */
+ AUTH_ERROR = 1 /* remote can't authenticate caller */
+};
+
struct rpc_reply_header
{
uint32_t rp_xid; /* request transaction id */
int32_t rp_direction; /* call direction (1) */
-
+ uint32_t type;
+ struct rpc_auth_info rpc_verfi;
+ uint32_t status;
+//enum msg_type rp_direction; /* call direction (1) */
+//enum reply_stat type;
+//enum accept_stat status;
+/*
struct
{
uint32_t type;
uint32_t status;
-
+*/
/* used only when reply == RPC_MSGDENIED and status == RPC_AUTHERR */
- uint32_t autherr;
+ //uint32_t autherr;
/* rpc mismatch info if reply == RPC_MSGDENIED and status == RPC_MISMATCH */
-
+/*
struct
{
uint32_t low;
uint32_t high;
} mismatch_info;
} stat;
-
- unsigned char *where;
- struct rpc_auth_info rpc_verfi;
+*/
};
struct rpc_reply_pmap