Export "tvb_get_string()" and "tvb_get_stringz()" to plugins.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 12 Jun 2003 10:10:39 +0000 (10:10 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 12 Jun 2003 10:10:39 +0000 (10:10 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7862 f5534014-38df-0310-8fa8-9805f1628bb7

epan/plugins.c
plugins/plugin_api.c
plugins/plugin_api.h
plugins/plugin_api_decls.h
plugins/plugin_table.h

index cd319534c3ad548e359396bd031f187e21bf9c80..9d2ef4b63ac1ff6a02eba49e81eb02a628171d7f 100644 (file)
@@ -1,7 +1,7 @@
 /* plugins.c
  * plugin routines
  *
- * $Id: plugins.c,v 1.72 2003/06/04 00:11:02 guy Exp $
+ * $Id: plugins.c,v 1.73 2003/06/12 10:10:39 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -563,6 +563,9 @@ init_plugins(const char *plugin_dir)
        patable.p_except_setup_try              = except_setup_try;
 
        patable.p_col_set_fence                 = col_set_fence;
+
+       patable.p_tvb_get_string                = tvb_get_string;
+       patable.p_tvb_get_stringz               = tvb_get_stringz;
 #endif
 
 #ifdef WIN32
index 498f1668befda4d9cd9f2e682a6462d95a8ea3d2..de6f8ddd58f484fefdf16d89cf1d257e5c7de937 100644 (file)
@@ -1,7 +1,7 @@
 /* plugin_api.c
  * Routines for Ethereal plugins.
  *
- * $Id: plugin_api.c,v 1.51 2003/06/03 02:32:55 gerald Exp $
+ * $Id: plugin_api.c,v 1.52 2003/06/12 10:10:39 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -256,4 +256,7 @@ plugin_address_table_init(plugin_address_table_t *pat)
        p_except_setup_try                      = pat->p_except_setup_try;
 
        p_col_set_fence                         = pat->p_col_set_fence;
+
+       p_tvb_get_string                        = pat->p_tvb_get_string;
+       p_tvb_get_stringz                       = pat->p_tvb_get_stringz;
 }
index 91e9ef169b414513b7fd34079c619614fb5ad72b..21700654f1d24904139d05b6b4592da9f20523c7 100644 (file)
@@ -1,7 +1,7 @@
 /* plugin_api.h
  * Routines for Ethereal plugins.
  *
- * $Id: plugin_api.h,v 1.52 2003/06/03 02:32:55 gerald Exp $
+ * $Id: plugin_api.h,v 1.53 2003/06/12 10:10:39 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
 
 #define col_set_fence                  (*p_col_set_fence)
 
+#define tvb_get_string                 (*p_tvb_get_string)
+#define tvb_get_stringz                        (*p_tvb_get_stringz)
+
 #endif
 
 #include <epan/packet.h>
index c2bc0fc7f1d58fc135cd54665d6e45436aa83e21..b5b508a3f378b3d6146d3df3214d12b1ee474b93 100644 (file)
@@ -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.14 2003/06/03 02:32:56 gerald Exp $
+ * $Id: plugin_api_decls.h,v 1.15 2003/06/12 10:10:39 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -295,3 +295,6 @@ addr_except_pop                             p_except_pop;
 addr_except_setup_try                  p_except_setup_try;
 
 addr_col_set_fence                     p_col_set_fence;
+
+addr_tvb_get_string                    p_tvb_get_string;
+addr_tvb_get_stringz                   p_tvb_get_stringz;
index a338644069529da14e8c82bb4ee9580ea3de3978..51dbe488606be674c8dc1a06d99e640f8cf42752 100644 (file)
@@ -1,7 +1,7 @@
 /* plugin_table.h
  * Table of exported addresses for Ethereal plugins.
  *
- * $Id: plugin_table.h,v 1.64 2003/06/03 02:32:56 gerald Exp $
+ * $Id: plugin_table.h,v 1.65 2003/06/12 10:10:39 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -333,6 +333,9 @@ typedef void (*addr_except_setup_try)(struct except_stacknode *, struct except_c
 
 typedef void (*addr_col_set_fence)(column_info*, gint);
 
+typedef gint (*addr_tvb_get_string)(tvbuff_t*, gint, gint);
+typedef gint (*addr_tvb_get_stringz)(tvbuff_t*, gint, gint*);
+
 typedef struct  {
 
 #include "plugin_api_decls.h"