[pnfs] wireshark

J. Bruce Fields bfields at fieldses.org
Tue Jun 3 16:25:08 EDT 2008


On Mon, May 26, 2008 at 09:13:20AM +0200, Tigran Mkrtchyan wrote:
> >From 2bf22455c11532a60718d4d623dbdcdb3ed367b1 Mon Sep 17 00:00:00 2001
> From: Tigran Mkrtchyan <tigran.mkrtchyan at desy.de>
> Date: Sun, 25 May 2008 22:44:03 +0200
> Subject: [PATCH 11/12] display all file attribytes defined by v41
>  decode fattr4_layout_blksize
> 

Just out of curiosity--when wireshark sees one of the attributes for
which we've made one of these defines, but haven't defined a dissector
for the contents of the attribute, what does wireshark display?

--b.

> ---
>  epan/dissectors/packet-nfs.c |   54 +++++++++++++++++++++++++++++++++++-------
>  1 files changed, 45 insertions(+), 9 deletions(-)
> 
> diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
> index fc2b296..291da56 100644
> --- a/epan/dissectors/packet-nfs.c
> +++ b/epan/dissectors/packet-nfs.c
> @@ -293,6 +293,7 @@ static int hf_nfs_fattr4_space_free = -1;
>  static int hf_nfs_fattr4_space_total = -1;
>  static int hf_nfs_fattr4_space_used = -1;
>  static int hf_nfs_fattr4_mounted_on_fileid = -1;
> +static int hf_nfs_fattr4_layout_blksize = -1;
>  static int hf_nfs_who = -1;
>  static int hf_nfs_server = -1;
>  static int hf_nfs_fslocation4 = -1;
> @@ -6451,16 +6452,44 @@ static const value_string names_fattr4[] = {
>  	{	FATTR4_DIR_NOTIF_DELAY, "FATTR4_DIR_NOTIF_DELAY"	},
>  #define FATTR4_DIRENT_NOTIF_DELAY   57
>  	{	FATTR4_DIRENT_NOTIF_DELAY, "FATTR4_DIRENT_NOTIF_DELAY"	},
> -#define FATTR4_SEND_IMPL_ID   58
> -	{	FATTR4_SEND_IMPL_ID, "FATTR4_SEND_IMPL_ID"	},
> -#define FATTR4_RECV_IMPL_ID  59
> -	{	FATTR4_RECV_IMPL_ID, "FATTR4_RECV_IMPL_ID"	},
> -#define FATTR4_ABSENT  60
> -	{	FATTR4_ABSENT, "FATTR4_ABSENT"	},
> +#define FATTR4_DACL   58
> +	{	FATTR4_DACL, "FATTR4_DACL"	},
> +#define FATTR4_SACL  59
> +	{	FATTR4_SACL, "FATTR4_SACL"	},
> +#define FATTR4_CHANGE_POLICY  60
> +	{	FATTR4_CHANGE_POLICY, "FATTR4_CHANGE_POLICY"	},
>  #define FATTR4_FS_STATUS  61
>  	{	FATTR4_FS_STATUS, "FATTR4_FS_STATUS"	},
> -#define FATTR4_FS_LAYOUT_TYPES   62
> -	{	FATTR4_MOUNTED_ON_FILEID, "FATTR4_FS_LAYOUT_TYPES"	},
> +#define FATTR4_FS_LAYOUT_TYPE   62
> +	{	FATTR4_FS_LAYOUT_TYPE, "FATTR4_FS_LAYOUT_TYPE"	},
> +#define FATTR4_LAYOUT_HINT		63
> +	{	FATTR4_LAYOUT_HINT, "FATTR4_LAYOUT_HINT" },
> +#define FATTR4_LAYOUT_TYPE		64
> +	{	FATTR4_LAYOUT_TYPE, "FATTR4_LAYOUT_TYPE" },
> +#define FATTR4_LAYOUT_BLKSIZE		65
> +	{	FATTR4_LAYOUT_BLKSIZE, "FATTR4_LAYOUT_BLKSIZE" },
> +#define FATTR4_LAYOUT_ALIGNMENT		66
> +	{	FATTR4_LAYOUT_ALIGNMENT, "FATTR4_LAYOUT_ALIGNMENT" },
> +#define FATTR4_FS_LOCATIONS_INFO	67
> +	{	FATTR4_FS_LOCATIONS_INFO, "FATTR4_FS_LOCATIONS_INFO" },
> +#define FATTR4_MDSTHRESHOLD		68
> +	{	FATTR4_MDSTHRESHOLD, "FATTR4_MDSTHRESHOLD" },
> +#define FATTR4_RETENTION_GET		69
> +	{	FATTR4_RETENTION_GET, "FATTR4_RETENTION_GET" },
> +#define FATTR4_RETENTION_SET		70
> +	{	FATTR4_RETENTION_SET, "FATTR4_RETENTION_SET" },
> +#define FATTR4_RETENTEVT_GET		71
> +	{	FATTR4_RETENTEVT_GET, "FATTR4_RETENTEVT_GET" },
> +#define FATTR4_RETENTEVT_SET		72
> +	{	FATTR4_RETENTEVT_SET, "FATTR4_RETENTEVT_SET" },
> +#define FATTR4_RETENTION_HOLD		73
> +	{	FATTR4_RETENTION_HOLD, "FATTR4_RETENTION_HOLD" },
> +#define FATTR4_MODE_SET_MASKED		74
> +	{	FATTR4_MODE_SET_MASKED, "FATTR4_MODE_SET_MASKED" },
> +#define FATTR4_SUPPATTR_EXCLCREAT	75
> +	{	FATTR4_SUPPATTR_EXCLCREAT, "FATTR4_SUPPATTR_EXCLCREAT" },
> +#define FATTR4_FS_CHARSET_CAP		76
> +	{	FATTR4_FS_CHARSET_CAP, "FATTR4_FS_CHARSET_CAP" },
>  	{	0,	NULL	}
>  };
>  
> @@ -6803,7 +6832,10 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
>  						attr_vals_offset = dissect_rpc_uint64(tvb, attr_newftree,
>  							hf_nfs_fattr4_mounted_on_fileid, attr_vals_offset);
>  						break;
> -
> +					case FATTR4_LAYOUT_BLKSIZE:
> +						attr_vals_offset = dissect_rpc_uint32(tvb, attr_newftree,
> +								hf_nfs_fattr4_layout_blksize, attr_vals_offset);
> +						break;
>  					default:
>  						break;
>  					}
> @@ -9851,6 +9883,10 @@ proto_register_nfs(void)
>  			"fileid", "nfs.fattr4.mounted_on_fileid", FT_UINT64, BASE_HEX,
>  			NULL, 0, NULL, HFILL }},
>  
> +		{ &hf_nfs_fattr4_layout_blksize, {
> +				"fileid", "nfs.fattr4.layout_blksize", FT_UINT32, BASE_DEC,
> +				NULL, 0, NULL, HFILL }},
> +
>  		{ &hf_nfs_verifier4, {
>  			"verifier", "nfs.verifier4", FT_UINT64, BASE_HEX,
>  			NULL, 0, NULL, HFILL }},
> -- 
> 1.5.5.1.211.g65ea3


More information about the pNFS mailing list