From Tomas Kukosa: add "find_dissector_table()",

"dissector_get_port_handle()", "dissector_handle_get_short_name()",
"dissector_handle_get_protocol_index()", "new_register_dissector()", and
"new_create_dissector_handle()" to the list of APIs available to
plugins on platforms where plugins have to call core Ethereal routines
through pointers.

"extern"alize the remaining routines in "epan/packet.h".

svn path=/trunk/; revision=8116
This commit is contained in:
Guy Harris 2003-07-31 18:34:52 +00:00
parent 2808683c78
commit c9abf6ddec
7 changed files with 43 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
* $Id: packet.h,v 1.67 2003/06/05 04:47:58 guy Exp $
* $Id: packet.h,v 1.68 2003/07/31 18:34:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -141,14 +141,14 @@ extern dissector_table_t register_dissector_table(const char *name,
char *ui_name, ftenum_t type, int base);
/* Find a dissector table by table name. */
dissector_table_t find_dissector_table(const char *name);
extern dissector_table_t find_dissector_table(const char *name);
/* Get the UI name for a sub-dissector table, given its internal name */
extern char *get_dissector_table_ui_name(const char *name);
/* Get the field type to use when displaying values of the selector for a
sub-dissector table, given the table's internal name */
ftenum_t get_dissector_table_type(const char *name);
extern ftenum_t get_dissector_table_type(const char *name);
/* Get the base to use when displaying values of the selector for a
sub-dissector table, given the table's internal name */
@ -271,11 +271,11 @@ extern void postseq_cleanup_all_protocols(void);
* useful for dissector registration routines which need to compile
* display filters. dfilters can't initialize itself until all protocols
* have registereed themselvs. */
void
extern void
register_final_registration_routine(void (*func)(void));
/* Call all the registered "final_registration" routines. */
void
extern void
final_registration_all_protocols(void);
/*

View File

@ -207,3 +207,9 @@ 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;
patable.p_find_dissector_table = find_dissector_table;
patable.p_dissector_get_port_handle = dissector_get_port_handle;
patable.p_dissector_handle_get_short_name = dissector_handle_get_short_name;
patable.p_dissector_handle_get_protocol_index = dissector_handle_get_protocol_index;
patable.p_new_register_dissector = new_register_dissector;
patable.p_new_create_dissector_handle = new_create_dissector_handle;

View File

@ -207,3 +207,9 @@ 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;
p_find_dissector_table = pat->p_find_dissector_table;
p_dissector_get_port_handle = pat->p_dissector_get_port_handle;
p_dissector_handle_get_short_name = pat->p_dissector_handle_get_short_name;
p_dissector_handle_get_protocol_index = pat->p_dissector_handle_get_protocol_index;
p_new_register_dissector = pat->p_new_register_dissector;
p_new_create_dissector_handle = pat->p_new_create_dissector_handle;

View File

@ -207,3 +207,9 @@
#define col_set_fence (*p_col_set_fence)
#define tvb_get_string (*p_tvb_get_string)
#define tvb_get_stringz (*p_tvb_get_stringz)
#define find_dissector_table (*p_find_dissector_table)
#define dissector_get_port_handle (*p_dissector_get_port_handle)
#define dissector_handle_get_short_name (*p_dissector_handle_get_short_name)
#define dissector_handle_get_protocol_index (*p_dissector_handle_get_protocol_index)
#define new_register_dissector (*p_new_register_dissector)
#define new_create_dissector_handle (*p_new_create_dissector_handle)

View File

@ -207,3 +207,9 @@ 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;
addr_find_dissector_table p_find_dissector_table;
addr_dissector_get_port_handle p_dissector_get_port_handle;
addr_dissector_handle_get_short_name p_dissector_handle_get_short_name;
addr_dissector_handle_get_protocol_index p_dissector_handle_get_protocol_index;
addr_new_register_dissector p_new_register_dissector;
addr_new_create_dissector_handle p_new_create_dissector_handle;

View File

@ -207,3 +207,9 @@ typedef void (*addr_except_setup_try) (struct except_stacknode *, struct except_
typedef void (*addr_col_set_fence) (column_info *, gint);
typedef guint8 *(*addr_tvb_get_string) (tvbuff_t *, gint, gint);
typedef guint8 *(*addr_tvb_get_stringz) (tvbuff_t *, gint, gint *);
typedef dissector_table_t (*addr_find_dissector_table) (const char *);
typedef dissector_handle_t (*addr_dissector_get_port_handle) (dissector_table_t, guint32);
typedef char *(*addr_dissector_handle_get_short_name) (dissector_handle_t);
typedef int (*addr_dissector_handle_get_protocol_index) (dissector_handle_t);
typedef void (*addr_new_register_dissector) (const char *, new_dissector_t, int);
typedef dissector_handle_t (*addr_new_create_dissector_handle) (new_dissector_t, int);

View File

@ -1,7 +1,7 @@
/* plugin_api_list.c
* Used to generate various included files for plugin API
*
* $Id: plugin_api_list.c,v 1.2 2003/07/18 22:47:18 guy Exp $
* $Id: plugin_api_list.c,v 1.3 2003/07/31 18:34:52 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -341,3 +341,10 @@ void col_set_fence(column_info*, gint);
guint8 *tvb_get_string(tvbuff_t *, gint, gint);
guint8 *tvb_get_stringz(tvbuff_t *, gint, gint *);
dissector_table_t find_dissector_table(const char *);
dissector_handle_t dissector_get_port_handle(dissector_table_t, guint32);
char *dissector_handle_get_short_name(dissector_handle_t);
int dissector_handle_get_protocol_index(dissector_handle_t);
void new_register_dissector(const char *, new_dissector_t, int);
dissector_handle_t new_create_dissector_handle(new_dissector_t, int);