diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-06-05 04:47:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-06-05 04:47:58 +0000 |
commit | f2233623ea2978359cfa25606950eae6ddf42c7b (patch) | |
tree | c937ec75a2a15baf8a8f0459f351f49eab2059fb /epan/packet.h | |
parent | ef77cb578ae796f0202311a16dae4e2ab9177586 (diff) |
From Lionel Ains: "-d" flag for decode-as support in Tethereal.
Add a new routine to iterate through all dissector tables, calling a
routine for each table, to support having the "-d" code list all
dissector tables.
Get rid of "dissector_handle_get_dissector_name()"; it was put in there
for "-d", but turns out not to be necessary for that.
Clean up the usage message a bit (using the convention, adhered to by at
least some UNIX utilities, of listing all the flags with no arguments in
a single lump, and then listing the ones with arguments individually,
and also putting "-v" and "-h" in a separate lump, as Ethereal does).
svn path=/trunk/; revision=7788
Diffstat (limited to 'epan/packet.h')
-rw-r--r-- | epan/packet.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/packet.h b/epan/packet.h index fef53c75b4..c52d906408 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -1,7 +1,7 @@ /* packet.h * Definitions for packet disassembly structures and routines * - * $Id: packet.h,v 1.66 2003/05/23 22:09:36 guy Exp $ + * $Id: packet.h,v 1.67 2003/06/05 04:47:58 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -113,8 +113,12 @@ typedef void (*dissector_t)(tvbuff_t *, packet_info *, proto_tree *); */ typedef int (*new_dissector_t)(tvbuff_t *, packet_info *, proto_tree *); -typedef void (*DATFunc) (gchar *table_name, gpointer key, gpointer value, gpointer user_data); -typedef void (*DATFunc_handle) (gchar *table_name, gpointer value, gpointer user_data); +typedef void (*DATFunc) (gchar *table_name, gpointer key, gpointer value, + gpointer user_data); +typedef void (*DATFunc_handle) (gchar *table_name, gpointer value, + gpointer user_data); +typedef void (*DATFunc_table) (gchar *table_name, gchar *ui_name, + gpointer user_data); /* Opaque structure - provides type checking but no access to components */ typedef struct dtbl_entry dtbl_entry_t; @@ -129,6 +133,8 @@ extern void dissector_all_tables_foreach_changed (DATFunc func, gpointer user_data); extern void dissector_table_foreach_handle(char *name, DATFunc_handle func, gpointer user_data); +extern void dissector_all_tables_foreach_table (DATFunc_table func, + gpointer user_data); /* a protocol uses the function to register a sub-dissector table */ extern dissector_table_t register_dissector_table(const char *name, @@ -213,9 +219,6 @@ extern void new_register_dissector(const char *name, new_dissector_t dissector, /* Get the short name of the protocol for a dissector handle. */ extern char *dissector_handle_get_short_name(dissector_handle_t handle); -/* Get the dissector name for a dissector handle. */ -extern const char *dissector_handle_get_dissector_name(dissector_handle_t handle); - /* Get the index of the protocol for a dissector handle. */ extern int dissector_handle_get_protocol_index(dissector_handle_t handle); |