aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-jxta.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-07-12 20:40:31 -0400
committerMichael Mann <mmann78@netscape.net>2015-07-17 17:12:22 +0000
commit21e5a950ade6a20260b63b5f5c055c52ac07b599 (patch)
tree417e76e5a3082c2431ce0f5c6d88cbf7701e0489 /epan/dissectors/packet-jxta.c
parent5bd6c4aff21dbc8a7ebf31c5d1510fcedf66d875 (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-jxta.c')
-rw-r--r--epan/dissectors/packet-jxta.c62
1 files changed, 9 insertions, 53 deletions
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index e4b29b9a12..c5f0e794e5 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -168,9 +168,6 @@ static int uri_address_type = -1;
* global preferences
**/
static gboolean gDESEGMENT = TRUE;
-static gboolean gUDP_HEUR = TRUE;
-static gboolean gTCP_HEUR = TRUE;
-static gboolean gSCTP_HEUR = TRUE;
static gboolean gMSG_MEDIA = TRUE;
/**
@@ -2384,14 +2381,9 @@ void proto_register_jxta(void)
" and enable \"Reassemble fragmented IP datagrams\" in the IP protocol settings.",
&gDESEGMENT);
- prefs_register_bool_preference(jxta_module, "udp.heuristic", "Try to discover JXTA in UDP datagrams",
- "Enable to inspect UDP datagrams for JXTA messages.", &gUDP_HEUR);
-
- prefs_register_bool_preference(jxta_module, "tcp.heuristic", "Try to discover JXTA in TCP connections",
- "Enable to inspect TCP connections for JXTA conversations.", &gTCP_HEUR);
-
- prefs_register_bool_preference(jxta_module, "sctp.heuristic", "Try to discover JXTA in SCTP connections",
- "Enable to inspect SCTP connections for JXTA conversations.", &gSCTP_HEUR);
+ prefs_register_obsolete_preference(jxta_module, "udp.heuristic");
+ prefs_register_obsolete_preference(jxta_module, "tcp.heuristic");
+ prefs_register_obsolete_preference(jxta_module, "sctp.heuristic");
register_conversation_table(proto_jxta, TRUE, jxta_conversation_packet, jxta_hostlist_packet);
}
@@ -2406,9 +2398,6 @@ void proto_reg_handoff_jxta(void)
static dissector_handle_t message_jxta_handle;
static gboolean msg_media_register_done = FALSE;
- static gboolean udp_register_done = FALSE;
- static gboolean tcp_register_done = FALSE;
- static gboolean sctp_register_done = FALSE;
if(!init_done) {
message_jxta_handle = new_create_dissector_handle(dissect_jxta_message, proto_message_jxta);
@@ -2436,47 +2425,14 @@ void proto_reg_handoff_jxta(void)
}
}
- if( gUDP_HEUR ) {
- if( !udp_register_done ) {
- /* g_message( "Registering UDP Heuristic dissector" ); */
- heur_dissector_add("udp", dissect_jxta_UDP_heur, "JXTA over UDP", "jxta_udp", proto_jxta);
- udp_register_done = TRUE;
- }
- } else {
- if( udp_register_done ) {
- /* g_message( "Deregistering UDP Heuristic dissector" ); */
- heur_dissector_delete("udp", dissect_jxta_UDP_heur, proto_jxta);
- udp_register_done = FALSE;
- }
- }
+ /* g_message( "Registering UDP Heuristic dissector" ); */
+ heur_dissector_add("udp", dissect_jxta_UDP_heur, "JXTA over UDP", "jxta_udp", proto_jxta, HEURISTIC_ENABLE);
- if( gTCP_HEUR ) {
- if( !tcp_register_done ) {
- /* g_message( "Registering TCP Heuristic dissector" ); */
- heur_dissector_add("tcp", dissect_jxta_TCP_heur, "JXTA over TCP", "jxta_tcp", proto_jxta);
- tcp_register_done = TRUE;
- }
- } else {
- if( tcp_register_done ) {
- /* g_message( "Deregistering TCP Heuristic dissector" ); */
- heur_dissector_delete("tcp", dissect_jxta_TCP_heur, proto_jxta);
- tcp_register_done = FALSE;
- }
- }
+ /* g_message( "Registering TCP Heuristic dissector" ); */
+ heur_dissector_add("tcp", dissect_jxta_TCP_heur, "JXTA over TCP", "jxta_tcp", proto_jxta, HEURISTIC_ENABLE);
- if( gSCTP_HEUR ) {
- if( !sctp_register_done ) {
- /* g_message( "Registering SCTP Heuristic dissector" ); */
- heur_dissector_add("sctp", dissect_jxta_SCTP_heur, "JXTA over SCTP", "jxta_sctp", proto_jxta);
- sctp_register_done = TRUE;
- }
- } else {
- if( sctp_register_done ) {
- /* g_message( "Deregistering SCTP Heuristic dissector" ); */
- heur_dissector_delete("sctp", dissect_jxta_SCTP_heur, proto_jxta);
- sctp_register_done = FALSE;
- }
- }
+ /* g_message( "Registering SCTP Heuristic dissector" ); */
+ heur_dissector_add("sctp", dissect_jxta_SCTP_heur, "JXTA over SCTP", "jxta_sctp", proto_jxta, HEURISTIC_ENABLE);
}
/*