Ethereal-dev: [Ethereal-dev] LDP common hello param fixes

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

From: Aamer Akhter <aakhter@xxxxxxxxx>
Date: Fri, 15 Mar 2002 21:00:48 -0500
Hello,

Please find attached fixes for decoding the LDP common hello parameters. The values were not being 
passed to the proto_tree_* functions.

Comments are always welcome.


-- 
Aamer Akhter / aa@xxxxxxxxx
NSITE - cisco Systems

? .nfs0F15
? .nfsDF15
? my.patch
Index: packet-ldp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ldp.c,v
retrieving revision 1.28
diff -u -r1.28 packet-ldp.c
--- packet-ldp.c	2002/01/22 20:21:39	1.28
+++ packet-ldp.c	2002/03/16 01:57:35
@@ -826,10 +826,10 @@
 #else
 		val_tree=tree;
 #endif
-		proto_tree_add_item(val_tree, hf_ldp_tlv_val_hold, tvb, offset, 2, FALSE);
-		proto_tree_add_boolean(val_tree, hf_ldp_tlv_val_target, tvb, offset + 2, 2, FALSE);
-		proto_tree_add_boolean(val_tree, hf_ldp_tlv_val_request, tvb, offset + 2, 2, FALSE);
-		proto_tree_add_item(val_tree, hf_ldp_tlv_val_res, tvb, offset + 2, 2, FALSE);
+		proto_tree_add_item(val_tree, hf_ldp_tlv_val_hold, tvb, offset, 2, tvb_get_ntohs(tvb,offset));
+		proto_tree_add_boolean(val_tree, hf_ldp_tlv_val_target, tvb, offset + 2, 1, tvb_get_guint8(tvb,offset+2));
+		proto_tree_add_boolean(val_tree, hf_ldp_tlv_val_request, tvb, offset + 2, 1, tvb_get_guint8(tvb,offset+2));
+		proto_tree_add_item(val_tree, hf_ldp_tlv_val_res, tvb, offset + 2, 2, tvb_get_ntohs(tvb,offset));
 	}
 }