diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-02-02 03:42:18 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-02-02 03:42:18 +0000 |
commit | 0afa2b5aeba1e2c9db2c8468d258783c8f5ccbe0 (patch) | |
tree | dee4124c445edcac68a95fd668ecb79b2e296c31 /plugins | |
parent | f8359e84a9aadeaa307ecfb1a86a5395b4926877 (diff) |
Routines added to the plugin table, and include-once #ifndef/#define
wrappers added to plugin header files, by Charlie Duke.
svn path=/trunk/; revision=4676
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/plugin_api.c | 5 | ||||
-rw-r--r-- | plugins/plugin_api.h | 11 | ||||
-rw-r--r-- | plugins/plugin_api_defs.h | 11 | ||||
-rw-r--r-- | plugins/plugin_table.h | 17 |
4 files changed, 39 insertions, 5 deletions
diff --git a/plugins/plugin_api.c b/plugins/plugin_api.c index 3af42f8d42..7fd2cebb48 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.34 2002/01/29 08:44:51 guy Exp $ + * $Id: plugin_api.c,v 1.35 2002/02/02 03:42:18 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -103,6 +103,9 @@ plugin_address_table_init(plugin_address_table_t *pat) p_proto_tree_add_int_format = pat->p_proto_tree_add_int_format; p_proto_tree_add_text = pat->p_proto_tree_add_text; p_tvb_new_subset = pat->p_tvb_new_subset; + p_tvb_set_free_cb = pat->p_tvb_set_free_cb; + p_tvb_set_child_real_data_tvbuff = pat->p_tvb_set_child_real_data_tvbuff; + p_tvb_new_real_data = pat->p_tvb_new_real_data; p_tvb_length = pat->p_tvb_length; p_tvb_length_remaining = pat->p_tvb_length_remaining; p_tvb_bytes_exist = pat->p_tvb_bytes_exist; diff --git a/plugins/plugin_api.h b/plugins/plugin_api.h index 7b29baaf44..9f5ce16a96 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.35 2002/01/29 08:44:51 guy Exp $ + * $Id: plugin_api.h,v 1.36 2002/02/02 03:42:18 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -21,6 +21,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef PLUGIN_API_H +#define PLUGIN_API_H + #ifdef PLUGINS_NEED_ADDRESS_TABLE /* Some OSes (Win32) have DLLs that cannot reference symbols in the parent @@ -112,6 +115,10 @@ #define tvb_new_subset (*p_tvb_new_subset) +#define tvb_set_free_cb (*p_tvb_set_free_cb) +#define tvb_set_child_real_data_tvbuff (*p_tvb_set_child_real_data_tvbuff) +#define tvb_new_real_data (*p_tvb_new_real_data) + #define tvb_length (*p_tvb_length) #define tvb_length_remaining (*p_tvb_length_remaining) #define tvb_bytes_exist (*p_tvb_bytes_exist) @@ -204,3 +211,5 @@ void plugin_address_table_init(plugin_address_table_t*); #else #define plugin_address_table_init(x) ; #endif + +#endif /* PLUGIN_API_H */ diff --git a/plugins/plugin_api_defs.h b/plugins/plugin_api_defs.h index 0a3f7f7377..bccaca4763 100644 --- a/plugins/plugin_api_defs.h +++ b/plugins/plugin_api_defs.h @@ -1,7 +1,7 @@ /* plugin_api_defs.h * Define the variables that hold pointers to plugin API functions * - * $Id: plugin_api_defs.h,v 1.10 2002/01/29 08:44:51 guy Exp $ + * $Id: plugin_api_defs.h,v 1.11 2002/02/02 03:42:18 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -21,6 +21,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef PLUGIN_API_DEFS_H +#define PLUGIN_API_DEFS_H + #ifdef PLUGINS_NEED_ADDRESS_TABLE addr_check_col p_check_col; @@ -113,6 +116,10 @@ addr_proto_tree_add_text p_proto_tree_add_text; addr_tvb_new_subset p_tvb_new_subset; +addr_tvb_set_free_cb p_tvb_set_free_cb; +addr_tvb_set_child_real_data_tvbuff p_tvb_set_child_real_data_tvbuff; +addr_tvb_new_real_data p_tvb_new_real_data; + addr_tvb_length p_tvb_length; addr_tvb_length_remaining p_tvb_length_remaining; addr_tvb_bytes_exist p_tvb_bytes_exist; @@ -183,3 +190,5 @@ addr_get_CDR_wchar p_get_CDR_wchar; addr_get_CDR_wstring p_get_CDR_wstring; #endif /* PLUGINS_NEED_ADDRESS_TABLE */ + +#endif /* PLUGIN_API_DEFS_H */ diff --git a/plugins/plugin_table.h b/plugins/plugin_table.h index c40fbd8644..3fcb6f1b05 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.37 2002/01/29 08:44:51 guy Exp $ + * $Id: plugin_table.h,v 1.38 2002/02/02 03:42:18 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -21,6 +21,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef PLUGIN_TABLE_H +#define PLUGIN_TABLE_H + #ifdef PLUGINS_NEED_ADDRESS_TABLE /* Some OSes (Win32) have DLLs that cannot reference symbols in the parent @@ -126,6 +129,10 @@ typedef proto_item* (*addr_proto_tree_add_text)(proto_tree*, tvbuff_t*, gint, gi typedef tvbuff_t* (*addr_tvb_new_subset)(tvbuff_t*, gint, gint, gint); +typedef void (*addr_tvb_set_free_cb)(tvbuff_t*, tvbuff_free_cb_t); +typedef void (*addr_tvb_set_child_real_data_tvbuff)(tvbuff_t*, tvbuff_t*); +typedef tvbuff_t* (*addr_tvb_new_real_data)(const guint8*, guint, gint, const gchar*); + typedef guint (*addr_tvb_length)(tvbuff_t*); typedef gint (*addr_tvb_length_remaining)(tvbuff_t*, gint); typedef gboolean (*addr_tvb_bytes_exist)(tvbuff_t*, gint, gint); @@ -292,6 +299,10 @@ typedef struct { addr_tvb_new_subset p_tvb_new_subset; + addr_tvb_set_free_cb p_tvb_set_free_cb; + addr_tvb_set_child_real_data_tvbuff p_tvb_set_child_real_data_tvbuff; + addr_tvb_new_real_data p_tvb_new_real_data; + addr_tvb_length p_tvb_length; addr_tvb_length_remaining p_tvb_length_remaining; addr_tvb_bytes_exist p_tvb_bytes_exist; @@ -373,4 +384,6 @@ typedef struct { typedef void plugin_address_table_t; -#endif +#endif /* PLUGINS_NEED_ADDRESS_TABLE */ + +#endif /* PLUGIN_TABLE_H */ |