aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pw-eth.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 09:23:33 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:27 +0000
commit28ea58251c04562cc0670e57bf073dc6966e73e6 (patch)
treeabe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-pw-eth.c
parent13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-pw-eth.c')
-rw-r--r--epan/dissectors/packet-pw-eth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-pw-eth.c b/epan/dissectors/packet-pw-eth.c
index 3a8238e85f..ec812c1495 100644
--- a/epan/dissectors/packet-pw-eth.c
+++ b/epan/dissectors/packet-pw-eth.c
@@ -130,8 +130,8 @@ looks_like_plain_eth(tvbuff_t *tvb _U_)
return FALSE;
}
-static void
-dissect_pw_eth_heuristic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_pw_eth_heuristic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint8 first_nibble = (tvb_get_guint8(tvb, 0) >> 4) & 0x0F;
@@ -141,6 +141,7 @@ dissect_pw_eth_heuristic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(pw_eth_handle_cw, tvb, pinfo, tree);
else
call_dissector(pw_eth_handle_nocw, tvb, pinfo, tree);
+ return tvb_captured_length(tvb);
}
void
@@ -191,7 +192,7 @@ proto_register_pw_eth(void)
"pwethheuristic");
proto_register_field_array(proto_pw_eth_cw, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("pw_eth_heuristic", dissect_pw_eth_heuristic,
+ new_register_dissector("pw_eth_heuristic", dissect_pw_eth_heuristic,
proto_pw_eth_heuristic);
}