diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-09 23:01:28 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-13 17:44:24 +0000 |
commit | 01f7356f85d33567a25e722e6488addd72ff64d4 (patch) | |
tree | 2d8623b57706cc924f76293f0f5b6ce8d83124ab /epan/dissectors/packet-fp_hint.c | |
parent | b776707af540d7431e815818e21ea1efac326d9f (diff) |
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8
Reviewed-on: https://code.wireshark.org/review/11805
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-fp_hint.c')
-rw-r--r-- | epan/dissectors/packet-fp_hint.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/packet-fp_hint.c b/epan/dissectors/packet-fp_hint.c index e83f9f9ab5..d8c757e66f 100644 --- a/epan/dissectors/packet-fp_hint.c +++ b/epan/dissectors/packet-fp_hint.c @@ -486,13 +486,13 @@ static void attach_info(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, guint } } -static void dissect_fp_hint(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_fp_hint(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { guint8 frame_type, channel_type; guint16 hdrlen; guint32 atm_hdr, aal2_ext; tvbuff_t *next_tvb; - dissector_handle_t *next_dissector; + dissector_handle_t next_dissector; proto_item *ti; proto_tree *fph_tree = NULL; @@ -523,17 +523,18 @@ static void dissect_fp_hint(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pinfo->pseudo_header->atm.vci = ((atm_hdr & 0x000ffff0) >> 4); pinfo->pseudo_header->atm.aal2_cid = aal2_ext & 0x000000ff; pinfo->pseudo_header->atm.type = TRAF_UMTS_FP; - next_dissector = &atm_untrunc_handle; + next_dissector = atm_untrunc_handle; break; case FPH_FRAME_ETHERNET: - next_dissector = ðwithfcs_handle; + next_dissector = ethwithfcs_handle; break; default: - next_dissector = &data_handle; + next_dissector = data_handle; } next_tvb = tvb_new_subset_remaining(tvb, hdrlen); - call_dissector(*next_dissector, next_tvb, pinfo, tree); + call_dissector(next_dissector, next_tvb, pinfo, tree); + return tvb_captured_length(tvb); } void @@ -582,7 +583,7 @@ proto_register_fp_hint(void) expert_module_t* expert_fp_hint; proto_fp_hint = proto_register_protocol("FP Hint", "FP Hint", "fp_hint"); - register_dissector("fp_hint", dissect_fp_hint, proto_fp_hint); + new_register_dissector("fp_hint", dissect_fp_hint, proto_fp_hint); proto_register_field_array(proto_fp_hint, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); |