summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-10 00:39:13 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-10 08:39:44 +0000
commitd4476b1c4e8d1f8a27dac6acbe5de14e4fd647a7 (patch)
tree82eb8d67bb9f84ed7f921f6f6f8f41fc4ddeefd6 /epan
parentbd8d2f583d295dcf62d8876b0a04baf6eb7c635c (diff)
downloadwireshark-d4476b1c4e8d1f8a27dac6acbe5de14e4fd647a7.tar.gz
Expose find_heur_dissector_list().
We already have find_dissector_table(); expose find_heur_dissector_list() as well, so that heuristic dissector lists can be shared. Change-Id: I3f50413b8b10fd3129fcdc2344cb1447f0946ce9 Reviewed-on: https://code.wireshark.org/review/5701 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r--epan/packet.c2
-rw-r--r--epan/packet.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 3dd079dd16..53085d5c02 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1855,7 +1855,7 @@ get_dissector_table_base(const char *name)
}
/* Finds a heuristic dissector table by table name. */
-static heur_dissector_list_t *
+heur_dissector_list_t *
find_heur_dissector_list(const char *name)
{
return (heur_dissector_list_t *)g_hash_table_lookup(heur_dissector_lists, name);
diff --git a/epan/packet.h b/epan/packet.h
index 507e9b2aaf..aa3e8f4aa9 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -381,6 +381,13 @@ WS_DLL_PUBLIC gboolean has_heur_dissector_list(const gchar *name);
WS_DLL_PUBLIC gboolean dissector_try_heuristic(heur_dissector_list_t sub_dissectors,
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, heur_dtbl_entry_t **hdtbl_entry, void *data);
+/** Find a heuristic dissector table by table name.
+ *
+ * @param name name of the dissector table
+ * @return pointer to the table on success, NULL if no such table exists
+ */
+WS_DLL_PUBLIC heur_dissector_list_t *find_heur_dissector_list(const char *name);
+
/** Add a sub-dissector to a heuristic dissector list.
* Call this in the proto_handoff function of the sub-dissector.
*