diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-10 00:39:13 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-10 08:39:44 +0000 |
commit | d4476b1c4e8d1f8a27dac6acbe5de14e4fd647a7 (patch) | |
tree | 82eb8d67bb9f84ed7f921f6f6f8f41fc4ddeefd6 /epan | |
parent | bd8d2f583d295dcf62d8876b0a04baf6eb7c635c (diff) |
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.c | 2 | ||||
-rw-r--r-- | epan/packet.h | 7 |
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. * |