summaryrefslogtreecommitdiff
path: root/epan/packet.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-10 20:15:36 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-11 04:16:33 +0000
commit339df3d96de1e5fb7f978a5f0b71d90f28cc8d12 (patch)
treef1a24b44a2768ae84778c0d2e193a62cb9831679 /epan/packet.h
parent151164d4140b1ab882e3b0778e0aabdbaad06191 (diff)
downloadwireshark-339df3d96de1e5fb7f978a5f0b71d90f28cc8d12.tar.gz
Add a heur_dissector_table_foreach() function.
This is, for heuristic dissector tables, the equivalent of dissector_table_foreach() for keyed dissector tables. Change-Id: I4b2f870e1c1179fda1adddd93930b83aaaaf8763 Reviewed-on: https://code.wireshark.org/review/5715 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/packet.h')
-rw-r--r--epan/packet.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/epan/packet.h b/epan/packet.h
index 2ac0b8b82b..637d359cfa 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -356,9 +356,23 @@ typedef struct {
WS_DLL_PUBLIC void register_heur_dissector_list(const char *name,
heur_dissector_list_t *list);
+typedef void (*DATFunc_heur) (const gchar *table_name,
+ heur_dtbl_entry_t *entry, gpointer user_data);
typedef void (*DATFunc_heur_table) (const gchar *table_name,
heur_dissector_list_t *table, gpointer user_data);
+/** Iterate over heuristic dissectors in a table.
+ *
+ * Walk one heuristic dissector table's list calling a user supplied function
+ * on each entry.
+ *
+ * @param[in] table_name The name of the dissector table, e.g. "tcp".
+ * @param[in] func The function to call for each dissector.
+ * @param[in] user_data User data to pass to the function.
+ */
+WS_DLL_PUBLIC void heur_dissector_table_foreach(const char *table_name,
+ DATFunc_heur func, gpointer user_data);
+
/** Iterate over all heuristic dissector tables.
*
* Walk the set of heuristic dissector tables calling a user supplied function