diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-15 08:00:10 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-16 03:50:05 +0000 |
commit | bbdd89b973353a0df1d98d884c38f3832670bfea (patch) | |
tree | 9b992f923f565af2fcab30902508a191de85ca53 /epan/dissectors/packet-gmhdr.c | |
parent | 6012ba8f008bfba24fd44ce7a2a3055572453dce (diff) |
create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48
Reviewed-on: https://code.wireshark.org/review/11850
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-gmhdr.c')
-rw-r--r-- | epan/dissectors/packet-gmhdr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c index a746713324..34d0a2ad28 100644 --- a/epan/dissectors/packet-gmhdr.c +++ b/epan/dissectors/packet-gmhdr.c @@ -216,8 +216,8 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui -static void -dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *ti; gint16 length; @@ -274,6 +274,7 @@ dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, ðertype_data); } + return tvb_captured_length(tvb); } static int @@ -520,7 +521,7 @@ proto_reg_handoff_gmhdr(void) ethertype_handle = find_dissector("ethertype"); - gmhdr_handle = create_dissector_handle(dissect_gmhdr, proto_gmhdr); + gmhdr_handle = new_create_dissector_handle(dissect_gmhdr, proto_gmhdr); dissector_add_uint("ethertype", ETHERTYPE_GIGAMON, gmhdr_handle); heur_dissector_add("eth.trailer", dissect_gmtrailer, "Gigamon Ethernet header", "gmhdr_eth", proto_gmhdr, HEURISTIC_ENABLE); |