Put the pointer to "tcp_dissect_pdus()" in the function pointer table

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.

svn path=/trunk/; revision=5395
This commit is contained in:
Guy Harris 2002-05-05 00:34:12 +00:00
parent eb70c97a9b
commit a6e169fc27
5 changed files with 16 additions and 14 deletions

View 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;

View 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;

View 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)
@ -197,8 +199,6 @@
#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)

View 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;

View 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,