Blame wireshark-nfsv41-cleanup.patch

Steve Dickson 35ded6
diff -up wireshark-1.4.6/epan/dissectors/packet-nfs.c.orig wireshark-1.4.6/epan/dissectors/packet-nfs.c
Steve Dickson 35ded6
--- wireshark-1.4.6/epan/dissectors/packet-nfs.c.orig	2011-04-18 14:42:51.000000000 -0400
Steve Dickson 35ded6
+++ wireshark-1.4.6/epan/dissectors/packet-nfs.c	2011-05-19 14:22:55.375762000 -0400
Steve Dickson 35ded6
@@ -8793,12 +8793,13 @@ dissect_nfs_argop4(tvbuff_t *tvb, int of
Steve Dickson 35ded6
 		ftree = proto_item_add_subtree(fitem, ett_nfs_argop4);
Steve Dickson 35ded6
 	}
Steve Dickson 35ded6
 
Steve Dickson 35ded6
+	proto_item_append_text(tree, ", Ops(%d):", ops);
Steve Dickson 35ded6
+
Steve Dickson 35ded6
 	for (ops_counter=0; ops_counter
Steve Dickson 35ded6
 	{
Steve Dickson 35ded6
 		opcode = tvb_get_ntohl(tvb, offset);
Steve Dickson 35ded6
 		if (check_col(pinfo->cinfo, COL_INFO)) {
Steve Dickson 35ded6
-			col_append_fstr(pinfo->cinfo, COL_INFO, "%c%s",
Steve Dickson 35ded6
-				ops_counter==0?' ':';',
Steve Dickson 35ded6
+			col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
Steve Dickson 35ded6
 				val_to_str(opcode, names_nfsv4_operation, "Unknown"));
Steve Dickson 35ded6
 		}
Steve Dickson 35ded6
 
Steve Dickson 35ded6
@@ -8821,6 +8822,8 @@ dissect_nfs_argop4(tvbuff_t *tvb, int of
Steve Dickson 35ded6
 		} else {
Steve Dickson 35ded6
 			break;
Steve Dickson 35ded6
 		}
Steve Dickson 35ded6
+		proto_item_append_text(tree, " %s",
Steve Dickson 35ded6
+			val_to_str(opcode, names_nfsv4_operation, "Unknown"));
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 		switch(opcode)
Steve Dickson 35ded6
 		{
Steve Dickson 35ded6
@@ -9225,7 +9228,7 @@ dissect_nfs4_compound_call(tvbuff_t *tvb
Steve Dickson 35ded6
 	char *tag=NULL;
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 	offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, &tag;;
Steve Dickson 35ded6
-	if (check_col(pinfo->cinfo, COL_INFO)) {
Steve Dickson 35ded6
+	if (check_col(pinfo->cinfo, COL_INFO) && strcmp(tag, "<EMPTY>")) {
Steve Dickson 35ded6
 		col_append_fstr(pinfo->cinfo, COL_INFO," %s", tag);
Steve Dickson 35ded6
 	}
Steve Dickson 35ded6
 
Steve Dickson 35ded6
@@ -9287,6 +9290,7 @@ dissect_nfs_resop4(tvbuff_t *tvb, int of
Steve Dickson 35ded6
 	if (fitem) {
Steve Dickson 35ded6
 		ftree = proto_item_add_subtree(fitem, ett_nfs_resop4);
Steve Dickson 35ded6
 	}
Steve Dickson 35ded6
+	proto_item_append_text(tree, ", Ops(%d):", ops);
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 	for (ops_counter = 0; ops_counter < ops; ops_counter++)
Steve Dickson 35ded6
 	{
Steve Dickson 35ded6
@@ -9297,11 +9301,6 @@ dissect_nfs_resop4(tvbuff_t *tvb, int of
Steve Dickson 35ded6
 			(opcode != NFS4_OP_ILLEGAL))
Steve Dickson 35ded6
 			break;
Steve Dickson 35ded6
 
Steve Dickson 35ded6
-		if (check_col(pinfo->cinfo, COL_INFO)) {
Steve Dickson 35ded6
-			col_append_fstr(pinfo->cinfo, COL_INFO, "%c%s",
Steve Dickson 35ded6
-				ops_counter==0?' ':';',
Steve Dickson 35ded6
-				val_to_str(opcode, names_nfsv4_operation, "Unknown"));
Steve Dickson 35ded6
-		}
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 		fitem = proto_tree_add_uint(ftree, hf_nfs_resop4, tvb, offset, 4,
Steve Dickson 35ded6
 			opcode);
Steve Dickson 35ded6
@@ -9319,6 +9318,22 @@ dissect_nfs_resop4(tvbuff_t *tvb, int of
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 		offset = dissect_nfs_nfsstat4(tvb, offset, newftree, &status);
Steve Dickson 35ded6
 
Steve Dickson 35ded6
+		if (status != NFS4_OK) {
Steve Dickson 35ded6
+			if (check_col(pinfo->cinfo, COL_INFO)) {
Steve Dickson 35ded6
+				col_append_fstr(pinfo->cinfo, COL_INFO, " %s(%d)",
Steve Dickson 35ded6
+				val_to_str(opcode, names_nfsv4_operation, "Unknown"),
Steve Dickson 35ded6
+				status);
Steve Dickson 35ded6
+			}
Steve Dickson 35ded6
+			proto_item_append_text(tree, " %s(%d)",
Steve Dickson 35ded6
+				val_to_str(opcode, names_nfsv4_operation, "Unknown"), status);
Steve Dickson 35ded6
+		} else {
Steve Dickson 35ded6
+			if (check_col(pinfo->cinfo, COL_INFO)) {
Steve Dickson 35ded6
+				col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
Steve Dickson 35ded6
+					val_to_str(opcode, names_nfsv4_operation, "Unknown"));
Steve Dickson 35ded6
+			}
Steve Dickson 35ded6
+			proto_item_append_text(tree, " %s",
Steve Dickson 35ded6
+				val_to_str(opcode, names_nfsv4_operation, "Unknown"));
Steve Dickson 35ded6
+		}
Steve Dickson 35ded6
 		/*
Steve Dickson 35ded6
 		 * With the exception of NFS4_OP_LOCK, NFS4_OP_LOCKT, and
Steve Dickson 35ded6
 		 * NFS4_OP_SETATTR, all other ops do *not* return data with the
Steve Dickson 35ded6
@@ -9569,7 +9584,7 @@ dissect_nfs4_compound_reply(tvbuff_t *tv
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 	offset = dissect_nfs_nfsstat4(tvb, offset, tree, &status);
Steve Dickson 35ded6
 	offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, &tag;;
Steve Dickson 35ded6
-	if (check_col(pinfo->cinfo, COL_INFO)) {
Steve Dickson 35ded6
+	if (check_col(pinfo->cinfo, COL_INFO) && strcmp(tag, "<EMPTY>")) {
Steve Dickson 35ded6
 		col_append_fstr(pinfo->cinfo, COL_INFO," %s", tag);
Steve Dickson 35ded6
 	}
Steve Dickson 35ded6
 
Steve Dickson 35ded6
@@ -9663,14 +9678,14 @@ static const value_string nfsv3_proc_val
Steve Dickson 35ded6
 static const vsff nfs4_proc[] = {
Steve Dickson 35ded6
 	{ 0, "NULL",
Steve Dickson 35ded6
 	dissect_nfs3_null_call,		dissect_nfs3_null_reply },
Steve Dickson 35ded6
-	{ 1, "COMPOUND",
Steve Dickson 35ded6
+	{ 1, "COMP",
Steve Dickson 35ded6
 	dissect_nfs4_compound_call, dissect_nfs4_compound_reply },
Steve Dickson 35ded6
 	{ 0, NULL, NULL, NULL }
Steve Dickson 35ded6
 };
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 static const value_string nfsv4_proc_vals[] = {
Steve Dickson 35ded6
 	{ 0, "NULL" },
Steve Dickson 35ded6
-	{ 1, "COMPOUND" },
Steve Dickson 35ded6
+	{ 1, "COMP" },
Steve Dickson 35ded6
 	{ 0, NULL }
Steve Dickson 35ded6
 };
Steve Dickson 35ded6
 
Steve Dickson 35ded6
@@ -9944,7 +9959,7 @@ dissect_nfs_cb_argop(tvbuff_t *tvb, int 
Steve Dickson 35ded6
 	{
Steve Dickson 35ded6
 		opcode = tvb_get_ntohl(tvb, offset);
Steve Dickson 35ded6
 		if (check_col(pinfo->cinfo, COL_INFO))
Steve Dickson 35ded6
-		  col_append_fstr(pinfo->cinfo, COL_INFO, "%c%s", ops_counter==0?' ':';',
Steve Dickson 35ded6
+		  col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
Steve Dickson 35ded6
 				  val_to_str(opcode, names_nfs_cb_operation, "Unknown"));
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 		fitem = proto_tree_add_uint(ftree, hf_nfs_cb_argop, tvb, offset, 4, opcode);
Steve Dickson 35ded6
@@ -10047,7 +10062,7 @@ dissect_nfs_cb_resop(tvbuff_t *tvb, int 
Steve Dickson 35ded6
 			break;
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 		if (check_col(pinfo->cinfo, COL_INFO))
Steve Dickson 35ded6
-			col_append_fstr(pinfo->cinfo, COL_INFO, "%c%s",	ops_counter==0?' ':';',
Steve Dickson 35ded6
+			col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
Steve Dickson 35ded6
 					val_to_str(opcode, names_nfs_cb_operation, "Unknown"));
Steve Dickson 35ded6
 
Steve Dickson 35ded6
 		fitem = proto_tree_add_uint(ftree, hf_nfs_cb_resop, tvb, offset, 4, opcode);