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-bt-utp.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-bt-utp.c')
-rw-r--r-- | epan/dissectors/packet-bt-utp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/epan/dissectors/packet-bt-utp.c b/epan/dissectors/packet-bt-utp.c index 5020b87447..cec1b600a7 100644 --- a/epan/dissectors/packet-bt-utp.c +++ b/epan/dissectors/packet-bt-utp.c @@ -65,8 +65,6 @@ static const value_string bt_utp_extension_type_vals[] = { static int proto_bt_utp = -1; -static gboolean bt_utp_enable_heuristic_dissection = FALSE; /* disabled by default since heuristic is weak */ - /* --- "Original" uTP Header ("version 0" ?) -------------- See utp.cpp source code @ https://github.com/bittorrent/libutp @@ -475,9 +473,7 @@ proto_register_bt_utp(void) ); bt_utp_module = prefs_register_protocol(proto_bt_utp, proto_reg_handoff_bt_utp); - prefs_register_bool_preference(bt_utp_module, "enable", "Enable BT-uTP heuristic dissection", - "Enable BT-uTP heuristic dissection (default is disabled)", - &bt_utp_enable_heuristic_dissection); + prefs_register_obsolete_preference(bt_utp_module, "enable"); proto_register_field_array(proto_bt_utp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -489,15 +485,14 @@ proto_reg_handoff_bt_utp(void) static gboolean prefs_initialized = FALSE; if (!prefs_initialized) { - heur_dissector_add("udp", dissect_bt_utp, "BitTorrent UTP over UDP", "bt_utp_udp", proto_bt_utp); + /* disabled by default since heuristic is weak */ + heur_dissector_add("udp", dissect_bt_utp, "BitTorrent UTP over UDP", "bt_utp_udp", proto_bt_utp, HEURISTIC_DISABLE); bt_utp_handle = new_create_dissector_handle(dissect_bt_utp, proto_bt_utp); dissector_add_for_decode_as("udp.port", bt_utp_handle); prefs_initialized = TRUE; } - - heur_dissector_set_enabled("udp", dissect_bt_utp, proto_bt_utp, bt_utp_enable_heuristic_dissection); } /* |