Wireshark-dev: Re: [Wireshark-dev] [PATCH] Tweaked NFSv4 packet dissectors for wireshark

From: "Maynard, Chris" <Christopher.Maynard@xxxxxxxxx>
Date: Wed, 29 Jun 2011 23:01:26 -0400
Hello Steve,
Thanks for your patch, but this is probably going to get lost/forgotten unless it's filed as a bug report here: https://bugs.wireshark.org/bugzilla/.
- Chris


> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
> bounces@xxxxxxxxxxxxx] On Behalf Of Steve Dickson
> Sent: Friday, May 20, 2011 10:21 AM
> To: wireshark-dev@xxxxxxxxxxxxx
> Subject: [Wireshark-dev] [PATCH] Tweaked NFSv4 packet dissectors for
> wireshark
> 
> Hello,
> 
> Here are a couple tweaks to the NFSv4 dissectors
> that will show all the ops and their status on in the
> packet detail window. Showing all the ops in that
> window I think works well the new configuration
> of only showing 'significant' v4 opts in the packet
> list window. Plus there is plenty of  real estate
> on that line.
> 
> I also put NFS4_OP_SEQUENCE on the same tier as NFS4_OP_PUTFH
> since when NFSv4.1 is used, the SEQUENCE will in every
> compound like PUTFHs are.
> 
> Please cc me with any comments since I am not a member of
> this list.
> 
> tia,
> 
> steved.
> 
> 
> Index: epan/dissectors/packet-nfs.c
> ===================================================================
> --- epan/dissectors/packet-nfs.c	(revision 37323)
> +++ epan/dissectors/packet-nfs.c	(working copy)
> @@ -768,7 +768,7 @@
>  		 1 /* 50, NFS4_OP_LAYOUTGET */,
>  		 1 /* 51, NFS4_OP_LAYOUTRETURN */,
>  		 1 /* 52, NFS4_OP_SECINFO_NO_NAME */,
> -		 1 /* 53, NFS4_OP_SEQUENCE */,
> +		 4 /* 53, NFS4_OP_SEQUENCE */,
>  		 1 /* 54, NFS4_OP_SET_SSV */,
>  		 1 /* 55, NFS4_OP_TEST_STATEID */,
>  		 1 /* 56, NFS4_OP_WANT_DELEGATION  */,
> @@ -8970,6 +8970,8 @@
>  		ftree = proto_item_add_subtree(fitem, ett_nfs_argop4);
>  	}
> 
> +	proto_item_append_text(tree, ", Ops(%d):", ops);
> +
>  	for (ops_counter=0; ops_counter<ops; ops_counter++)
>  	{
>  		op_summary[ops_counter].optext = g_string_new("");
> @@ -9003,6 +9005,7 @@
>  		g_string_printf (op_summary[ops_counter].optext, "%s",
>                                   val_to_str_ext_const(opcode,
> &names_nfsv4_operation_ext, "Unknown"));
> 
> +		proto_item_append_text(tree, " %s", opname);
> 
>  		switch(opcode)
>  		{
> @@ -9621,6 +9624,8 @@
>  		ftree = proto_item_add_subtree(fitem, ett_nfs_resop4);
>  	}
> 
> +	proto_item_append_text(tree, ", Ops(%d):", ops);
> +
>  	for (ops_counter = 0; ops_counter < ops; ops_counter++)
>  	{
>  		op_summary[ops_counter].optext = g_string_new("");
> @@ -9654,6 +9659,12 @@
>  		g_string_append_printf (op_summary[ops_counter].optext, "%s",
> opname);
> 
>  		offset = dissect_nfs_nfsstat4(tvb, offset, newftree, &status);
> +		if (status != NFS4_OK) {
> +			proto_item_append_text(tree, " %s(%s)", opname,
> +				val_to_str_ext(status, &names_nfs_stat_ext,
> "Unknown error:%u"));
> +		} else {
> +			proto_item_append_text(tree, " %s", opname);
> +		}
> 
>  		/*
>  		 * With the exception of NFS4_OP_LOCK, NFS4_OP_LOCKT, and







CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and 
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.