diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-04-30 19:19:15 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-04-30 19:19:15 +0000 |
commit | dcae08c20b3273e807e45f360bae3dedbe425508 (patch) | |
tree | 5c5baf5422507f212f6d58ea641693e2e71220f8 /plugins | |
parent | 9c57931c5d0e9a02cbf28d0806ff74b486e21d43 (diff) | |
download | wireshark-dcae08c20b3273e807e45f360bae3dedbe425508.tar.gz wireshark-dcae08c20b3273e807e45f360bae3dedbe425508.tar.bz2 wireshark-dcae08c20b3273e807e45f360bae3dedbe425508.zip |
From Matthijs Melchior: export the exception mechanism routines to
plugins on platforms on which plugins need to use the table of functions
exported to plugins.
svn path=/trunk/; revision=7611
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/plugin_api.c | 18 | ||||
-rw-r--r-- | plugins/plugin_api.h | 19 | ||||
-rw-r--r-- | plugins/plugin_api_decls.h | 18 | ||||
-rw-r--r-- | plugins/plugin_table.h | 18 |
4 files changed, 69 insertions, 4 deletions
diff --git a/plugins/plugin_api.c b/plugins/plugin_api.c index 1316fee2c8..ee54d8cd3e 100644 --- a/plugins/plugin_api.c +++ b/plugins/plugin_api.c @@ -1,7 +1,7 @@ /* plugin_api.c * Routines for Ethereal plugins. * - * $Id: plugin_api.c,v 1.47 2003/04/29 21:27:19 guy Exp $ + * $Id: plugin_api.c,v 1.48 2003/04/30 19:19:14 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -241,4 +241,20 @@ plugin_address_table_init(plugin_address_table_t *pat) p_proto_item_set_end = pat->p_proto_item_set_end; p_proto_tree_add_none_format = pat->p_proto_tree_add_none_format; + + p_except_init = pat->p_except_init; + p_except_deinit = pat->p_except_deinit; + p_except_rethrow = pat->p_except_rethrow; + p_except_throw = pat->p_except_throw; + p_except_throwd = pat->p_except_throwd; + p_except_throwf = pat->p_except_throwf; + p_except_unhandled_catcher = pat->p_except_unhandled_catcher; + p_except_code = pat->p_except_code; + p_except_group = pat->p_except_group; + p_except_message = pat->p_except_message; + p_except_data = pat->p_except_data; + p_except_take_data = pat->p_except_take_data; + p_except_set_allocator = pat->p_except_set_allocator; + p_except_alloc = pat->p_except_alloc; + p_except_free = pat->p_except_free; } diff --git a/plugins/plugin_api.h b/plugins/plugin_api.h index 4b5bfe87f7..264b68e27a 100644 --- a/plugins/plugin_api.h +++ b/plugins/plugin_api.h @@ -1,7 +1,7 @@ /* plugin_api.h * Routines for Ethereal plugins. * - * $Id: plugin_api.h,v 1.48 2003/04/29 21:27:19 guy Exp $ + * $Id: plugin_api.h,v 1.49 2003/04/30 19:19:15 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -272,6 +272,22 @@ #define proto_item_set_len (*p_proto_item_set_len) #define proto_tree_add_none_format (*p_proto_tree_add_none_format) +#define except_init (*p_except_init) +#define except_deinit (*p_except_deinit) +#define except_rethrow (*p_except_rethrow) +#define except_throw (*p_except_throw) +#define except_throwd (*p_except_throwd) +#define except_throwf (*p_except_throwf) +#define except_unhandled_catcher (*p_except_unhandled_catcher) +#define except_code (*p_except_code) +#define except_group (*p_except_group) +#define except_message (*p_except_message) +#define except_data (*p_except_data) +#define except_take_data (*p_except_take_data) +#define except_set_allocator (*p_except_set_allocator) +#define except_alloc (*p_except_alloc) +#define except_free (*p_except_free) + #endif #include <epan/packet.h> @@ -283,6 +299,7 @@ #include "packet-tcp.h" #include "tap.h" #include "asn1.h" +#include "epan/except.h" #include "plugin_table.h" diff --git a/plugins/plugin_api_decls.h b/plugins/plugin_api_decls.h index 8e7cac9f04..b70d75d2f4 100644 --- a/plugins/plugin_api_decls.h +++ b/plugins/plugin_api_decls.h @@ -2,7 +2,7 @@ * Declarations of a list of "p_" names; included in various places * to declare them as variables or as function members. * - * $Id: plugin_api_decls.h,v 1.10 2003/04/29 21:27:19 guy Exp $ + * $Id: plugin_api_decls.h,v 1.11 2003/04/30 19:19:15 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -280,3 +280,19 @@ addr_asn1_err_to_str p_asn1_err_to_str; addr_proto_item_set_end p_proto_item_set_end; addr_proto_tree_add_none_format p_proto_tree_add_none_format; + +addr_except_init p_except_init; +addr_except_deinit p_except_deinit; +addr_except_rethrow p_except_rethrow; +addr_except_throw p_except_throw; +addr_except_throwd p_except_throwd; +addr_except_throwf p_except_throwf; +addr_except_unhandled_catcher p_except_unhandled_catcher; +addr_except_code p_except_code; +addr_except_group p_except_group; +addr_except_message p_except_message; +addr_except_data p_except_data; +addr_except_take_data p_except_take_data; +addr_except_set_allocator p_except_set_allocator; +addr_except_alloc p_except_alloc; +addr_except_free p_except_free; diff --git a/plugins/plugin_table.h b/plugins/plugin_table.h index 8aaff5f5ca..46695e155b 100644 --- a/plugins/plugin_table.h +++ b/plugins/plugin_table.h @@ -1,7 +1,7 @@ /* plugin_table.h * Table of exported addresses for Ethereal plugins. * - * $Id: plugin_table.h,v 1.60 2003/04/29 21:27:19 guy Exp $ + * $Id: plugin_table.h,v 1.61 2003/04/30 19:19:15 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -318,6 +318,22 @@ typedef void (*addr_proto_item_set_end)(proto_item*, tvbuff_t *, gint); typedef proto_item* (*addr_proto_tree_add_none_format)(proto_tree*, int, tvbuff_t*, gint, gint, const char*, ...); +typedef int (*except_init)(void); +typedef void (*except_deinit)(void); +typedef void (*except_rethrow)(except_t *); +typedef void (*except_throw)(long, long, const char *); +typedef void (*except_throwd)(long, long, const char *, void *); +typedef void (*except_throwf)(long, long, const char *, ...); +typedef void (*(*except_unhandled_catcher)(void (*)(except_t *)))(except_t *); +typedef unsigned long (*except_code)(except_t *); +typedef unsigned long (*except_group)(except_t *); +typedef const char *(*except_message)(except_t *); +typedef void *(*except_data)(except_t *); +typedef void *(*except_take_data)(except_t *); +typedef void (*except_set_allocator)(void *(*)(size_t), void (*)(void *)); +typedef void *(*except_alloc)(size_t); +typedef void (*except_free)(void *); + typedef struct { #include "plugin_api_decls.h" |