Ethereal-dev: [Ethereal-dev] [patch] NFSv4 dissector (packet-nfs.c)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Mike Frisch <mfrisch@xxxxxxxxxx>
Date: Wed, 2 Jun 2004 11:02:33 -0400
This patch addresses the following in the NFSv4 dissector in
packet-nfs.c:

- Fixed tree display of NFSv4 change_info type
- Added OPEN4_RESULT_LOCKTYPE_POSIX to OPEN result (reply) flags
- Fixed open_delegation4 dissector
Index: packet-nfs.c
===================================================================
RCS file: /cvsroot/ethereal/packet-nfs.c,v
retrieving revision 1.97
diff -u -r1.97 packet-nfs.c
--- packet-nfs.c	2 Jun 2004 06:50:28 -0000	1.97
+++ packet-nfs.c	2 Jun 2004 15:00:25 -0000
@@ -1,8 +1,13 @@
 /* packet-nfs.c
  * Routines for nfs dissection
  * Copyright 1999, Uwe Girlich <Uwe.Girlich@xxxxxxxxxxx>
+<<<<<<< packet-nfs.c
+ * Copyright 2000-2004, Mike Frisch <frisch@xxxxxxxxxxxxxxx> (NFSv4 decoding)
+ * $Id: packet-nfs.c,v 1.96 2004/02/25 09:31:06 guy Exp $
+=======
  * Copyright 2000-2004, Mike Frisch <frisch@xxxxxxxxxxxxxxx> (NFSv4 decoding)
  * $Id: packet-nfs.c,v 1.97 2004/06/02 06:50:28 guy Exp $
+>>>>>>> 1.97
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@xxxxxxxxxxxx>
@@ -6757,9 +6762,9 @@
 		if (newftree) {
 			offset = dissect_rpc_bool(tvb, newftree,
 				hf_nfs_change_info4_atomic, offset);
-			offset = dissect_rpc_uint64(tvb, tree, hf_nfs_changeid4_before,
+			offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_changeid4_before,
 				offset);
-			offset = dissect_rpc_uint64(tvb, tree, hf_nfs_changeid4_after,
+			offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_changeid4_after,
 				offset);
 		}
 	}
@@ -6799,6 +6804,8 @@
 	{ OPEN4_RESULT_MLOCK, "OPEN4_RESULT_MLOCK" },
 #define OPEN4_RESULT_CONFIRM 0x00000002
 	{ OPEN4_RESULT_CONFIRM, "OPEN4_RESULT_CONFIRM" },
+#define OPEN4_RESULT_LOCKTYPE_POSIX 0x00000004
+	{ OPEN4_RESULT_LOCKTYPE_POSIX, "OPEN4_RESULT_LOCKTYPE_POSIX" },
 	{ 0, NULL }
 };
 
@@ -6968,8 +6975,8 @@
 	proto_item *fitem = NULL;
 
 	delegation_type = tvb_get_ntohl(tvb, offset);
-	proto_tree_add_uint(tree, hf_nfs_open_delegation_type4, tvb, offset+0,
-		4, delegation_type);
+	fitem = proto_tree_add_uint(tree, hf_nfs_open_delegation_type4, tvb, 
+		offset+0, 4, delegation_type);
 	offset += 4;
 
 	if (fitem) {
@@ -8345,11 +8352,11 @@
 			NULL, 0, "nfs.changeid4", HFILL }},
 
 		{ &hf_nfs_changeid4_before, {
-			"changeid", "nfs.changeid4.before", FT_UINT64, BASE_DEC,
+			"changeid (before)", "nfs.changeid4.before", FT_UINT64, BASE_DEC,
 			NULL, 0, "nfs.changeid4.before", HFILL }},
 
 		{ &hf_nfs_changeid4_after, {
-			"changeid", "nfs.changeid4.after", FT_UINT64, BASE_DEC,
+			"changeid (after)", "nfs.changeid4.after", FT_UINT64, BASE_DEC,
 			NULL, 0, "nfs.changeid4.after", HFILL }},
 
 		{ &hf_nfs_nfstime4_seconds, {