2000-03-15 19:09:52 +00:00
|
|
|
/* plugin_table.h
|
|
|
|
* Table of exported addresses for Ethereal plugins.
|
|
|
|
*
|
2003-06-12 10:10:39 +00:00
|
|
|
* $Id: plugin_table.h,v 1.65 2003/06/12 10:10:39 guy Exp $
|
2000-03-15 19:09:52 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
2001-11-13 23:55:44 +00:00
|
|
|
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2000-03-15 19:09:52 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2000-03-15 19:09:52 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2000-03-15 19:09:52 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2002-02-02 03:42:18 +00:00
|
|
|
#ifndef PLUGIN_TABLE_H
|
|
|
|
#define PLUGIN_TABLE_H
|
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
#ifdef PLUGINS_NEED_ADDRESS_TABLE
|
|
|
|
|
|
|
|
/* Some OSes (Win32) have DLLs that cannot reference symbols in the parent
|
|
|
|
executable, so the executable needs to provide a collection of pointers
|
|
|
|
to those functions for the DLL plugin to use. */
|
|
|
|
|
|
|
|
/* Typedefs to make our plugin_address_table_t struct look prettier */
|
2001-12-10 01:48:27 +00:00
|
|
|
typedef gint (*addr_check_col)(column_info*, gint);
|
|
|
|
typedef void (*addr_col_clear)(column_info*, gint);
|
2002-12-02 23:34:40 +00:00
|
|
|
typedef void (*addr_col_add_fstr)(column_info*, gint, const gchar*, ...);
|
|
|
|
typedef void (*addr_col_append_fstr)(column_info*, gint, const gchar*, ...);
|
|
|
|
typedef void (*addr_col_prepend_fstr)(column_info*, gint, const gchar*, ...);
|
2001-12-10 01:48:27 +00:00
|
|
|
typedef void (*addr_col_add_str)(column_info*, gint, const gchar*);
|
2002-12-02 23:34:40 +00:00
|
|
|
typedef void (*addr_col_append_str)(column_info*, gint, const gchar*);
|
2001-12-10 01:48:27 +00:00
|
|
|
typedef void (*addr_col_set_str)(column_info*, gint, gchar*);
|
2000-03-15 19:09:52 +00:00
|
|
|
|
2001-11-04 03:37:29 +00:00
|
|
|
typedef void (*addr_register_init_routine)(void (*func)(void));
|
2002-01-05 04:12:17 +00:00
|
|
|
typedef void (*addr_register_postseq_cleanup_routine)(void (*func)(void));
|
2002-02-20 08:24:52 +00:00
|
|
|
|
|
|
|
typedef gchar* (*addr_match_strval)(guint32, const value_string*);
|
|
|
|
typedef gchar* (*addr_val_to_str)(guint32, const value_string *, const char *);
|
|
|
|
|
2002-08-28 20:41:00 +00:00
|
|
|
typedef conversation_t *(*addr_conversation_new)(address *, address *,
|
2001-11-04 03:37:29 +00:00
|
|
|
port_type, guint32, guint32, guint);
|
2002-08-28 20:41:00 +00:00
|
|
|
typedef conversation_t *(*addr_find_conversation)(address *, address *,
|
2001-11-04 03:37:29 +00:00
|
|
|
port_type, guint32, guint32, guint);
|
2002-02-20 08:24:52 +00:00
|
|
|
typedef void (*addr_conversation_set_dissector)(conversation_t *,
|
|
|
|
dissector_handle_t);
|
2001-11-04 03:37:29 +00:00
|
|
|
|
2001-01-03 07:37:29 +00:00
|
|
|
typedef int (*addr_proto_register_protocol)(char*, char*, char*);
|
2000-03-15 19:09:52 +00:00
|
|
|
typedef void (*addr_proto_register_field_array)(int, hf_register_info*, int);
|
|
|
|
typedef void (*addr_proto_register_subtree_array)(int**, int);
|
|
|
|
|
2001-12-03 04:00:26 +00:00
|
|
|
typedef void (*addr_dissector_add)(const char *, guint32, dissector_handle_t);
|
|
|
|
typedef void (*addr_dissector_delete)(const char *, guint32,
|
|
|
|
dissector_handle_t);
|
2001-12-03 10:00:23 +00:00
|
|
|
typedef void (*addr_dissector_add_handle)(const char *,
|
|
|
|
dissector_handle_t);
|
Add routines to:
register lists of "heuristic" dissectors, which are handed a
frame that may or may contain a payload for the protocol they
dissect, and that return FALSE if it's not or dissect the packet
and return TRUE if it is;
add a dissector to such a list;
go through such a list, calling each dissector until either a
dissector returns TRUE, in which case the routine returns TRUE,
or it runs out of entries in the list, in which case the routine
returns FALSE.
Have lists of heuristic dissectors for TCP and for COTP when used with
the Inactive Subset of CLNP, and add the GIOP and Yahoo Messenger
dissectors to the first list and the Sinec H1 dissector to the second
list.
Make the dissector name argument to "dissector_add()" and
"dissector_delete()" a "const char *" rarther than just a "char *".
Add "heur_dissector_add()", the routine to add a heuristic dissector to
a list of heuristic dissectors, to the set of routines we can export to
plugins through a table on platforms where dynamically-loaded code can't
call stuff in the main program, and initialize the element in the table
in question for "dissector_add()" (which we'd forgotten to do).
svn path=/trunk/; revision=1909
2000-05-05 09:32:36 +00:00
|
|
|
|
2001-01-09 06:32:10 +00:00
|
|
|
typedef void (*addr_heur_dissector_add)(const char *, heur_dissector_t, int);
|
2000-04-04 21:46:29 +00:00
|
|
|
|
2001-01-09 06:32:10 +00:00
|
|
|
typedef void (*addr_register_dissector)(const char *, dissector_t, int);
|
Add a mechanism by which a dissector can be registered by name, another
dissector can get a "handle" for that dissector by name and then call
that dissector through the handle.
This allows dissectors that can't be called through a port table or a
heuristic table to be called from other dissectors without directly
referring to the dissector function - dynamically-loaded modules, under
Windows, cannot directly call functions in the main program, and
non-plugin dissectors are in the main program and thus cannot be called
from plugin dissectors unless either
1) a pointer to the dissector is put in the Big Transfer Vector
or
2) some other mechanism for getting a pointer to the dissector
is provided.
This mechanism could also support registering old-style dissectors and
calling them from new-style dissectors without the new-style dissector
having to do the argument translation itself (I didn't add support for
registering old-style dissectors because I'd prefer to have people
tvbuffify their code if they have to register a dissector...).
It could also, in the future, perhaps support
disabling of protocols;
setting "pinfo->current_proto";
inside "call_dissector()" - and inside "{old_}dissector_try_port()" and
"{old_"dissector_try_heuristic()" - allowing a pile of stuff that
currently has to be done in every dissector be done by common code.
(I have some ideas about how to do this, by
having "proto_register_protocol()" take an abbreviation - of the
sort that would be put in, for example, "pinfo->current_proto" -
as an argument;
having the calls to register dissectors take an index returned
by "proto_register_protocol()" as an argument.
The abbreviation could be used elsewhere as well, e.g. in the "Decoding"
tab of the "Edit->Protocols" dialog box, and in a GUI for constructing
protocol filters. Watch this space.)
Make "dissect_sdp()" the first client of this mechanism; it's now static
to "packet-sdp.c", and all dissectors that call it - including the MGCP
plugin - now call it through a dissector handle fetched by
"find_dissector()". (Next step - see if Ethereal can now compile on
Windows as a result of this.)
svn path=/trunk/; revision=2647
2000-11-15 07:07:52 +00:00
|
|
|
typedef dissector_handle_t (*addr_find_dissector)(const char *);
|
2001-12-03 04:00:26 +00:00
|
|
|
typedef dissector_handle_t (*addr_create_dissector_handle)(dissector_t dissector,
|
|
|
|
int proto);
|
2002-02-27 21:26:37 +00:00
|
|
|
typedef int (*addr_call_dissector)(dissector_handle_t, tvbuff_t *,
|
Add a mechanism by which a dissector can be registered by name, another
dissector can get a "handle" for that dissector by name and then call
that dissector through the handle.
This allows dissectors that can't be called through a port table or a
heuristic table to be called from other dissectors without directly
referring to the dissector function - dynamically-loaded modules, under
Windows, cannot directly call functions in the main program, and
non-plugin dissectors are in the main program and thus cannot be called
from plugin dissectors unless either
1) a pointer to the dissector is put in the Big Transfer Vector
or
2) some other mechanism for getting a pointer to the dissector
is provided.
This mechanism could also support registering old-style dissectors and
calling them from new-style dissectors without the new-style dissector
having to do the argument translation itself (I didn't add support for
registering old-style dissectors because I'd prefer to have people
tvbuffify their code if they have to register a dissector...).
It could also, in the future, perhaps support
disabling of protocols;
setting "pinfo->current_proto";
inside "call_dissector()" - and inside "{old_}dissector_try_port()" and
"{old_"dissector_try_heuristic()" - allowing a pile of stuff that
currently has to be done in every dissector be done by common code.
(I have some ideas about how to do this, by
having "proto_register_protocol()" take an abbreviation - of the
sort that would be put in, for example, "pinfo->current_proto" -
as an argument;
having the calls to register dissectors take an index returned
by "proto_register_protocol()" as an argument.
The abbreviation could be used elsewhere as well, e.g. in the "Decoding"
tab of the "Edit->Protocols" dialog box, and in a GUI for constructing
protocol filters. Watch this space.)
Make "dissect_sdp()" the first client of this mechanism; it's now static
to "packet-sdp.c", and all dissectors that call it - including the MGCP
plugin - now call it through a dissector handle fetched by
"find_dissector()". (Next step - see if Ethereal can now compile on
Windows as a result of this.)
svn path=/trunk/; revision=2647
2000-11-15 07:07:52 +00:00
|
|
|
packet_info *, proto_tree *);
|
|
|
|
|
2002-05-05 00:34:12 +00:00
|
|
|
typedef void (*addr_tcp_dissect_pdus)(tvbuff_t *, packet_info *, proto_tree *,
|
2002-05-05 22:30:39 +00:00
|
|
|
gboolean, guint, guint (*)(tvbuff_t *, int),
|
2002-05-05 00:34:12 +00:00
|
|
|
void (*)(tvbuff_t *, packet_info *, proto_tree *));
|
|
|
|
|
Add a Makefile.nmake for the MGCP plugin, and update
"plugins/Makefile.nmake" to build that plugin.
Add to the table of routines callable from plugins
"old_dissector_add()", "old_dissect_data()", and
"proto_is_protocol_enabled()", so that the Gryphon dissector can build
on Windows.
Move the includes of "plugins/plugin_api.h" and "moduleinfo.h" before
all the other includes, except for "config.h", in "plugin-mgcp.c", to
match what the Gryphon dissector does; "plugins_api.h" must be included
before any of the routines whose names it #defines in order for the
plugin to build on Windows. (It still doesn't build on Windows, as
still more routines need to be added to the table of routines callable
from plugins, but tomorrow is another day. Making libethereal a DLL may
obviate the need for that table, *if* all the routines called from a
plugin are in libethereal, as I think routines in a DLL, even a
run-time-loaded DLL, can call routines from another DLL as long as those
routines are exported from the other DLL.)
svn path=/trunk/; revision=2622
2000-11-12 11:08:46 +00:00
|
|
|
typedef gboolean (*addr_proto_is_protocol_enabled)(int);
|
|
|
|
|
2000-11-13 10:13:26 +00:00
|
|
|
typedef int (*addr_proto_item_get_len)(proto_item*);
|
|
|
|
typedef void (*addr_proto_item_set_len)(proto_item*, gint);
|
|
|
|
typedef void (*addr_proto_item_set_text)(proto_item*, const char*, ...);
|
2001-08-29 00:51:10 +00:00
|
|
|
typedef void (*addr_proto_item_append_text)(proto_item*, const char*, ...);
|
2000-03-15 19:09:52 +00:00
|
|
|
typedef proto_tree* (*addr_proto_item_add_subtree)(proto_item*, gint);
|
2000-05-31 18:32:15 +00:00
|
|
|
typedef proto_item* (*addr_proto_tree_add_item)(proto_tree*, int, tvbuff_t*, gint, gint, gboolean);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_item_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, gboolean);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_protocol_format)(proto_tree*, int, tvbuff_t*, gint, gint, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_bytes)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_bytes_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_bytes_format)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*, const char*, ...);
|
|
|
|
|
2001-09-14 07:16:42 +00:00
|
|
|
typedef proto_item* (*addr_proto_tree_add_time)(proto_tree*, int, tvbuff_t*, gint, gint, nstime_t*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_time_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, nstime_t*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_time_format)(proto_tree*, int, tvbuff_t*, gint, gint, nstime_t*, const char*, ...);
|
2000-05-31 18:32:15 +00:00
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipxnet)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipxnet_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipxnet_format)(proto_tree*, int, tvbuff_t*, gint, gint, guint32, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipv4)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipv4_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipv4_format)(proto_tree*, int, tvbuff_t*, gint, gint, guint32, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipv6)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipv6_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ipv6_format)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ether)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ether_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_ether_format)(proto_tree*, int, tvbuff_t*, gint, gint, const guint8*, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_string)(proto_tree*, int, tvbuff_t*, gint, gint, const char*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_string_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, const char*);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_string_format)(proto_tree*, int, tvbuff_t*, gint, gint, const char*, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_boolean)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_boolean_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_boolean_format)(proto_tree*, int, tvbuff_t*, gint, gint, guint32, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_double)(proto_tree*, int, tvbuff_t*, gint, gint, double);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_double_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, double);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_double_format)(proto_tree*, int, tvbuff_t*, gint, gint, double, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_uint)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_uint_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, guint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_uint_format)(proto_tree*, int, tvbuff_t*, gint, gint, guint32, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_int)(proto_tree*, int, tvbuff_t*, gint, gint, gint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_int_hidden)(proto_tree*, int, tvbuff_t*, gint, gint, gint32);
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_int_format)(proto_tree*, int, tvbuff_t*, gint, gint, gint32, const char*, ...);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_text)(proto_tree*, tvbuff_t*, gint, gint, const char*, ...);
|
2000-03-15 19:09:52 +00:00
|
|
|
|
2000-11-13 08:00:12 +00:00
|
|
|
typedef tvbuff_t* (*addr_tvb_new_subset)(tvbuff_t*, gint, gint, gint);
|
|
|
|
|
2002-02-02 03:42:18 +00:00
|
|
|
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*);
|
2002-02-19 01:28:43 +00:00
|
|
|
typedef tvbuff_t* (*addr_tvb_new_real_data)(const guint8*, guint, gint);
|
2002-02-02 03:42:18 +00:00
|
|
|
|
2000-11-13 08:00:12 +00:00
|
|
|
typedef guint (*addr_tvb_length)(tvbuff_t*);
|
2001-07-22 10:12:11 +00:00
|
|
|
typedef gint (*addr_tvb_length_remaining)(tvbuff_t*, gint);
|
2000-11-13 08:00:12 +00:00
|
|
|
typedef gboolean (*addr_tvb_bytes_exist)(tvbuff_t*, gint, gint);
|
|
|
|
typedef gboolean (*addr_tvb_offset_exists)(tvbuff_t*, gint);
|
|
|
|
typedef guint (*addr_tvb_reported_length)(tvbuff_t*);
|
2001-07-22 10:12:11 +00:00
|
|
|
typedef gint (*addr_tvb_reported_length_remaining)(tvbuff_t*, gint);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
|
|
|
typedef guint8 (*addr_tvb_get_guint8)(tvbuff_t*, gint);
|
|
|
|
|
|
|
|
typedef guint16 (*addr_tvb_get_ntohs)(tvbuff_t*, gint);
|
|
|
|
typedef guint32 (*addr_tvb_get_ntoh24)(tvbuff_t*, gint);
|
|
|
|
typedef guint32 (*addr_tvb_get_ntohl)(tvbuff_t*, gint);
|
|
|
|
|
|
|
|
typedef guint16 (*addr_tvb_get_letohs)(tvbuff_t*, gint);
|
|
|
|
typedef guint32 (*addr_tvb_get_letoh24)(tvbuff_t*, gint);
|
|
|
|
typedef guint32 (*addr_tvb_get_letohl)(tvbuff_t*, gint);
|
|
|
|
|
|
|
|
typedef guint8* (*addr_tvb_memcpy)(tvbuff_t*, guint8* target, gint, gint);
|
|
|
|
typedef guint8* (*addr_tvb_memdup)(tvbuff_t*, gint, gint);
|
|
|
|
|
2001-04-02 09:55:34 +00:00
|
|
|
typedef const guint8* (*addr_tvb_get_ptr)(tvbuff_t*, gint, gint);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
2001-11-01 09:53:13 +00:00
|
|
|
typedef gint (*addr_tvb_find_guint8)(tvbuff_t*, gint, gint, guint8);
|
|
|
|
typedef gint (*addr_tvb_pbrk_guint8)(tvbuff_t *, gint, gint, guint8 *);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
|
|
|
typedef gint (*addr_tvb_strnlen)(tvbuff_t*, gint, guint);
|
|
|
|
|
2000-11-13 10:13:26 +00:00
|
|
|
typedef guint8 * (*addr_tvb_format_text)(tvbuff_t*, gint, gint);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
2000-11-13 10:13:26 +00:00
|
|
|
typedef gint (*addr_tvb_get_nstringz)(tvbuff_t*, gint, guint, guint8*);
|
|
|
|
typedef gint (*addr_tvb_get_nstringz0)(tvbuff_t*, gint, guint, guint8*);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
2002-07-17 06:55:29 +00:00
|
|
|
typedef gint (*addr_tvb_find_line_end)(tvbuff_t*, gint, int, gint *, gboolean);
|
2000-11-13 10:13:26 +00:00
|
|
|
typedef gint (*addr_tvb_find_line_end_unquoted)(tvbuff_t*, gint, int, gint *);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
2000-11-13 10:13:26 +00:00
|
|
|
typedef gint (*addr_tvb_strneql)(tvbuff_t*, gint, const guint8 *, gint);
|
|
|
|
typedef gint (*addr_tvb_strncaseeql)(tvbuff_t*, gint, const guint8 *, gint);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
2000-11-13 10:13:26 +00:00
|
|
|
typedef gchar *(*addr_tvb_bytes_to_str)(tvbuff_t*, gint, gint len);
|
|
|
|
|
2001-01-03 07:53:48 +00:00
|
|
|
typedef struct pref_module *(*addr_prefs_register_protocol)(int,
|
|
|
|
void (*)(void));
|
2000-11-18 21:41:40 +00:00
|
|
|
typedef void (*addr_prefs_register_uint_preference)(struct pref_module *,
|
|
|
|
const char *, const char *, const char *, guint, guint *);
|
|
|
|
typedef void (*addr_prefs_register_bool_preference)(struct pref_module *,
|
|
|
|
const char *, const char *, const char *, gboolean *);
|
|
|
|
typedef void (*addr_prefs_register_enum_preference)(struct pref_module *,
|
|
|
|
const char *, const char *, const char *, gint *, const enum_val_t *,
|
|
|
|
gboolean);
|
2001-09-04 01:05:41 +00:00
|
|
|
typedef void (*addr_prefs_register_string_preference)(struct pref_module *,
|
|
|
|
const char *, const char *, const char *, char**);
|
2000-11-13 08:00:12 +00:00
|
|
|
|
2001-07-22 10:12:11 +00:00
|
|
|
typedef void (*addr_register_giop_user)(giop_sub_dissector_t *, gchar *, int);
|
|
|
|
typedef gboolean (*addr_is_big_endian)(MessageHeader *);
|
2001-10-17 19:27:43 +00:00
|
|
|
typedef guint32 (*addr_get_CDR_encap_info)(tvbuff_t *, proto_tree *, gint *,
|
|
|
|
gboolean, guint32, gboolean *, guint32 *);
|
|
|
|
typedef void (*addr_get_CDR_any)(tvbuff_t *, proto_tree *, gint *,
|
|
|
|
gboolean, int, MessageHeader *);
|
|
|
|
typedef gboolean (*addr_get_CDR_boolean)(tvbuff_t *, int *);
|
|
|
|
typedef guint8 (*addr_get_CDR_char)(tvbuff_t *, int *);
|
|
|
|
typedef gdouble (*addr_get_CDR_double)(tvbuff_t *, int *, gboolean, int);
|
2001-07-22 10:12:11 +00:00
|
|
|
typedef guint32 (*addr_get_CDR_enum)(tvbuff_t *, int *, gboolean, int);
|
2001-10-17 19:27:43 +00:00
|
|
|
typedef void (*addr_get_CDR_fixed)(tvbuff_t *, gchar **, gint *, guint32,
|
|
|
|
gint32);
|
|
|
|
typedef gfloat (*addr_get_CDR_float)(tvbuff_t *, int *, gboolean, int);
|
|
|
|
typedef void (*addr_get_CDR_interface)(tvbuff_t *, packet_info *, proto_tree *,
|
|
|
|
int *, gboolean, int);
|
|
|
|
typedef gint32 (*addr_get_CDR_long)(tvbuff_t *, int *, gboolean, int);
|
2001-07-22 10:12:11 +00:00
|
|
|
typedef void (*addr_get_CDR_object)(tvbuff_t *, packet_info *, proto_tree *,
|
2001-10-17 19:27:43 +00:00
|
|
|
int *, gboolean, int);
|
|
|
|
typedef guint8 (*addr_get_CDR_octet)(tvbuff_t *, int *);
|
2002-05-16 02:43:53 +00:00
|
|
|
typedef void (*addr_get_CDR_octet_seq)(tvbuff_t *, gchar **, int *, guint32);
|
2001-10-17 19:27:43 +00:00
|
|
|
typedef gint16 (*addr_get_CDR_short)(tvbuff_t *, int *, gboolean, int);
|
|
|
|
typedef guint32 (*addr_get_CDR_string)(tvbuff_t *, gchar **, int *, gboolean,
|
|
|
|
int);
|
|
|
|
typedef guint32 (*addr_get_CDR_typeCode)(tvbuff_t *, proto_tree *, gint *,
|
|
|
|
gboolean, int, MessageHeader *);
|
|
|
|
typedef guint32 (*addr_get_CDR_ulong)(tvbuff_t *, int *, gboolean, int);
|
|
|
|
typedef guint16 (*addr_get_CDR_ushort)(tvbuff_t *, int *, gboolean, int);
|
2002-05-16 02:43:53 +00:00
|
|
|
typedef gint (*addr_get_CDR_wchar)(tvbuff_t *, gchar **, int *,
|
2001-10-17 19:27:43 +00:00
|
|
|
MessageHeader *);
|
|
|
|
typedef guint32 (*addr_get_CDR_wstring)(tvbuff_t *, gchar **, int *, gboolean,
|
|
|
|
int, MessageHeader *);
|
2001-07-22 10:12:11 +00:00
|
|
|
|
2002-05-13 21:18:26 +00:00
|
|
|
typedef int (*addr_is_tpkt)(tvbuff_t *, int);
|
2002-02-22 08:56:48 +00:00
|
|
|
typedef void (*addr_dissect_tpkt_encap)(tvbuff_t *, packet_info *,
|
|
|
|
proto_tree *, gboolean, dissector_handle_t);
|
|
|
|
|
Make a "tcp_dissect_pdus()" with the standard loop for a TCP segment,
extracting PDUs from it and possibly doing reassembly. Make the COPS,
DNS, DSI, Gryphon, and SCCP dissectors use it.
Add "set_actual_length()", "tcp_dissect_pdus()",
"decode_boolean_bitfield()", "decode_numeric_bitfield()", and
"decode_enumerated_bitfield()" to the list of routines available to
dissectors on platforms where routines in the main program aren't
available to dynamically-loaded code.
Declare routines in "to_str.h" as "extern"; as I remember, that's
necessary to allow the "decode_XXX_bitfield()" routines declared therein
to be made available to plugins as per the above.
Note that new exported routines should be added to the end of the table
if that's the only change being made to the table.
Create a new "plugin_api_decls.h" header file, used to declare both the
"p_" variables and the "p_" structure members in the routine-exporting
mechanism; this reduces the number of places you have to change to
change the list of exported routines.
svn path=/trunk/; revision=5394
2002-05-05 00:16:38 +00:00
|
|
|
typedef void (*addr_set_actual_length)(tvbuff_t *, guint);
|
|
|
|
|
|
|
|
typedef const char *(*addr_decode_boolean_bitfield)(guint32, guint32, int,
|
|
|
|
const char *, const char *);
|
|
|
|
typedef const char *(*addr_decode_numeric_bitfield)(guint32, guint32, int,
|
|
|
|
const char *);
|
|
|
|
typedef const char *(*addr_decode_enumerated_bitfield)(guint32, guint32, int,
|
|
|
|
const value_string *, const char *);
|
|
|
|
|
2002-07-12 22:52:43 +00:00
|
|
|
typedef dissector_table_t (*addr_register_dissector_table)(const char *, char *, ftenum_t ,int );
|
|
|
|
typedef void (*addr_except_throw)(long, long, const char *);
|
|
|
|
typedef gboolean (*addr_dissector_try_port)(dissector_table_t, guint32, tvbuff_t *, packet_info *, proto_tree *);
|
|
|
|
|
2002-08-14 19:18:20 +00:00
|
|
|
typedef void (*addr_conversation_add_proto_data)(conversation_t *, int, void *);
|
|
|
|
typedef void *(*addr_conversation_get_proto_data)(conversation_t *, int);
|
|
|
|
typedef void (*addr_conversation_delete_proto_data)(conversation_t *, int);
|
|
|
|
typedef void (*addr_p_add_proto_data)(frame_data *, int, void *);
|
|
|
|
typedef void *(*addr_p_get_proto_data)(frame_data *, int);
|
|
|
|
|
2002-11-14 18:54:53 +00:00
|
|
|
typedef gchar* (*addr_ip_to_str)(const guint8 *);
|
2002-11-28 22:13:52 +00:00
|
|
|
typedef char* (*addr_ip6_to_str)(const struct e_in6_addr *);
|
2002-11-14 18:54:53 +00:00
|
|
|
typedef gchar* (*addr_time_secs_to_str)(guint32);
|
|
|
|
typedef gchar* (*addr_time_msecs_to_str)(guint32);
|
|
|
|
typedef gchar* (*addr_abs_time_to_str)(nstime_t*);
|
|
|
|
|
|
|
|
typedef int (*addr_proto_get_id_by_filter_name)(gchar* filter_name);
|
|
|
|
typedef char *(*addr_proto_get_protocol_name)(int n);
|
|
|
|
typedef char *(*addr_proto_get_protocol_short_name)(int proto_id);
|
|
|
|
typedef char *(*addr_proto_get_protocol_filter_name)(int proto_id);
|
|
|
|
|
|
|
|
typedef void (*addr_prefs_register_obsolete_preference)(module_t *, const char *);
|
|
|
|
|
|
|
|
typedef void (*addr_add_new_data_source)(packet_info *, tvbuff_t *, char *);
|
|
|
|
|
|
|
|
typedef void (*addr_fragment_table_init)(GHashTable **);
|
|
|
|
typedef void (*addr_reassembled_table_init)(GHashTable **);
|
|
|
|
typedef fragment_data *(*addr_fragment_add)(tvbuff_t *, int, packet_info *, guint32,
|
|
|
|
GHashTable *, guint32, guint32, gboolean);
|
|
|
|
typedef fragment_data *(*addr_fragment_add_seq)(tvbuff_t *, int, packet_info *, guint32,
|
|
|
|
GHashTable *, guint32, guint32, gboolean);
|
|
|
|
typedef fragment_data *(*addr_fragment_add_seq_check)(tvbuff_t *, int, packet_info *, guint32 id,
|
|
|
|
GHashTable *, GHashTable *, guint32, guint32, gboolean);
|
|
|
|
typedef fragment_data *(*addr_fragment_add_seq_next)(tvbuff_t *, int, packet_info *, guint32,
|
|
|
|
GHashTable *, GHashTable *, guint32, gboolean);
|
|
|
|
typedef fragment_data *(*addr_fragment_get)(packet_info *, guint32, GHashTable *);
|
|
|
|
typedef void (*addr_fragment_set_tot_len)(packet_info *, guint32, GHashTable *, guint32);
|
|
|
|
typedef guint32 (*addr_fragment_get_tot_len)(packet_info *, guint32, GHashTable *);
|
|
|
|
typedef void (*addr_fragment_set_partial_reassembly)(packet_info *, guint32, GHashTable *);
|
|
|
|
typedef unsigned char *(*addr_fragment_delete)(packet_info *, guint32, GHashTable *);
|
|
|
|
typedef gboolean (*addr_show_fragment_tree)(fragment_data *, const fragment_items *, proto_tree *, packet_info *, tvbuff_t *);
|
|
|
|
typedef gboolean (*addr_show_fragment_seq_tree)(fragment_data *, const fragment_items *, proto_tree *, packet_info *, tvbuff_t *);
|
|
|
|
|
2003-03-06 09:01:47 +00:00
|
|
|
typedef int (*addr_register_tap)(char *);
|
|
|
|
typedef void (*addr_tap_queue_packet)(int, packet_info *, void *);
|
|
|
|
|
2003-04-24 21:15:13 +00:00
|
|
|
typedef void (*addr_asn1_open)(ASN1_SCK *, tvbuff_t *, int );
|
|
|
|
typedef void (*addr_asn1_close)(ASN1_SCK *, int *);
|
|
|
|
typedef int (*addr_asn1_octet_decode)(ASN1_SCK *, guchar *);
|
|
|
|
typedef int (*addr_asn1_tag_decode)(ASN1_SCK *, guint *);
|
|
|
|
typedef int (*addr_asn1_id_decode)(ASN1_SCK *, guint *, guint *, guint *);
|
|
|
|
typedef int (*addr_asn1_length_decode)(ASN1_SCK *, gboolean *, guint *);
|
|
|
|
typedef int (*addr_asn1_header_decode)(ASN1_SCK *, guint *, guint *, guint *,
|
|
|
|
gboolean *, guint *);
|
|
|
|
typedef int (*addr_asn1_eoc)(ASN1_SCK *, int );
|
|
|
|
typedef int (*addr_asn1_eoc_decode)(ASN1_SCK *, int );
|
|
|
|
typedef int (*addr_asn1_null_decode)(ASN1_SCK *, int );
|
|
|
|
typedef int (*addr_asn1_bool_decode)(ASN1_SCK *, int , gboolean *);
|
|
|
|
typedef int (*addr_asn1_int32_value_decode)(ASN1_SCK *, int , gint32 *);
|
|
|
|
typedef int (*addr_asn1_int32_decode)(ASN1_SCK *, gint32 *, guint *);
|
|
|
|
typedef int (*addr_asn1_uint32_value_decode)(ASN1_SCK *, int , guint *);
|
|
|
|
typedef int (*addr_asn1_uint32_decode)(ASN1_SCK *, guint32 *, guint *);
|
|
|
|
typedef int (*addr_asn1_bits_decode)(ASN1_SCK *, int , guchar **,
|
|
|
|
guint *, guchar *);
|
|
|
|
typedef int (*addr_asn1_string_value_decode)(ASN1_SCK *, int ,
|
|
|
|
guchar **);
|
|
|
|
typedef int (*addr_asn1_string_decode)(ASN1_SCK *, guchar **, guint *,
|
|
|
|
guint *, guint );
|
|
|
|
typedef int (*addr_asn1_octet_string_decode)(ASN1_SCK *, guchar **, guint *,
|
|
|
|
guint *);
|
|
|
|
typedef int (*addr_asn1_subid_decode)(ASN1_SCK *, subid_t *);
|
|
|
|
typedef int (*addr_asn1_oid_value_decode)(ASN1_SCK *, int , subid_t **,
|
|
|
|
guint *);
|
|
|
|
typedef int (*addr_asn1_oid_decode)( ASN1_SCK *, subid_t **, guint *, guint *);
|
|
|
|
typedef int (*addr_asn1_sequence_decode)( ASN1_SCK *, guint *, guint *);
|
|
|
|
|
|
|
|
typedef char *(*addr_asn1_err_to_str)(int );
|
|
|
|
|
2003-04-29 21:27:19 +00:00
|
|
|
typedef void (*addr_proto_item_set_end)(proto_item*, tvbuff_t *, gint);
|
|
|
|
|
|
|
|
typedef proto_item* (*addr_proto_tree_add_none_format)(proto_tree*, int, tvbuff_t*, gint, gint, const char*, ...);
|
|
|
|
|
2003-04-30 23:40:43 +00:00
|
|
|
typedef int (*addr_except_init)(void);
|
|
|
|
typedef void (*addr_except_deinit)(void);
|
|
|
|
typedef void (*addr_except_rethrow)(except_t *);
|
|
|
|
typedef void (*addr_except_throwd)(long, long, const char *, void *);
|
|
|
|
typedef void (*addr_except_throwf)(long, long, const char *, ...);
|
|
|
|
typedef void (*(*addr_except_unhandled_catcher)(void (*)(except_t *)))(except_t *);
|
|
|
|
typedef void *(*addr_except_take_data)(except_t *);
|
|
|
|
typedef void (*addr_except_set_allocator)(void *(*)(size_t), void (*)(void *));
|
|
|
|
typedef void *(*addr_except_alloc)(size_t);
|
|
|
|
typedef void (*addr_except_free)(void *);
|
2003-05-01 21:10:43 +00:00
|
|
|
typedef struct except_stacknode *(*addr_except_pop)(void);
|
|
|
|
typedef void (*addr_except_setup_try)(struct except_stacknode *, struct except_catch *, const except_id_t [], size_t);
|
2003-04-30 19:19:15 +00:00
|
|
|
|
2003-06-03 02:32:56 +00:00
|
|
|
typedef void (*addr_col_set_fence)(column_info*, gint);
|
|
|
|
|
2003-06-12 10:10:39 +00:00
|
|
|
typedef gint (*addr_tvb_get_string)(tvbuff_t*, gint, gint);
|
|
|
|
typedef gint (*addr_tvb_get_stringz)(tvbuff_t*, gint, gint*);
|
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
typedef struct {
|
2001-11-04 03:37:29 +00:00
|
|
|
|
Make a "tcp_dissect_pdus()" with the standard loop for a TCP segment,
extracting PDUs from it and possibly doing reassembly. Make the COPS,
DNS, DSI, Gryphon, and SCCP dissectors use it.
Add "set_actual_length()", "tcp_dissect_pdus()",
"decode_boolean_bitfield()", "decode_numeric_bitfield()", and
"decode_enumerated_bitfield()" to the list of routines available to
dissectors on platforms where routines in the main program aren't
available to dynamically-loaded code.
Declare routines in "to_str.h" as "extern"; as I remember, that's
necessary to allow the "decode_XXX_bitfield()" routines declared therein
to be made available to plugins as per the above.
Note that new exported routines should be added to the end of the table
if that's the only change being made to the table.
Create a new "plugin_api_decls.h" header file, used to declare both the
"p_" variables and the "p_" structure members in the routine-exporting
mechanism; this reduces the number of places you have to change to
change the list of exported routines.
svn path=/trunk/; revision=5394
2002-05-05 00:16:38 +00:00
|
|
|
#include "plugin_api_decls.h"
|
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
} plugin_address_table_t;
|
|
|
|
|
2001-11-04 03:16:47 +00:00
|
|
|
#else /* ! PLUGINS_NEED_ADDRESS_TABLE */
|
2000-03-15 19:09:52 +00:00
|
|
|
|
|
|
|
typedef void plugin_address_table_t;
|
|
|
|
|
2002-02-02 03:42:18 +00:00
|
|
|
#endif /* PLUGINS_NEED_ADDRESS_TABLE */
|
|
|
|
|
|
|
|
#endif /* PLUGIN_TABLE_H */
|