aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-llt.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-11-28 01:18:47 +0000
committerGerald Combs <gerald@wireshark.org>2006-11-28 01:18:47 +0000
commit70aa2a200d1b04ba0d34b3f5eda300b4d4c9ec8f (patch)
treeea03a1b7f70cbfac4a5d2da99b184c7ebbede9b4 /epan/dissectors/packet-llt.c
parent64088ba432662876e0f73f82c19efb033520fa3c (diff)
downloadwireshark-70aa2a200d1b04ba0d34b3f5eda300b4d4c9ec8f.tar.gz
wireshark-70aa2a200d1b04ba0d34b3f5eda300b4d4c9ec8f.tar.bz2
wireshark-70aa2a200d1b04ba0d34b3f5eda300b4d4c9ec8f.zip
Use val_to_str() instead of match_strval().
svn path=/trunk/; revision=20007
Diffstat (limited to 'epan/dissectors/packet-llt.c')
-rw-r--r--epan/dissectors/packet-llt.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-llt.c b/epan/dissectors/packet-llt.c
index d4334d9f85..9d11ecaa85 100644
--- a/epan/dissectors/packet-llt.c
+++ b/epan/dissectors/packet-llt.c
@@ -12,12 +12,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* 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.
@@ -73,16 +73,16 @@ dissect_llt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti=NULL;
proto_tree *llt_tree=NULL;
guint8 message_type;
-
+
/* Make entries in Protocol column and Info column on summary display */
- if(check_col(pinfo->cinfo, COL_PROTOCOL))
+ if(check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLT");
message_type = tvb_get_guint8(tvb, 3);
if(check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
- col_add_fstr(pinfo->cinfo, COL_INFO, "Message type: %s", match_strval(message_type, message_type_vs));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Message type: %s", val_to_str(message_type, message_type_vs, "Unknown (0x%02x)"));
}
if (tree) {
@@ -95,38 +95,38 @@ dissect_llt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(llt_tree, hf_llt_node_id, tvb, 7, 1, FALSE);
proto_tree_add_item(llt_tree, hf_llt_sequence_num, tvb, 24, 4, FALSE);
proto_tree_add_item(llt_tree, hf_llt_message_time, tvb, 40, 4, FALSE);
-
+
}
/* Register the protocol with Wireshark */
void
proto_register_llt(void)
-{
+{
module_t *llt_module;
static hf_register_info hf[] = {
-
+
{ &hf_llt_cluster_num, { "Cluster number", "llt.cluster_num",
FT_UINT8, BASE_DEC, NULL, 0,
"Cluster number that this node belongs to", HFILL } },
-
+
{ &hf_llt_message_type, { "Message type", "llt.message_type",
FT_UINT8, BASE_HEX, VALS(message_type_vs), 0,
"Type of LLT message contained in this frame", HFILL } },
-
+
{ &hf_llt_node_id, { "Node ID", "llt.node_id",
FT_UINT8, BASE_DEC, NULL, 0,
"Number identifying this node within the cluster", HFILL } },
-
+
{ &hf_llt_sequence_num, { "Sequence number", "llt.sequence_num",
FT_UINT32, BASE_DEC, NULL, 0,
"Sequence number of this frame", HFILL } },
-
+
{ &hf_llt_message_time, { "Message time", "llt.message_time",
FT_UINT32, BASE_DEC, NULL, 0,
"Number of ticks since this node was last rebooted", HFILL } }
};
-
+
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_llt,
@@ -156,7 +156,7 @@ proto_reg_handoff_llt(void)
llt_handle = create_dissector_handle(dissect_llt, proto_llt);
dissector_add("ethertype", ETHERTYPE_LLT, llt_handle);
- if((preference_alternate_ethertype != 0xCAFE)
+ if((preference_alternate_ethertype != 0xCAFE)
&& (preference_alternate_ethertype != 0x0)){
dissector_delete("ethertype", preference_alternate_ethertype_last, llt_handle);
preference_alternate_ethertype_last = preference_alternate_ethertype; /* Save the setting to see if it has changed later */