diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-08-28 08:28:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-08-28 08:28:19 +0000 |
commit | aa4cd01b9bcd64fc3785668692f2be0f19f69bb8 (patch) | |
tree | 3a75d49278b2ef01f583e4346c84e22e30332616 | |
parent | d9019638eef40ef97c69e7a28277d1886aa800cc (diff) |
Get rid of "proto_tree_add_notext()" - if you create a subtree using it,
but, before you set the text, you throw an exception while putting stuff
under the subtree, you end up with an absolutely blank protocol tree
item, which is really gross. Instead of calling
"proto_tree_add_notext()", call "proto_tree_add_text()" with at least a
minimal label - yes, it does mean you do some work that will probably be
unnecessary, but, absent a scheme to arrange to do that work if it *is*
necessary (e.g., catching exceptions), the alternative is an ugly
protocol tree display.
svn path=/trunk/; revision=3879
-rw-r--r-- | doc/README.developer | 58 | ||||
-rw-r--r-- | epan/plugins.c | 3 | ||||
-rw-r--r-- | epan/proto.c | 14 | ||||
-rw-r--r-- | epan/proto.h | 6 | ||||
-rw-r--r-- | packet-cdp.c | 17 | ||||
-rw-r--r-- | packet-dns.c | 8 | ||||
-rw-r--r-- | packet-isup.c | 190 | ||||
-rw-r--r-- | packet-sctp.c | 13 | ||||
-rw-r--r-- | packet-vtp.c | 15 | ||||
-rw-r--r-- | plugins/plugin_api.c | 5 | ||||
-rw-r--r-- | plugins/plugin_api.h | 5 | ||||
-rw-r--r-- | plugins/plugin_table.h | 6 |
12 files changed, 209 insertions, 131 deletions
diff --git a/doc/README.developer b/doc/README.developer index 6d81c0b8bf..ac97c56962 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -1,4 +1,4 @@ -$Id: README.developer,v 1.32 2001/07/20 23:38:30 guy Exp $ +$Id: README.developer,v 1.33 2001/08/28 08:28:16 guy Exp $ This file is a HOWTO for Ethereal developers. It describes how to start coding a Ethereal protocol dissector and the use some of the important functions and @@ -85,7 +85,7 @@ code inside is needed only if you are using the "snprintf()" function. -The "$Id: README.developer,v 1.32 2001/07/20 23:38:30 guy Exp $" +The "$Id: README.developer,v 1.33 2001/08/28 08:28:16 guy Exp $" in the comment will be updated by CVS when the file is checked in; it will allow the RCS "ident" command to report which version of the file is currently checked out. @@ -95,7 +95,7 @@ version of the file is currently checked out. * Routines for PROTONAME dissection * Copyright 2000, YOUR_NAME <YOUR_EMAIL_ADDRESS> * - * $Id: README.developer,v 1.32 2001/07/20 23:38:30 guy Exp $ + * $Id: README.developer,v 1.33 2001/08/28 08:28:16 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -942,9 +942,6 @@ protocol or field labels to the proto_tree: proto_item* proto_tree_add_text(tree, start, length, format, ...); - proto_item* - proto_tree_add_notext(tree, start, length); - The 'tree' argument is the tree to which the item is to be added. The 'start' argument is the offset from the beginning of the frame (not the offset from the beginning of the part of the packet belonging to this @@ -1107,49 +1104,46 @@ format; it is not added automatically as in proto_tree_add_item(). proto_tree_add_text() --------------------- -The fourth function, proto_tree_add_text(), is used to add a label to -the GUI tree. It will contain no value, so it is not searchable in the -display filter process. This function was needed in the transition from -the old-style proto_tree to this new-style proto_tree so that Ethereal -would still decode all protocols w/o being able to filter on all -protocols and fields. Otherwise we would have had to cripple Ethereal's -functionality while we converted all the old-style proto_tree calls to -the new-style proto_tree calls. +proto_tree_add_text() is used to add a label to the GUI tree. It will +contain no value, so it is not searchable in the display filter process. +This function was needed in the transition from the old-style proto_tree +to this new-style proto_tree so that Ethereal would still decode all +protocols w/o being able to filter on all protocols and fields. +Otherwise we would have had to cripple Ethereal's functionality while we +converted all the old-style proto_tree calls to the new-style proto_tree +calls. This can also be used for items with subtrees, which may not have values themselves - the items in the subtree are the ones with values. -proto_tree_add_notext() ------------------------ -The fifth function, proto_tree_add_notext(), is used to add an item to -the logical tree that will have only a label, and no value (so it is not -searchable in the display filter process), but that doesn't yet have a -label, either. This is for items where the value is to be filled in -later. This is typically used for an item with a subtree, where the -label is to contain a summary of the subtree, with the values of some of -the fields in the subtree shown in the label of the item for the subtree -as a whole; the item can be created as a placeholder, with the label -added when the dissection is complete - and, if the dissection doesn't -complete because the packet is too short and not all the required fields -are present, the label could be set to something indicating this. - -The text is set by 'proto_item_set_text()': +For a subtree, the label on the subtree might reflect some of the items +in the subtree. This means the label can't be set until at least some +of the items in the subtree have been dissected. To do this, use +'proto_item_set_text()': void proto_tree_set_text(proto_item *ti, ...); which takes as an argument the value returned by -'proto_tree_add_notext()', a 'printf'-style format string, and a set of +'proto_tree_add_text()', a 'printf'-style format string, and a set of arguments corresponding to '%' format items in that string. For example, early in the dissection, one might do: - ti = proto_tree_add_notext(tree, offset, length); + ti = proto_tree_add_text(tree, offset, length, <label>); and later do proto_item_set_text(ti, "%s: %s", type, value); -after the "type" and "value" fields have been extracted and dissected. +after the "type" and "value" fields have been extracted and dissected. +<label> would be a label giving what information about the subtree is +available without dissecting any of the data in the subtree. + +Note that an exception might thrown when trying to extract the values of +the items used to set the label, if not all the bytes of the item are +available. Thus, one should set the text of the item as soon as all the +values used to set it have been extracted, rather than setting it only +after the entire subtree has been dissected. 1.7 Utility routines diff --git a/epan/plugins.c b/epan/plugins.c index 140ec684b5..c1cf2da0f7 100644 --- a/epan/plugins.c +++ b/epan/plugins.c @@ -1,7 +1,7 @@ /* plugins.c * plugin routines * - * $Id: plugins.c,v 1.30 2001/08/21 09:11:59 guy Exp $ + * $Id: plugins.c,v 1.31 2001/08/28 08:28:17 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -352,7 +352,6 @@ init_plugins(const char *plugin_dir) patable.p_proto_tree_add_int_hidden = proto_tree_add_int_hidden; patable.p_proto_tree_add_int_format = proto_tree_add_int_format; patable.p_proto_tree_add_text = proto_tree_add_text; - patable.p_proto_tree_add_notext = proto_tree_add_notext; patable.p_tvb_new_subset = tvb_new_subset; diff --git a/epan/proto.c b/epan/proto.c index f926c99d04..0699105518 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1,7 +1,7 @@ /* proto.c * Routines for protocol tree * - * $Id: proto.c,v 1.32 2001/08/04 19:57:30 guy Exp $ + * $Id: proto.c,v 1.33 2001/08/28 08:28:17 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -291,9 +291,9 @@ proto_registrar_get_nth(int hfindex) } -/* Add a node with no text */ -proto_item * -proto_tree_add_notext(proto_tree *tree, tvbuff_t *tvb, gint start, gint length) +/* Add a text-only node, leaving it to our caller to fill the text in */ +static proto_item * +proto_tree_add_text_node(proto_tree *tree, tvbuff_t *tvb, gint start, gint length) { proto_item *pi; @@ -312,7 +312,7 @@ proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, proto_item *pi; va_list ap; - pi = proto_tree_add_notext(tree, tvb, start, length); + pi = proto_tree_add_text_node(tree, tvb, start, length); if (pi == NULL) return(NULL); @@ -330,7 +330,7 @@ proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start, { proto_item *pi; - pi = proto_tree_add_notext(tree, tvb, start, length); + pi = proto_tree_add_text_node(tree, tvb, start, length); if (pi == NULL) return(NULL); @@ -348,7 +348,7 @@ proto_tree_add_debug_text(proto_tree *tree, const char *format, ...) proto_item *pi; va_list ap; - pi = proto_tree_add_notext(tree, NULL, 0, 0); + pi = proto_tree_add_text_node(tree, NULL, 0, 0); if (pi == NULL) return(NULL); diff --git a/epan/proto.h b/epan/proto.h index 4ffc3ec0a2..62fc4f4c02 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -1,7 +1,7 @@ /* proto.h * Definitions for protocol display * - * $Id: proto.h,v 1.14 2001/07/22 10:25:49 guy Exp $ + * $Id: proto.h,v 1.15 2001/08/28 08:28:17 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -446,10 +446,6 @@ proto_item * proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format, va_list ap); -/* Add a node with no text */ -proto_item * -proto_tree_add_notext(proto_tree *tree, tvbuff_t *tvb, gint start, gint length); - /* Useful for quick debugging. Also sends string to STDOUT, so don't * leave call to this function in production code. */ diff --git a/packet-cdp.c b/packet-cdp.c index 1ea1862c57..6e516566bc 100644 --- a/packet-cdp.c +++ b/packet-cdp.c @@ -2,13 +2,12 @@ * Routines for the disassembly of the "Cisco Discovery Protocol" * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-cdp.c,v 1.38 2001/06/20 05:18:36 guy Exp $ + * $Id: packet-cdp.c,v 1.39 2001/08/28 08:28:14 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -384,7 +383,7 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree) if (length < 1) return -1; - ti = proto_tree_add_notext(tree, tvb, offset, length); + ti = proto_tree_add_text(tree, tvb, offset, length, "Truncated address"); address_tree = proto_item_add_subtree(ti, ett_cdp_address); protocol_type = tvb_get_guint8(tvb, offset); proto_tree_add_text(address_tree, tvb, offset, 1, "Protocol type: %s", @@ -392,10 +391,8 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree) offset += 1; length -= 1; - if (length < 1) { - proto_item_set_text(ti, "Truncated address"); + if (length < 1) return -1; - } protocol_length = tvb_get_guint8(tvb, offset); proto_tree_add_text(address_tree, tvb, offset, 1, "Protocol length: %u", protocol_length); @@ -403,7 +400,6 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree) length -= 1; if (length < protocol_length) { - proto_item_set_text(ti, "Truncated address"); if (length != 0) { proto_tree_add_text(address_tree, tvb, offset, length, "Protocol: %s (truncated)", @@ -424,10 +420,8 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree) offset += protocol_length; length -= protocol_length; - if (length < 2) { - proto_item_set_text(ti, "Truncated address"); + if (length < 2) return -1; - } address_length = tvb_get_ntohs(tvb, offset); proto_tree_add_text(address_tree, tvb, offset, 2, "Address length: %u", address_length); @@ -435,7 +429,6 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree) length -= 2; if (length < address_length) { - proto_item_set_text(ti, "Truncated address"); if (length != 0) { proto_tree_add_text(address_tree, tvb, offset, length, "Address: %s (truncated)", diff --git a/packet-dns.c b/packet-dns.c index 80202d622d..fd41a86065 100644 --- a/packet-dns.c +++ b/packet-dns.c @@ -1,7 +1,7 @@ /* packet-dns.c * Routines for DNS packet disassembly * - * $Id: packet-dns.c,v 1.70 2001/07/02 07:29:03 guy Exp $ + * $Id: packet-dns.c,v 1.71 2001/08/28 08:28:14 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -793,8 +793,10 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, if (fd != NULL) col_append_fstr(fd, COL_INFO, " %s", type_name); if (dns_tree != NULL) { - trr = proto_tree_add_notext(dns_tree, tvb, offset, - (data_offset - data_start) + data_len); + trr = proto_tree_add_text(dns_tree, tvb, offset, + (data_offset - data_start) + data_len, + "%s: type %s, class %s", + name, type_name, class_name); if (type != T_OPT) { rr_tree = add_rr_to_tree(trr, ett_dns_rr, tvb, offset, name, name_len, long_type_name, class_name, ttl, data_len); diff --git a/packet-isup.c b/packet-isup.c index b968fb01f3..79b1dcd6f9 100644 --- a/packet-isup.c +++ b/packet-isup.c @@ -2,7 +2,7 @@ * Routines for ISUP dissection * Copyright 2001, Martina Obermeier <martina.obermeier@icn.siemens.de> * - * $Id: packet-isup.c,v 1.4 2001/06/18 02:17:48 guy Exp $ + * $Id: packet-isup.c,v 1.5 2001/08/28 08:28:14 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1298,7 +1298,10 @@ void dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_t proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Called Party Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1342,7 +1345,10 @@ void dissect_isup_subsequent_number_parameter(tvbuff_t *parameter_tvb, proto_tre proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1); offset = 1; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Subsequent Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1402,7 +1408,7 @@ dissect_isup_information_indicators_parameter(tvbuff_t *parameter_tvb, proto_tre proto_tree_add_boolean(parameter_tree, hf_isup_solicited_indicator, parameter_tvb, 0, INFO_IND_LENGTH, information_indicators); - proto_item_set_text(parameter_item, "Information indicators: 0x%x", information_indicators); + proto_item_set_text(parameter_item, "Information indicators: 0x%x", information_indicators); } /* ------------------------------------------------------------------ Dissector Parameter Continuity Indicators @@ -1415,7 +1421,7 @@ dissect_isup_continuity_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree continuity_indicators = tvb_get_guint8(parameter_tvb, 0); proto_tree_add_boolean(parameter_tree, hf_isup_continuity_indicator, parameter_tvb, 0, CONTINUITY_IND_LENGTH, continuity_indicators); - proto_item_set_text(parameter_item, "Continuity indicators: 0x%x", continuity_indicators); + proto_item_set_text(parameter_item, "Continuity indicators: 0x%x", continuity_indicators); } /* ------------------------------------------------------------------ Dissector Parameter Backward Call Indicators @@ -1524,7 +1530,10 @@ dissect_isup_circuit_state_ind_parameter(tvbuff_t *parameter_tvb, proto_tree *pa length = tvb_length_remaining(parameter_tvb, offset); while(length > 0){ - circuit_state_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + circuit_state_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Circuit# CIC+%u state", i); circuit_state_tree = proto_item_add_subtree(circuit_state_item, ett_isup_circuit_state_ind); circuit_state = tvb_get_guint8(parameter_tvb, offset); if ((circuit_state & DC_8BIT_MASK) == 0){ @@ -1539,7 +1548,7 @@ dissect_isup_circuit_state_ind_parameter(tvbuff_t *parameter_tvb, proto_tree *pa } offset++; length = tvb_length_remaining(parameter_tvb, offset); - } + } proto_item_set_text(parameter_item, "Circuit state indicator (national use)"); } /* ------------------------------------------------------------------ @@ -1631,7 +1640,10 @@ dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Calling Party Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1680,7 +1692,10 @@ dissect_isup_original_called_number_parameter(tvbuff_t *parameter_tvb, proto_tre proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Original Called Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1729,7 +1744,10 @@ dissect_isup_redirecting_number_parameter(tvbuff_t *parameter_tvb, proto_tree *p proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Redirecting Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1777,7 +1795,10 @@ void dissect_isup_redirection_number_parameter(tvbuff_t *parameter_tvb, proto_tr proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Redirection Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1917,7 +1938,10 @@ dissect_isup_connected_number_parameter(tvbuff_t *parameter_tvb, proto_tree *par proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Connected Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -1964,7 +1988,10 @@ dissect_isup_transit_network_selection_parameter(tvbuff_t *parameter_tvb, proto_ proto_tree_add_uint(parameter_tree, hf_isup_network_identification_plan, parameter_tvb, 0, 1, indicators); offset = 1; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Network identification"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -2304,7 +2331,10 @@ dissect_isup_location_number_parameter(tvbuff_t *parameter_tvb, proto_tree *para proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Location number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -2408,7 +2438,10 @@ dissect_isup_call_transfer_number_parameter(tvbuff_t *parameter_tvb, proto_tree proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator_enhanced, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Call transfer number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -2546,7 +2579,10 @@ dissect_isup_called_in_number_parameter(tvbuff_t *parameter_tvb, proto_tree *par proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2); offset = 2; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Called IN Number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -2691,7 +2727,10 @@ dissect_isup_generic_number_parameter(tvbuff_t *parameter_tvb, proto_tree *param proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator_enhanced, parameter_tvb, 2, 1, indicators2); offset = 3; - address_digits_item = proto_tree_add_notext(parameter_tree, parameter_tvb, offset, tvb_length_remaining(parameter_tvb, offset)); + address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb, + offset, + tvb_length_remaining(parameter_tvb, offset), + "Generic number"); address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits); length = tvb_length_remaining(parameter_tvb, offset); @@ -2754,7 +2793,11 @@ dissect_isup_optional_parameter(tvbuff_t *optional_parameters_tvb, proto_tree *i if (parameter_type != PARAM_TYPE_END_OF_OPT_PARAMS){ parameter_length = tvb_get_guint8(optional_parameters_tvb, offset + PARAMETER_TYPE_LENGTH); - parameter_item = proto_tree_add_notext(isup_tree, optional_parameters_tvb , offset, parameter_length + PARAMETER_TYPE_LENGTH + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, optional_parameters_tvb, + offset, + parameter_length + PARAMETER_TYPE_LENGTH + PARAMETER_LENGTH_IND_LENGTH, + "Parameter: type %u", + parameter_type); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, optional_parameters_tvb, offset, PARAMETER_TYPE_LENGTH, parameter_type, "Optional Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); offset += PARAMETER_TYPE_LENGTH; @@ -3039,7 +3082,9 @@ dissect_isup_initial_address_message(tvbuff_t *message_tvb, proto_tree *isup_tre /* Do stuff for first mandatory fixed parameter: Nature of Connection Indicators */ parameter_type = PARAM_TYPE_NATURE_OF_CONN_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, NATURE_OF_CONNECTION_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + NATURE_OF_CONNECTION_IND_LENGTH, + "Nature of Connection Indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3049,7 +3094,9 @@ dissect_isup_initial_address_message(tvbuff_t *message_tvb, proto_tree *isup_tre /* Do stuff for 2nd mandatory fixed parameter: Forward Call Indicators */ parameter_type = PARAM_TYPE_FORW_CALL_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, FORWARD_CALL_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + FORWARD_CALL_IND_LENGTH, + "Forward Call Indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3059,7 +3106,9 @@ dissect_isup_initial_address_message(tvbuff_t *message_tvb, proto_tree *isup_tre /* Do stuff for 3nd mandatory fixed parameter: Calling party's category */ parameter_type = PARAM_TYPE_CALLING_PRTY_CATEG; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, CALLING_PRTYS_CATEGORY_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + CALLING_PRTYS_CATEGORY_LENGTH, + "Calling Party's category"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3069,7 +3118,9 @@ dissect_isup_initial_address_message(tvbuff_t *message_tvb, proto_tree *isup_tre /* Do stuff for 4th mandatory fixed parameter: Transmission medium requirement */ parameter_type = PARAM_TYPE_TRANSM_MEDIUM_REQU; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, TRANSMISSION_MEDIUM_REQUIREMENT_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + TRANSMISSION_MEDIUM_REQUIREMENT_LENGTH, + "Transmission medium requirement"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3083,7 +3134,10 @@ dissect_isup_initial_address_message(tvbuff_t *message_tvb, proto_tree *isup_tre parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Called Party Number"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3111,7 +3165,10 @@ gint dissect_isup_subsequent_address_message(tvbuff_t *message_tvb, proto_tree * parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Subsequent Number"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3137,7 +3194,9 @@ dissect_isup_information_request_message(tvbuff_t *message_tvb, proto_tree *isup /* Do stuff for first mandatory fixed parameter: Information request indicators*/ parameter_type = PARAM_TYPE_INFO_REQ_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, INFO_REQUEST_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + INFO_REQUEST_IND_LENGTH, + "Information request indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3159,7 +3218,9 @@ dissect_isup_information_message(tvbuff_t *message_tvb, proto_tree *isup_tree) /* Do stuff for first mandatory fixed parameter: Information indicators*/ parameter_type = PARAM_TYPE_INFO_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, INFO_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + INFO_IND_LENGTH, + "Information indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3181,7 +3242,9 @@ dissect_isup_continuity_message(tvbuff_t *message_tvb, proto_tree *isup_tree) /* Do stuff for first mandatory fixed parameter: Continuity indicators*/ parameter_type = PARAM_TYPE_CONTINUITY_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, CONTINUITY_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + CONTINUITY_IND_LENGTH, + "Continuity indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3203,7 +3266,9 @@ dissect_isup_address_complete_message(tvbuff_t *message_tvb, proto_tree *isup_tr /* Do stuff for first mandatory fixed parameter: backward call indicators*/ parameter_type = PARAM_TYPE_BACKW_CALL_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, BACKWARD_CALL_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + BACKWARD_CALL_IND_LENGTH, + "Backward Call Indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3225,7 +3290,9 @@ dissect_isup_connect_message(tvbuff_t *message_tvb, proto_tree *isup_tree) /* Do stuff for first mandatory fixed parameter: backward call indicators*/ parameter_type = PARAM_TYPE_BACKW_CALL_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, BACKWARD_CALL_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + BACKWARD_CALL_IND_LENGTH, + "Backward Call Indicators"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3251,7 +3318,10 @@ dissect_isup_release_message(tvbuff_t *message_tvb, proto_tree *isup_tree) parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Cause indicators, see Q.850"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3276,7 +3346,9 @@ dissect_isup_suspend_resume_message(tvbuff_t *message_tvb, proto_tree *isup_tree /* Do stuff for first mandatory fixed parameter: backward call indicators*/ parameter_type = PARAM_TYPE_SUSP_RESUME_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, SUSPEND_RESUME_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + SUSPEND_RESUME_IND_LENGTH, + "Suspend/Resume indicator"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3302,7 +3374,10 @@ dissect_isup_circuit_group_reset_query_message(tvbuff_t *message_tvb, proto_tree parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Range and status"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3327,7 +3402,9 @@ dissect_isup_circuit_group_blocking_messages(tvbuff_t *message_tvb, proto_tree * /* Do stuff for first mandatory fixed parameter: circuit group supervision message type*/ parameter_type = PARAM_TYPE_CIRC_GRP_SV_MSG_TYPE; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, CIRC_GRP_SV_MSG_TYPE_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + CIRC_GRP_SV_MSG_TYPE_LENGTH, + "Circuit group supervision message type"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3341,7 +3418,10 @@ dissect_isup_circuit_group_blocking_messages(tvbuff_t *message_tvb, proto_tree * parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Facility indicator"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3367,7 +3447,9 @@ dissect_isup_facility_request_accepted_message(tvbuff_t *message_tvb, proto_tree /* Do stuff for first mandatory fixed parameter: facility indicators*/ parameter_type = PARAM_TYPE_FACILITY_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, FACILITY_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + FACILITY_IND_LENGTH, + "Facility indicator"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3389,7 +3471,9 @@ dissect_isup_facility_reject_message(tvbuff_t *message_tvb, proto_tree *isup_tre /* Do stuff for first mandatory fixed parameter: facility indicators*/ parameter_type = PARAM_TYPE_FACILITY_IND; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, FACILITY_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + FACILITY_IND_LENGTH, + "Facility indicator"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3403,7 +3487,10 @@ dissect_isup_facility_reject_message(tvbuff_t *message_tvb, proto_tree *isup_tre parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Cause indicators, see Q.850"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3432,7 +3519,10 @@ dissect_isup_circuit_group_reset_acknowledgement_message(tvbuff_t *message_tvb, parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Range and status"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3461,7 +3551,10 @@ dissect_isup_circuit_group_query_response_message(tvbuff_t *message_tvb, proto_t parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Range and status"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3477,7 +3570,10 @@ dissect_isup_circuit_group_query_response_message(tvbuff_t *message_tvb, proto_t parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Circuit state indicator (national use)"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3502,7 +3598,9 @@ dissect_isup_call_progress_message(tvbuff_t *message_tvb, proto_tree *isup_tree) /* Do stuff for first mandatory fixed parameter: Event information*/ parameter_type = PARAM_TYPE_EVENT_INFO; - parameter_item = proto_tree_add_notext(isup_tree, message_tvb, offset, EVENT_INFO_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, offset, + EVENT_INFO_LENGTH, + "Event information"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); actual_length = tvb_length_remaining(message_tvb, offset); @@ -3528,7 +3626,10 @@ dissect_isup_user_to_user_information_message(tvbuff_t *message_tvb, proto_tree parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "User-to-user information, see Q.931"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); @@ -3557,7 +3658,10 @@ dissect_isup_confusion_message(tvbuff_t *message_tvb, proto_tree *isup_tree) parameter_pointer = tvb_get_guint8(message_tvb, offset); parameter_length = tvb_get_guint8(message_tvb, offset + parameter_pointer); - parameter_item = proto_tree_add_notext(isup_tree, message_tvb , offset + parameter_pointer, parameter_length + PARAMETER_LENGTH_IND_LENGTH); + parameter_item = proto_tree_add_text(isup_tree, message_tvb, + offset + parameter_pointer, + parameter_length + PARAMETER_LENGTH_IND_LENGTH, + "Cause indicators, see Q.850"); parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter); proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown")); proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer); diff --git a/packet-sctp.c b/packet-sctp.c index 8c32040fbc..48081e91aa 100644 --- a/packet-sctp.c +++ b/packet-sctp.c @@ -2,7 +2,7 @@ * Routines for Stream Control Transmission Protocol dissection * Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de> * - * $Id: packet-sctp.c,v 1.19 2001/07/03 04:56:46 guy Exp $ + * $Id: packet-sctp.c,v 1.20 2001/08/28 08:28:14 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -246,7 +246,7 @@ static const value_string sctp_parameter_identifier_values[] = { #define COOKIE_RECEIVED_WHILE_SHUTTING_DOWN 0x0a static const value_string sctp_cause_code_values[] = { - { INVALID_STREAM_IDENTIFIER, "Invalid stream idetifier" }, + { INVALID_STREAM_IDENTIFIER, "Invalid stream identifier" }, { MISSING_MANDATORY_PARAMETERS, "Missing mandator parameter" }, { STALE_COOKIE_ERROR, "Stale cookie error" }, { OUT_OF_RESOURCE, "Out of resource" }, @@ -690,7 +690,9 @@ dissect_parameter(tvbuff_t *parameter_tvb, proto_tree *chunk_tree) padding_length = nr_of_padding_bytes(length); total_length = length + padding_length; - parameter_item = proto_tree_add_notext(chunk_tree, parameter_tvb, PARAMETER_HEADER_OFFSET, total_length); + parameter_item = proto_tree_add_text(chunk_tree, parameter_tvb, + PARAMETER_HEADER_OFFSET, total_length, "%s parameter", + val_to_str(type, sctp_parameter_identifier_values, "Unknown")); parameter_tree = proto_item_add_subtree(parameter_item, ett_sctp_chunk_parameter); proto_tree_add_uint_format(parameter_tree, hf_sctp_chunk_parameter_type, @@ -924,8 +926,9 @@ dissect_error_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *chunk_t padding_length = nr_of_padding_bytes(length); total_length = length + padding_length; - cause_item = proto_tree_add_notext(chunk_tree, cause_tvb, CAUSE_HEADER_OFFSET, total_length); - proto_item_set_text(cause_item, "BAD ERROR CAUSE"); + cause_item = proto_tree_add_text(chunk_tree, cause_tvb, + CAUSE_HEADER_OFFSET, total_length, + "BAD ERROR CAUSE"); cause_tree = proto_item_add_subtree(cause_item, ett_sctp_chunk_cause); proto_tree_add_uint_format(cause_tree, hf_sctp_cause_code, diff --git a/packet-vtp.c b/packet-vtp.c index 6a5ae644b8..c04fbf973f 100644 --- a/packet-vtp.c +++ b/packet-vtp.c @@ -1,13 +1,12 @@ /* packet-vtp.c * Routines for the disassembly of Cisco's Virtual Trunking Protocol * - * $Id: packet-vtp.c,v 1.14 2001/06/18 02:17:54 guy Exp $ + * $Id: packet-vtp.c,v 1.15 2001/08/28 08:28:14 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -271,7 +270,6 @@ dissect_vlan_info(tvbuff_t *tvb, int offset, proto_tree *tree) guint8 vlan_name_len; guint8 type; int length; - char *type_str; proto_tree *tlv_tree; vlan_info_len = tvb_get_guint8(tvb, offset); @@ -345,11 +343,11 @@ dissect_vlan_info(tvbuff_t *tvb, int offset, proto_tree *tree) while (vlan_info_left > 0) { type = tvb_get_guint8(tvb, offset + 0); length = tvb_get_guint8(tvb, offset + 1); - type_str = val_to_str(type, vlan_tlv_type_vals, - "Unknown (0x%04x)"); - ti = proto_tree_add_notext(vlan_info_tree, tvb, offset, - 2 + length*2); + ti = proto_tree_add_text(vlan_info_tree, tvb, offset, + 2 + length*2, "%s", + val_to_str(type, vlan_tlv_type_vals, + "Unknown TLV type: 0x%02x")); tlv_tree = proto_item_add_subtree(ti, ett_vtp_tlv); proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvtype, tvb, offset, 1, type); @@ -588,7 +586,6 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, int offset, int length, break; default: - proto_item_set_text(ti, "Unknown TLV type: 0x%02x", type); proto_tree_add_text(tree, tvb, offset, length, "Data"); break; } diff --git a/plugins/plugin_api.c b/plugins/plugin_api.c index a2c8eff5b4..16736e838b 100644 --- a/plugins/plugin_api.c +++ b/plugins/plugin_api.c @@ -1,11 +1,10 @@ /* plugin_api.c * Routines for Ethereal plugins. * - * $Id: plugin_api.c,v 1.20 2001/07/22 10:12:11 guy Exp $ + * $Id: plugin_api.c,v 1.21 2001/08/28 08:28:19 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@xiexie.org> - * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -20,7 +19,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * */ #ifdef HAVE_CONFIG_H @@ -98,7 +96,6 @@ plugin_address_table_init(plugin_address_table_t *pat) p_proto_tree_add_int_hidden = pat->p_proto_tree_add_int_hidden; p_proto_tree_add_int_format = pat->p_proto_tree_add_int_format; p_proto_tree_add_text = pat->p_proto_tree_add_text; - p_proto_tree_add_notext = pat->p_proto_tree_add_notext; p_tvb_new_subset = pat->p_tvb_new_subset; p_tvb_length = pat->p_tvb_length; p_tvb_length_remaining = pat->p_tvb_length_remaining; diff --git a/plugins/plugin_api.h b/plugins/plugin_api.h index 596c4d610d..0b95c41bc9 100644 --- a/plugins/plugin_api.h +++ b/plugins/plugin_api.h @@ -1,11 +1,10 @@ /* plugin_api.h * Routines for Ethereal plugins. * - * $Id: plugin_api.h,v 1.20 2001/07/22 10:12:11 guy Exp $ + * $Id: plugin_api.h,v 1.21 2001/08/28 08:28:19 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@xiexie.org> - * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -20,7 +19,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * */ #ifdef PLUGINS_NEED_ADDRESS_TABLE @@ -100,7 +98,6 @@ #define proto_tree_add_int_hidden (*p_proto_tree_add_int_hidden) #define proto_tree_add_int_format (*p_proto_tree_add_int_format) #define proto_tree_add_text (*p_proto_tree_add_text) -#define proto_tree_add_notext (*p_proto_tree_add_notext) #define tvb_new_subset (*p_tvb_new_subset) diff --git a/plugins/plugin_table.h b/plugins/plugin_table.h index 0f9308c5d2..6de96735bc 100644 --- a/plugins/plugin_table.h +++ b/plugins/plugin_table.h @@ -1,11 +1,10 @@ /* plugin_table.h * Table of exported addresses for Ethereal plugins. * - * $Id: plugin_table.h,v 1.21 2001/07/22 10:12:11 guy Exp $ + * $Id: plugin_table.h,v 1.22 2001/08/28 08:28:19 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@xiexie.org> - * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -20,7 +19,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * */ #ifdef PLUGINS_NEED_ADDRESS_TABLE @@ -109,7 +107,6 @@ typedef proto_item* (*addr_proto_tree_add_int_hidden)(proto_tree*, int, tvbuff_t typedef proto_item* (*addr_proto_tree_add_int_format)(proto_tree*, int, tvbuff_t*, gint, gint, gint32, const char*, ...); typedef proto_item* (*addr_proto_tree_add_text)(proto_tree*, tvbuff_t*, gint, gint, const char*, ...); -typedef proto_item* (*addr_proto_tree_add_notext)(proto_tree*, tvbuff_t*, gint, gint); typedef tvbuff_t* (*addr_tvb_new_subset)(tvbuff_t*, gint, gint, gint); @@ -248,7 +245,6 @@ typedef struct { addr_proto_tree_add_int_hidden p_proto_tree_add_int_hidden; addr_proto_tree_add_int_format p_proto_tree_add_int_format; addr_proto_tree_add_text p_proto_tree_add_text; - addr_proto_tree_add_notext p_proto_tree_add_notext; addr_tvb_new_subset p_tvb_new_subset; |