Put the pointer to "tcp_dissect_pdus()" in the function pointer table
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 May 2002 00:34:12 +0000 (00:34 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 May 2002 00:34:12 +0000 (00:34 +0000)
where the pointer to "dissect_data()" was in 0.9.3; the pointer to
"dissect_data()" wasn't initialized in 0.9.3 (as the function wasn't
exported - you call it through a handle), so no plugin should have been
using it, and putting the pointer to "tcp_dissect_pdus()" in its place
means the structure offsets of all function pointers after it will be
the same in 0.9.3 and the next release, preserving binary compatibility
for plugins.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5395 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 84dbd62b4034ac02b8ebfa7f5d829e753dd2af4f..9e1931102782960b62f17e20109960fc24179755 100644 (file)
@@ -1,7 +1,7 @@
 /* plugins.c
  * plugin routines
  *
- * $Id: plugins.c,v 1.51 2002/05/05 00:16:34 guy Exp $
+ * $Id: plugins.c,v 1.52 2002/05/05 00:34:11 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -320,6 +320,8 @@ init_plugins(const char *plugin_dir)
        patable.p_create_dissector_handle       = create_dissector_handle;
        patable.p_call_dissector                = call_dissector;
 
+       patable.p_tcp_dissect_pdus              = tcp_dissect_pdus;
+
        patable.p_proto_is_protocol_enabled     = proto_is_protocol_enabled;
 
        patable.p_proto_item_get_len            = proto_item_get_len;
@@ -444,7 +446,6 @@ init_plugins(const char *plugin_dir)
        patable.p_dissect_tpkt_encap            = dissect_tpkt_encap;
 
        patable.p_set_actual_length             = set_actual_length;
-       patable.p_tcp_dissect_pdus              = tcp_dissect_pdus;
        patable.p_decode_boolean_bitfield       = decode_boolean_bitfield;
        patable.p_decode_numeric_bitfield       = decode_numeric_bitfield;
        patable.p_decode_enumerated_bitfield    = decode_enumerated_bitfield;
index 2c6f1b8a65559b334b7d43f452391edc4cc8173f..43a6ca10042629acd6218835f715b51305372491 100644 (file)
@@ -1,7 +1,7 @@
 /* plugin_api.c
  * Routines for Ethereal plugins.
  *
- * $Id: plugin_api.c,v 1.38 2002/05/05 00:16:36 guy Exp $
+ * $Id: plugin_api.c,v 1.39 2002/05/05 00:34:12 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -60,6 +60,7 @@ plugin_address_table_init(plugin_address_table_t *pat)
        p_find_dissector                        = pat->p_find_dissector;
        p_create_dissector_handle               = pat->p_create_dissector_handle;
        p_call_dissector                        = pat->p_call_dissector;
+       p_tcp_dissect_pdus                      = pat->p_tcp_dissect_pdus;
        p_proto_is_protocol_enabled             = pat->p_proto_is_protocol_enabled;
        p_proto_item_get_len                    = pat->p_proto_item_get_len;
        p_proto_item_set_len                    = pat->p_proto_item_set_len;
@@ -168,7 +169,6 @@ plugin_address_table_init(plugin_address_table_t *pat)
        p_dissect_tpkt_encap                    = pat->p_dissect_tpkt_encap;
 
        p_set_actual_length                     = pat->p_set_actual_length;
-       p_tcp_dissect_pdus                      = pat->p_tcp_dissect_pdus;
        p_decode_boolean_bitfield               = pat->p_decode_boolean_bitfield;
        p_decode_numeric_bitfield               = pat->p_decode_numeric_bitfield;
        p_decode_enumerated_bitfield            = pat->p_decode_enumerated_bitfield;
index f76ae2ec71fa84a08554f0157a270eee539b3c91..0e2a0093c34461792c2669a5f6bd4a2faa8fde78 100644 (file)
@@ -1,7 +1,7 @@
 /* plugin_api.h
  * Routines for Ethereal plugins.
  *
- * $Id: plugin_api.h,v 1.39 2002/05/05 00:16:36 guy Exp $
+ * $Id: plugin_api.h,v 1.40 2002/05/05 00:34:12 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -71,6 +71,8 @@
 #define create_dissector_handle                (*p_create_dissector_handle)
 #define call_dissector                 (*p_call_dissector)
 
+#define tcp_dissect_pdus               (*p_tcp_dissect_pdus)
+
 #define proto_is_protocol_enabled      (*p_proto_is_protocol_enabled)
 
 #define proto_item_get_len             (*p_proto_item_get_len)
 
 #define set_actual_length              (*p_set_actual_length)
 
-#define tcp_dissect_pdus               (*p_tcp_dissect_pdus)
-
 #define decode_boolean_bitfield                (*p_decode_boolean_bitfield)
 #define decode_numeric_bitfield                (*p_decode_numeric_bitfield)
 #define decode_enumerated_bitfield     (*p_decode_enumerated_bitfield)
index b25456d7e0c7673de4c90ab557202917b00f2f2c..82850f6c6be3683cb9cd9c7e95976e6f2d13adad 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.1 2002/05/05 00:16:36 guy Exp $
+ * $Id: plugin_api_decls.h,v 1.2 2002/05/05 00:34:12 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -70,6 +70,8 @@ addr_find_dissector                   p_find_dissector;
 addr_create_dissector_handle           p_create_dissector_handle;
 addr_call_dissector                    p_call_dissector;
 
+addr_tcp_dissect_pdus                  p_tcp_dissect_pdus;
+
 addr_proto_is_protocol_enabled         p_proto_is_protocol_enabled;
 
 addr_proto_item_get_len                        p_proto_item_get_len;
@@ -206,7 +208,6 @@ addr_is_tpkt                                p_is_tpkt;
 addr_dissect_tpkt_encap                        p_dissect_tpkt_encap;
 
 addr_set_actual_length                 p_set_actual_length;
-addr_tcp_dissect_pdus                  p_tcp_dissect_pdus;
 addr_decode_boolean_bitfield           p_decode_boolean_bitfield;
 addr_decode_numeric_bitfield           p_decode_numeric_bitfield;
 addr_decode_enumerated_bitfield                p_decode_enumerated_bitfield;
index 4b401a4b4088f727be7dd56e2b88f825754d6edf..19a7e140f53053f8b47c60642caea08b52b6b876 100644 (file)
@@ -1,7 +1,7 @@
 /* plugin_table.h
  * Table of exported addresses for Ethereal plugins.
  *
- * $Id: plugin_table.h,v 1.45 2002/05/05 00:16:36 guy Exp $
+ * $Id: plugin_table.h,v 1.46 2002/05/05 00:34:12 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -72,6 +72,10 @@ typedef dissector_handle_t (*addr_create_dissector_handle)(dissector_t dissector
 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, int, guint (*)(tvbuff_t *, int),
+    void (*)(tvbuff_t *, packet_info *, proto_tree *));
+
 typedef gboolean (*addr_proto_is_protocol_enabled)(int);
 
 typedef int (*addr_proto_item_get_len)(proto_item*);
@@ -225,10 +229,6 @@ typedef void (*addr_dissect_tpkt_encap)(tvbuff_t *, packet_info *,
 
 typedef void (*addr_set_actual_length)(tvbuff_t *, guint);
 
-typedef void (*addr_tcp_dissect_pdus)(tvbuff_t *, packet_info *, proto_tree *,
-    gboolean, int, guint (*)(tvbuff_t *, int),
-    void (*)(tvbuff_t *, packet_info *, proto_tree *));
-
 typedef const char *(*addr_decode_boolean_bitfield)(guint32, guint32, int,
     const char *, const char *);
 typedef const char *(*addr_decode_numeric_bitfield)(guint32, guint32, int,