diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-11-18 08:58:09 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-11-18 08:58:09 +0000 |
commit | 42d35d6cd369a846b864180f95f20125eef695a4 (patch) | |
tree | 6e3720fed9ee006f9d6f9d6e4e1c457328f9fb16 /plugins | |
parent | 240c946b8247437817e6947a089f32fdf2e4d06a (diff) |
Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.
Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).
Change some direct dissector calls to go through handles.
svn path=/trunk/; revision=9002
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Xplugin_table.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Xplugin_table.h b/plugins/Xplugin_table.h index fcc93e1783..01abd8b93f 100644 --- a/plugins/Xplugin_table.h +++ b/plugins/Xplugin_table.h @@ -27,7 +27,7 @@ typedef dissector_handle_t (*addr_find_dissector) (const char *); typedef dissector_handle_t (*addr_create_dissector_handle) (dissector_t, int); typedef int (*addr_call_dissector) (dissector_handle_t, tvbuff_t *, packet_info *, proto_tree *); typedef void (*addr_tcp_dissect_pdus) (tvbuff_t *, packet_info *, proto_tree *, gboolean, guint, guint (*) (tvbuff_t *, int), void (*) (tvbuff_t *, packet_info *, proto_tree *)); -typedef gboolean (*addr_proto_is_protocol_enabled) (int); +typedef gboolean (*addr_proto_is_protocol_enabled) (protocol_t *); typedef int (*addr_proto_item_get_len) (proto_item *); typedef void (*addr_proto_item_set_len) (proto_item *, gint); typedef void (*addr_proto_item_set_text) (proto_item *, const char *, ...); @@ -149,7 +149,7 @@ typedef gchar *(*addr_time_msecs_to_str) (guint32); typedef gchar *(*addr_abs_time_to_str) (nstime_t *); typedef int (*addr_proto_get_id_by_filter_name) (gchar *); typedef char *(*addr_proto_get_protocol_name) (int); -typedef char *(*addr_proto_get_protocol_short_name) (int); +typedef char *(*addr_proto_get_protocol_short_name) (protocol_t *); typedef char *(*addr_proto_get_protocol_filter_name) (int); typedef void (*addr_prefs_register_obsolete_preference) (module_t *, const char *); typedef void (*addr_add_new_data_source) (packet_info *, tvbuff_t *, char *); |