diff options
author | Tom Haynes <loghyr@primarydata.com> | 2015-09-04 10:54:51 -0700 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-09-09 11:20:24 +0000 |
commit | 6e82854667febacec4058c0a1a9789e2608132b5 (patch) | |
tree | 2eb0559a26bde44fabeb59e5ec5bd4c2ca3ce547 /epan/dissectors/packet-nfs.c | |
parent | a79967f1e069a260a2a9d37075a53b8af79597d7 (diff) |
nfs: Add new attributes for NFSv4.2
Change-Id: Ib6f0c723dc7a5f031cdc52fd339a8fb29362370b
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10425
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-nfs.c')
-rw-r--r-- | epan/dissectors/packet-nfs.c | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 3149849dcb..4fbdac079d 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -596,6 +596,10 @@ static int hf_nfs4_ffda_minorversion = -1; static int hf_nfs4_ffda_tightly_coupled = -1; static int hf_nfs4_ffda_rsize = -1; static int hf_nfs4_ffda_wsize = -1; +static int hf_nfs4_fattr_clone_blocksize = -1; +static int hf_nfs4_fattr_space_freed = -1; +static int hf_nfs4_fattr_change_attr_type = -1; + static gint ett_nfs = -1; static gint ett_nfs_fh_encoding = -1; static gint ett_nfs_fh_mount = -1; @@ -6016,6 +6020,12 @@ static const value_string fattr4_names[] = { { FATTR4_SUPPATTR_EXCLCREAT, "Suppattr_ExclCreat" }, #define FATTR4_FS_CHARSET_CAP 76 { FATTR4_FS_CHARSET_CAP, "FS_Charset_Cap" }, +#define FATTR4_CLONE_BLOCKSIZE 77 + { FATTR4_CLONE_BLOCKSIZE, "Clone_Block_Size" }, +#define FATTR4_SPACE_FREED 78 + { FATTR4_SPACE_FREED, "Space_Freed" }, +#define FATTR4_CHANGE_ATTR_TYPE 79 + { FATTR4_CHANGE_ATTR_TYPE, "Change_Attr_Type" }, #define FATTR4_SECURITY_LABEL 80 { FATTR4_SECURITY_LABEL, "Security_Label" }, { 0, NULL } @@ -6614,6 +6624,21 @@ dissect_nfs4_security_label(tvbuff_t *tvb, proto_tree *tree, int offset) */ #define MAX_BITMAPS 100 +static const value_string names_nfs_change_attr_types[] = +{ +#define CHANGE_TYPE_IS_MONOTONIC_INCR 1 + { CHANGE_TYPE_IS_MONOTONIC_INCR, "CHANGE_TYPE_IS_MONOTONIC_INCR" }, +#define CHANGE_TYPE_IS_VERSION_COUNTER 2 + { CHANGE_TYPE_IS_VERSION_COUNTER, "CHANGE_TYPE_IS_VERSION_COUNTER" }, +#define CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS 3 + { CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS, "CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS" }, +#define CHANGE_TYPE_IS_TIME_METADATA 4 + { CHANGE_TYPE_IS_TIME_METADATA, "CHANGE_TYPE_IS_TIME_METADATA" }, +#define CHANGE_TYPE_IS_UNDEFINED 5 + { CHANGE_TYPE_IS_UNDEFINED, "CHANGE_TYPE_IS_UNDEFINED" }, + { 0, NULL } +}; + /* Display each attrmask bitmap and optionally dissect the value. */ static int @@ -6968,6 +6993,21 @@ dissect_nfs4_fattrs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t offset); break; + case FATTR4_CLONE_BLOCKSIZE: + offset = dissect_rpc_uint32(tvb, attr_tree, hf_nfs4_fattr_clone_blocksize, + offset); + break; + + case FATTR4_SPACE_FREED: + offset = dissect_rpc_uint64(tvb, attr_tree, hf_nfs4_fattr_space_freed, + offset); + break; + + case FATTR4_CHANGE_ATTR_TYPE: + offset = dissect_rpc_uint32(tvb, attr_tree, hf_nfs4_fattr_change_attr_type, + offset); + break; + case FATTR4_SECURITY_LABEL: offset = dissect_nfs4_security_label(tvb, attr_tree, offset); break; @@ -7550,7 +7590,6 @@ dissect_nfs4_dirlist(tvbuff_t *tvb, int offset, packet_info *pinfo, return offset; } - static int dissect_nfs4_change_info(tvbuff_t *tvb, int offset, proto_tree *tree, const char *name) @@ -12347,6 +12386,18 @@ proto_register_nfs(void) FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, NULL, HFILL }}, + { &hf_nfs4_fattr_clone_blocksize, { + "clone block size", "nfs.fattr4.clone_block_size", FT_UINT32, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_nfs4_fattr_space_freed, { + "space freed", "nfs.fattr4.space_freed", FT_UINT64, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_nfs4_fattr_change_attr_type, { + "change attr type", "nfs.fattr4.change_attr_type", FT_UINT32, BASE_DEC, + VALS(names_nfs_change_attr_types), 0, NULL, HFILL }}, + /* Hidden field for v2, v3, and v4 status */ { &hf_nfs_status, { "Status", "nfs.status", FT_UINT32, BASE_DEC | BASE_EXT_STRING, |