diff options
author | Michael Mann <mmann78@netscape.net> | 2015-07-12 20:40:31 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-07-17 17:12:22 +0000 |
commit | 21e5a950ade6a20260b63b5f5c055c52ac07b599 (patch) | |
tree | 417e76e5a3082c2431ce0f5c6d88cbf7701e0489 /epan/dissectors/packet-mbim.c | |
parent | 5bd6c4aff21dbc8a7ebf31c5d1510fcedf66d875 (diff) |
Remove all preferences related to enabling/disabling heuristic dissectors.
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.
Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.
Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mbim.c')
-rw-r--r-- | epan/dissectors/packet-mbim.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/epan/dissectors/packet-mbim.c b/epan/dissectors/packet-mbim.c index 3e062fe7fa..3a217ddada 100644 --- a/epan/dissectors/packet-mbim.c +++ b/epan/dissectors/packet-mbim.c @@ -642,7 +642,6 @@ static dissector_handle_t eth_fcs_handle; static dissector_handle_t ip_handle; static dissector_handle_t data_handle; -static gboolean mbim_bulk_heuristic = TRUE; static gboolean mbim_control_decode_unknown_itf = FALSE; enum { @@ -8004,10 +8003,7 @@ proto_register_mbim(void) "MBIM DSS Session Id", FT_UINT8, BASE_DEC); mbim_module = prefs_register_protocol(proto_mbim, proto_reg_handoff_mbim); - prefs_register_bool_preference(mbim_module, "bulk_heuristic", - "Try to identify data traffic with heuristic", - "Try to identify MBIM data packets on \"usb.bulk\" using heuristic", - &mbim_bulk_heuristic); + prefs_register_obsolete_preference(mbim_module, "bulk_heuristic"); prefs_register_bool_preference(mbim_module, "control_decode_unknown_itf", "Force decoding of unknown USB control data as MBIM", "Decode control data received on \"usb.control\" with an " @@ -8034,13 +8030,12 @@ proto_reg_handoff_mbim(void) eth_fcs_handle = find_dissector("eth_withfcs"); ip_handle = find_dissector("ip"); data_handle = find_dissector("data"); - heur_dissector_add("usb.bulk", dissect_mbim_bulk_heur, "MBIM USB bulk endpoint", "mbim_usb_bulk", proto_mbim); + heur_dissector_add("usb.bulk", dissect_mbim_bulk_heur, "MBIM USB bulk endpoint", "mbim_usb_bulk", proto_mbim, HEURISTIC_ENABLE); dissector_add_for_decode_as("usb.device", mbim_decode_as_handle); dissector_add_for_decode_as("usb.product", mbim_decode_as_handle); dissector_add_for_decode_as("usb.protocol", mbim_decode_as_handle); initialized = TRUE; } - heur_dissector_set_enabled("usb.bulk", dissect_mbim_bulk_heur, proto_mbim, mbim_bulk_heuristic); if (mbim_control_decode_unknown_itf != mbim_control_decode_unknown_itf_prev) { dissector_handle_t mbim_control_handle = find_dissector("mbim.control"); if (mbim_control_decode_unknown_itf) { |