aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-infiniband.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-infiniband.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-infiniband.c')
-rw-r--r--epan/dissectors/packet-infiniband.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c
index c905a9b889..30d4775d70 100644
--- a/epan/dissectors/packet-infiniband.c
+++ b/epan/dissectors/packet-infiniband.c
@@ -2626,9 +2626,7 @@ static void parse_PAYLOAD(proto_tree *parentTree,
if (dissector_found == FALSE)
{
- /* Functionality for choosing subdissector is controlled through Decode As as there
- isn't a unique identifier to determine subdissector */
- if (dissector_try_uint_new(subdissector_table, 0, next_tvb, pinfo, top_tree, TRUE, info))
+ if (dissector_try_payload_new(subdissector_table, next_tvb, pinfo, top_tree, TRUE, info))
{
dissector_found = TRUE;
}
@@ -8414,7 +8412,6 @@ void proto_register_infiniband(void)
/* register the subdissector tables */
heur_dissectors_payload = register_heur_dissector_list("infiniband.payload", proto_infiniband);
heur_dissectors_cm_private = register_heur_dissector_list("infiniband.mad.cm.private", proto_infiniband);
- subdissector_table = register_dissector_table("infiniband", "Infiniband Payload", proto_infiniband, FT_UINT16, BASE_DEC);
/* register dissection preferences */
infiniband_module = prefs_register_protocol(proto_infiniband, proto_reg_handoff_infiniband);
@@ -8443,7 +8440,8 @@ void proto_register_infiniband(void)
CM_context_table = g_hash_table_new_full(g_int64_hash, g_int64_equal,
table_destroy_notify, table_destroy_notify);
- register_decode_as_next_proto("infiniband", "Network", "infiniband", (build_label_func*)&infiniband_payload_prompt);
+ subdissector_table = register_decode_as_next_proto(proto_infiniband, "Network", "infiniband", "Infiniband Payload",
+ (build_label_func*)&infiniband_payload_prompt);
register_shutdown_routine(infiniband_shutdown);
}