aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-20 20:13:28 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-21 04:14:24 +0000
commit2b006ad30e38b015cfd13c33b265e2f48ddf36b2 (patch)
treec3c9a0de47a59d414477143a7ad24be694f28672 /epan/dissectors/packet-usb.c
parent81798009b97549ad0879d1c01a3b9c60ed726ed9 (diff)
Have a heur_dissector_list_t be an opaque handle.
This allows dissector lists to be looked up by name, so they can be shared by multiple dissectors. (This means that there's no "udplite" heuristic dissector list, but there shouldn't be one - protocols can run atop UDP or UDPLite equally well, and they share a port namespace and uint dissector table, so they should share a heuristic dissector table as well.) Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7 Reviewed-on: https://code.wireshark.org/review/5936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-usb.c')
-rw-r--r--epan/dissectors/packet-usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index 6befa27417..db0a080220 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -2796,7 +2796,7 @@ try_dissect_next_protocol(proto_tree *tree, tvbuff_t *next_tvb, packet_info *pin
break;
}
- if (try_heuristics) {
+ if (try_heuristics && heur_subdissector_list) {
ret = dissector_try_heuristic(heur_subdissector_list,
next_tvb, pinfo, parent, &hdtbl_entry, usb_conv_info);
if (ret)
@@ -4301,13 +4301,13 @@ proto_register_usb(void)
usb_bulk_dissector_table = register_dissector_table("usb.bulk",
"USB bulk endpoint", FT_UINT8, BASE_DEC);
- register_heur_dissector_list("usb.bulk", &heur_bulk_subdissector_list);
+ heur_bulk_subdissector_list = register_heur_dissector_list("usb.bulk");
usb_control_dissector_table = register_dissector_table("usb.control",
"USB control endpoint", FT_UINT8, BASE_DEC);
- register_heur_dissector_list("usb.control", &heur_control_subdissector_list);
+ heur_control_subdissector_list = register_heur_dissector_list("usb.control");
usb_interrupt_dissector_table = register_dissector_table("usb.interrupt",
"USB interrupt endpoint", FT_UINT8, BASE_DEC);
- register_heur_dissector_list("usb.interrupt", &heur_interrupt_subdissector_list);
+ heur_interrupt_subdissector_list = register_heur_dissector_list("usb.interrupt");
usb_descriptor_dissector_table = register_dissector_table("usb.descriptor",
"USB descriptor", FT_UINT8, BASE_DEC);