Ethereal-dev: Re: [Ethereal-dev] [PATCH] [MTP3] Signalling Link Selector incorrectly presented

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

From: Michael Tuexen <Michael.Tuexen@xxxxxxxxxxxxxxxxx>
Date: Sat, 3 Jul 2004 15:00:23 +0200
Checked in, but with

proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ITU_ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);

instead of
proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ITU_SLS_OFFSET, ITU_SLS_LENGTH, label);

because hf_mtp3_itu_sls requires the SLS to be based on a 32 bit integer.

Best regards
Michael

On Jul 3, 2004, at 2:28 PM, Martin van der Werff wrote:

Hi,

The Signalling Link Selector always shows up as zero for ITU standard MTP3 messages. The patch
below fixes this problem.

Regards, Martin.

--- packet-mtp3.c.prev 2004-07-01 11:35:32.000000000 +0200
+++ packet-mtp3.c 2004-07-03 13:47:36.078125000 +0200
@@ -346,7 +346,6 @@
dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree)
 {
   guint32 label, dpc = 0, opc = 0;
-  guint8 sls;
   proto_item *label_item, *label_dpc_item, *label_opc_item;
   proto_tree *label_tree, *label_dpc_tree, *label_opc_tree;
   int *hf_dpc_string;
@@ -359,7 +358,6 @@
     label_tree = proto_item_add_subtree(label_item, ett_mtp3_label);

     label = tvb_get_letohl(tvb, ITU_ROUTING_LABEL_OFFSET);
-    sls   = tvb_get_guint8(tvb, ITU_SLS_OFFSET);

     opc = (label & ITU_OPC_MASK) >> 14;
     dpc =  label & ITU_DPC_MASK;
@@ -372,7 +370,7 @@
     if (mtp3_pc_structured())
proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));

- proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ITU_SLS_OFFSET, ITU_SLS_LENGTH, sls); + proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ITU_SLS_OFFSET, ITU_SLS_LENGTH, label);
     break;

   case ANSI_STANDARD:

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev