aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-flip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-07-09 13:47:59 -0400
committerMichael Mann <mmann78@netscape.net>2017-09-16 11:12:29 +0000
commit7d65b573f2734017be416f31852c4ede42bd987b (patch)
tree5fc5e6ebe6c44a5060292541f9664f0244a5e0e4 /epan/dissectors/packet-flip.c
parentd992e85fe8e9192cb730abf8796336d3b6d6fd50 (diff)
Have register_decode_as_next_proto create dissector table.
For protocols that have don't have a unique identifier for their payload, have register_decode_as_next_proto be a one stop shop to create Decode As functionality and a dissector table of type FT_NONE. Change-Id: Ic1f2e9ed0aee0554a4eb8f232630b99c0604dfc0 Reviewed-on: https://code.wireshark.org/review/22575 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-flip.c')
-rw-r--r--epan/dissectors/packet-flip.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/dissectors/packet-flip.c b/epan/dissectors/packet-flip.c
index 914625b746..37a9806637 100644
--- a/epan/dissectors/packet-flip.c
+++ b/epan/dissectors/packet-flip.c
@@ -370,9 +370,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
payload_tvb = tvb_new_subset_length(flip_tvb, offset, payload_len);
- /* Functionality for choosing subdissector is controlled through Decode As as FLIP doesn't
- have a unique identifier to determine subdissector */
- data_len = dissector_try_uint(subdissector_table, 0, payload_tvb, pinfo, tree);
+ data_len = dissector_try_payload(subdissector_table, payload_tvb, pinfo, tree);
if (data_len <= 0)
{
data_len = call_data_dissector(payload_tvb, pinfo, tree);
@@ -455,8 +453,6 @@ proto_register_flip(void)
proto_register_field_array(proto_flip, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- subdissector_table = register_dissector_table("flip.payload", "FLIP payload", proto_flip, FT_UINT32, BASE_HEX);
-
flip_module = prefs_register_protocol(proto_flip, NULL);
/* Register preferences - now obsolete because of Decode As*/
@@ -467,7 +463,7 @@ proto_register_flip(void)
prefs_register_obsolete_preference(flip_module, "forced_protocol");
prefs_register_obsolete_preference(flip_module, "forced_decode");
- register_decode_as_next_proto("flip", "FLIP Payload", "flip.payload", (build_label_func*)&flip_prompt);
+ subdissector_table = register_decode_as_next_proto(proto_flip, "FLIP Payload", "flip.payload", "FLIP payload", (build_label_func*)&flip_prompt);
} /* proto_register_flip() */