aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-17 14:02:06 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-17 14:02:06 +0000
commit4feb23fd40b750bcff4edbb143f6c64d17251a5f (patch)
tree010061f9c7333632d7ed2415912b43b6107c1f51
parent445dbdc4c51729aed3b0d2fa7fbce3722ac082a3 (diff)
From Benjamin Roch via bug 3418:
Use eth.src, eth.dst and eth.type from the ethernet dissector. From me: Removed unused code inside #if 0. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34534 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-tte.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/epan/dissectors/packet-tte.c b/epan/dissectors/packet-tte.c
index eb5433b19c..159c33cbea 100644
--- a/epan/dissectors/packet-tte.c
+++ b/epan/dissectors/packet-tte.c
@@ -55,10 +55,6 @@ static int hf_eth_type = -1;
static guint32 tte_pref_ct_marker = 0xFFFFFFFF;
static guint32 tte_pref_ct_mask = 0x0;
-#if 0
-static dissector_table_t ethertype_dissector_table;
-#endif
-
/* Initialize the subtree pointers */
static gint ett_tte = -1;
static gint ett_tte_macdest = -1;
@@ -132,12 +128,6 @@ dissect_tte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_fence(pinfo->cinfo, COL_PROTOCOL);
/* call std Ethernet dissector */
-
-#if 0
- dissector_try_port(ethertype_dissector_table,
- tvb_get_ntohs(tvb, TTE_MAC_LENGTH * 2), tvb_next, pinfo, tree);
-
-#endif
ethertype (tvb_get_ntohs(tvb, TTE_MAC_LENGTH * 2), tvb
, 14, pinfo, tree, NULL, hf_eth_type, 0, 0 );
@@ -151,22 +141,6 @@ proto_register_tte(void)
module_t *tte_module;
static hf_register_info hf[] = {
-
- { &hf_eth_dst,
- { "Destination", "eth.dst",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Destination Hardware Address", HFILL }
- },
- { &hf_eth_src,
- { "Source", "eth.src",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Source Hardware Address", HFILL }
- },
- { &hf_eth_type,
- { "Type", "eth.type",
- FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
- NULL, HFILL }
- },
{ &hf_tte_dst_cf,
{ "Constant Field", "tte.cf",
FT_UINT32, BASE_HEX, NULL, 0x0,
@@ -214,8 +188,7 @@ proto_reg_handoff_tte(void)
{
heur_dissector_add("eth", dissect_tte, proto_tte);
-#if 0
- /* find the ethertype dissector table */
- ethertype_dissector_table = find_dissector_table("ethertype");
-#endif
+ hf_eth_dst = proto_registrar_get_byname ("eth.dst")->id;
+ hf_eth_src = proto_registrar_get_byname ("eth.src")->id;
+ hf_eth_type = proto_registrar_get_byname ("eth.type")->id;
}