2000-02-07 17:08:27 +00:00
|
|
|
/* plugin_api.h
|
2000-02-07 17:23:53 +00:00
|
|
|
* Routines for Ethereal plugins.
|
|
|
|
*
|
2002-11-14 18:54:53 +00:00
|
|
|
* $Id: plugin_api.h,v 1.44 2002/11/14 18:54:53 guy Exp $
|
2000-02-07 17:23:53 +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-02-07 17:23:53 +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-02-07 17:23:53 +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-02-07 17:23:53 +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.
|
2000-02-07 17:08:27 +00:00
|
|
|
*/
|
|
|
|
|
2002-02-02 03:42:18 +00:00
|
|
|
#ifndef PLUGIN_API_H
|
|
|
|
#define PLUGIN_API_H
|
|
|
|
|
2000-02-07 17:08:27 +00:00
|
|
|
#ifdef PLUGINS_NEED_ADDRESS_TABLE
|
2000-05-31 18:32:15 +00:00
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
/* Some OSes (Win32) have DLLs that cannot reference symbols in the parent
|
|
|
|
executable, so the executable needs to provide a collection of pointers
|
2001-11-04 03:37:29 +00:00
|
|
|
to global variables and functions for the DLL plugin to use. */
|
|
|
|
|
|
|
|
/* #defines for those functions that are called through pointers,
|
|
|
|
and global variables that are referred to through pointers.
|
|
|
|
|
|
|
|
#defined in this fashion so that the declaration of the functions
|
|
|
|
and variables, from the system header files, turn into declarations
|
|
|
|
of pointers to functions and variables, and the references to them in
|
|
|
|
plugins, in the plugins, turn into references through the pointers. */
|
2000-03-15 19:09:52 +00:00
|
|
|
#define check_col (*p_check_col)
|
2001-01-28 20:26:20 +00:00
|
|
|
#define col_clear (*p_col_clear)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define col_add_fstr (*p_col_add_fstr)
|
|
|
|
#define col_append_fstr (*p_col_append_fstr)
|
2002-01-29 08:44:53 +00:00
|
|
|
#define col_prepend_fstr (*p_col_prepend_fstr)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define col_add_str (*p_col_add_str)
|
|
|
|
#define col_append_str (*p_col_append_str)
|
2001-04-25 08:31:32 +00:00
|
|
|
#define col_set_str (*p_col_set_str)
|
2000-03-15 19:09:52 +00:00
|
|
|
|
2001-11-04 03:37:29 +00:00
|
|
|
#define register_init_routine (*p_register_init_routine)
|
2002-01-05 04:12:17 +00:00
|
|
|
#define register_postseq_cleanup_routine (*p_register_postseq_cleanup_routine)
|
2002-02-20 08:24:52 +00:00
|
|
|
|
2001-11-04 03:37:29 +00:00
|
|
|
#define match_strval (*p_match_strval)
|
|
|
|
#define val_to_str (*p_val_to_str)
|
|
|
|
|
2002-02-20 08:24:52 +00:00
|
|
|
#define conversation_new (*p_conversation_new)
|
|
|
|
#define find_conversation (*p_find_conversation)
|
|
|
|
#define conversation_set_dissector (*p_conversation_set_dissector)
|
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_register_protocol (*p_proto_register_protocol)
|
|
|
|
#define proto_register_field_array (*p_proto_register_field_array)
|
|
|
|
#define proto_register_subtree_array (*p_proto_register_subtree_array)
|
|
|
|
|
2000-04-04 21:46:29 +00:00
|
|
|
#define dissector_add (*p_dissector_add)
|
2000-11-13 10:13:26 +00:00
|
|
|
#define dissector_delete (*p_dissector_delete)
|
2001-12-03 10:00:23 +00:00
|
|
|
#define dissector_add_handle (*p_dissector_add_handle)
|
2000-04-04 21:46:29 +00:00
|
|
|
|
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
|
|
|
#define heur_dissector_add (*p_heur_dissector_add)
|
|
|
|
|
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
|
|
|
#define register_dissector (*p_register_dissector)
|
|
|
|
#define find_dissector (*p_find_dissector)
|
2001-12-03 04:00:26 +00:00
|
|
|
#define create_dissector_handle (*p_create_dissector_handle)
|
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
|
|
|
#define call_dissector (*p_call_dissector)
|
|
|
|
|
2002-05-05 00:34:12 +00:00
|
|
|
#define tcp_dissect_pdus (*p_tcp_dissect_pdus)
|
|
|
|
|
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
|
|
|
#define proto_is_protocol_enabled (*p_proto_is_protocol_enabled)
|
|
|
|
|
2000-11-13 10:13:26 +00:00
|
|
|
#define proto_item_get_len (*p_proto_item_get_len)
|
|
|
|
#define proto_item_set_len (*p_proto_item_set_len)
|
|
|
|
#define proto_item_set_text (*p_proto_item_set_text)
|
2001-08-29 00:51:10 +00:00
|
|
|
#define proto_item_append_text (*p_proto_item_append_text)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_item_add_subtree (*p_proto_item_add_subtree)
|
|
|
|
#define proto_tree_add_item (*p_proto_tree_add_item)
|
|
|
|
#define proto_tree_add_item_hidden (*p_proto_tree_add_item_hidden)
|
|
|
|
#define proto_tree_add_protocol_format (*p_proto_tree_add_protocol_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_bytes (*p_proto_tree_add_bytes)
|
|
|
|
#define proto_tree_add_bytes_hidden (*p_proto_tree_add_bytes_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_bytes_format (*p_proto_tree_add_bytes_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_time (*p_proto_tree_add_time)
|
|
|
|
#define proto_tree_add_time_hidden (*p_proto_tree_add_time_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_time_format (*p_proto_tree_add_time_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_ipxnet (*p_proto_tree_add_ipxnet)
|
|
|
|
#define proto_tree_add_ipxnet_hidden (*p_proto_tree_add_ipxnet_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_ipxnet_format (*p_proto_tree_add_ipxnet_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_ipv4 (*p_proto_tree_add_ipv4)
|
|
|
|
#define proto_tree_add_ipv4_hidden (*p_proto_tree_add_ipv4_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_ipv4_format (*p_proto_tree_add_ipv4_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_ipv6 (*p_proto_tree_add_ipv6)
|
|
|
|
#define proto_tree_add_ipv6_hidden (*p_proto_tree_add_ipv6_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_ipv6_format (*p_proto_tree_add_ipv6_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_ether (*p_proto_tree_add_ether)
|
|
|
|
#define proto_tree_add_ether_hidden (*p_proto_tree_add_ether_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_ether_format (*p_proto_tree_add_ether_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_string (*p_proto_tree_add_string)
|
|
|
|
#define proto_tree_add_string_hidden (*p_proto_tree_add_string_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_string_format (*p_proto_tree_add_string_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_boolean (*p_proto_tree_add_boolean)
|
|
|
|
#define proto_tree_add_boolean_hidden (*p_proto_tree_add_boolean_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_boolean_format (*p_proto_tree_add_boolean_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_double (*p_proto_tree_add_double)
|
|
|
|
#define proto_tree_add_double_hidden (*p_proto_tree_add_double_hidden)
|
|
|
|
#define proto_tree_add_double_format (*p_proto_tree_add_double_format)
|
|
|
|
#define proto_tree_add_uint (*p_proto_tree_add_uint)
|
|
|
|
#define proto_tree_add_uint_hidden (*p_proto_tree_add_uint_hidden)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_uint_format (*p_proto_tree_add_uint_format)
|
2000-05-31 18:32:15 +00:00
|
|
|
#define proto_tree_add_int (*p_proto_tree_add_int)
|
|
|
|
#define proto_tree_add_int_hidden (*p_proto_tree_add_int_hidden)
|
|
|
|
#define proto_tree_add_int_format (*p_proto_tree_add_int_format)
|
2000-03-15 19:09:52 +00:00
|
|
|
#define proto_tree_add_text (*p_proto_tree_add_text)
|
2000-02-07 17:08:27 +00:00
|
|
|
|
2000-11-13 08:00:12 +00:00
|
|
|
#define tvb_new_subset (*p_tvb_new_subset)
|
|
|
|
|
2002-02-02 03:42:18 +00:00
|
|
|
#define tvb_set_free_cb (*p_tvb_set_free_cb)
|
|
|
|
#define tvb_set_child_real_data_tvbuff (*p_tvb_set_child_real_data_tvbuff)
|
|
|
|
#define tvb_new_real_data (*p_tvb_new_real_data)
|
|
|
|
|
2000-11-13 08:00:12 +00:00
|
|
|
#define tvb_length (*p_tvb_length)
|
|
|
|
#define tvb_length_remaining (*p_tvb_length_remaining)
|
|
|
|
#define tvb_bytes_exist (*p_tvb_bytes_exist)
|
|
|
|
#define tvb_offset_exists (*p_tvb_offset_exists)
|
|
|
|
#define tvb_reported_length (*p_tvb_reported_length)
|
2001-04-25 08:31:32 +00:00
|
|
|
#define tvb_reported_length_remaining (*p_tvb_reported_length_remaining)
|
2000-11-13 08:00:12 +00:00
|
|
|
|
|
|
|
#define tvb_get_guint8 (*p_tvb_get_guint8)
|
|
|
|
|
|
|
|
#define tvb_get_ntohs (*p_tvb_get_ntohs)
|
|
|
|
#define tvb_get_ntoh24 (*p_tvb_get_ntoh24)
|
|
|
|
#define tvb_get_ntohl (*p_tvb_get_ntohl)
|
|
|
|
|
|
|
|
#define tvb_get_letohs (*p_tvb_get_letohs)
|
|
|
|
#define tvb_get_letoh24 (*p_tvb_get_letoh24)
|
|
|
|
#define tvb_get_letohl (*p_tvb_get_letohl)
|
|
|
|
|
|
|
|
#define tvb_memcpy (*p_tvb_memcpy)
|
|
|
|
#define tvb_memdup (*p_tvb_memdup)
|
|
|
|
|
|
|
|
#define tvb_get_ptr (*p_tvb_get_ptr)
|
|
|
|
|
|
|
|
#define tvb_find_guint8 (*p_tvb_find_guint8)
|
|
|
|
#define tvb_pbrk_guint8 (*p_tvb_pbrk_guint8)
|
|
|
|
|
|
|
|
#define tvb_strnlen (*p_tvb_strnlen)
|
|
|
|
|
|
|
|
#define tvb_format_text (*p_tvb_format_text)
|
|
|
|
|
|
|
|
#define tvb_get_nstringz (*p_tvb_get_nstringz)
|
|
|
|
#define tvb_get_nstringz0 (*p_tvb_get_nstringz0)
|
|
|
|
|
|
|
|
#define tvb_find_line_end (*p_tvb_find_line_end)
|
|
|
|
#define tvb_find_line_end_unquoted (*p_tvb_find_line_end_unquoted)
|
|
|
|
|
|
|
|
#define tvb_strneql (*p_tvb_strneql)
|
|
|
|
#define tvb_strncaseeql (*p_tvb_strncaseeql)
|
|
|
|
|
|
|
|
#define tvb_bytes_to_str (*p_tvb_bytes_to_str)
|
|
|
|
|
2001-01-03 07:53:48 +00:00
|
|
|
#define prefs_register_protocol (*p_prefs_register_protocol)
|
2000-11-13 10:13:26 +00:00
|
|
|
#define prefs_register_uint_preference (*p_prefs_register_uint_preference)
|
|
|
|
#define prefs_register_bool_preference (*p_prefs_register_bool_preference)
|
|
|
|
#define prefs_register_enum_preference (*p_prefs_register_enum_preference)
|
2001-09-04 01:05:41 +00:00
|
|
|
#define prefs_register_string_preference (*p_prefs_register_string_preference)
|
2000-11-13 10:13:26 +00:00
|
|
|
|
2001-07-22 10:12:11 +00:00
|
|
|
#define register_giop_user (*p_register_giop_user)
|
|
|
|
#define is_big_endian (*p_is_big_endian)
|
2001-10-17 19:27:43 +00:00
|
|
|
#define get_CDR_encap_info (*p_get_CDR_encap_info)
|
|
|
|
|
|
|
|
#define get_CDR_any (*p_get_CDR_any)
|
|
|
|
#define get_CDR_boolean (*p_get_CDR_boolean)
|
|
|
|
#define get_CDR_char (*p_get_CDR_char)
|
|
|
|
#define get_CDR_double (*p_get_CDR_double)
|
2001-07-22 10:12:11 +00:00
|
|
|
#define get_CDR_enum (*p_get_CDR_enum)
|
2001-10-17 19:27:43 +00:00
|
|
|
#define get_CDR_fixed (*p_get_CDR_fixed)
|
|
|
|
#define get_CDR_float (*p_get_CDR_float)
|
|
|
|
#define get_CDR_interface (*p_get_CDR_interface)
|
|
|
|
#define get_CDR_long (*p_get_CDR_long)
|
2001-07-22 10:12:11 +00:00
|
|
|
#define get_CDR_object (*p_get_CDR_object)
|
2001-10-17 19:27:43 +00:00
|
|
|
#define get_CDR_octet (*p_get_CDR_octet)
|
|
|
|
#define get_CDR_octet_seq (*p_get_CDR_octet_seq)
|
|
|
|
#define get_CDR_short (*p_get_CDR_short)
|
|
|
|
#define get_CDR_string (*p_get_CDR_string)
|
|
|
|
#define get_CDR_typeCode (*p_get_CDR_typeCode)
|
|
|
|
#define get_CDR_ulong (*p_get_CDR_ulong)
|
|
|
|
#define get_CDR_ushort (*p_get_CDR_ushort)
|
|
|
|
#define get_CDR_wchar (*p_get_CDR_wchar)
|
|
|
|
#define get_CDR_wstring (*p_get_CDR_wstring)
|
|
|
|
|
2002-02-22 08:56:48 +00:00
|
|
|
#define is_tpkt (*p_is_tpkt)
|
|
|
|
#define dissect_tpkt_encap (*p_dissect_tpkt_encap)
|
|
|
|
|
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
|
|
|
#define set_actual_length (*p_set_actual_length)
|
|
|
|
|
|
|
|
#define decode_boolean_bitfield (*p_decode_boolean_bitfield)
|
|
|
|
#define decode_numeric_bitfield (*p_decode_numeric_bitfield)
|
|
|
|
#define decode_enumerated_bitfield (*p_decode_enumerated_bitfield)
|
2002-07-12 22:52:43 +00:00
|
|
|
#define register_dissector_table (*p_register_dissector_table)
|
|
|
|
#define except_throw (*p_except_throw)
|
|
|
|
#define dissector_try_port (*p_dissector_try_port)
|
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
|
|
|
|
2002-08-14 19:18:20 +00:00
|
|
|
#define conversation_add_proto_data (*p_conversation_add_proto_data)
|
|
|
|
#define conversation_get_proto_data (*p_conversation_get_proto_data)
|
|
|
|
#define conversation_delete_proto_data (*p_conversation_delete_proto_data)
|
|
|
|
#define p_add_proto_data (*p_p_add_proto_data)
|
|
|
|
#define p_get_proto_data (*p_p_get_proto_data)
|
|
|
|
|
2002-11-14 18:54:53 +00:00
|
|
|
#define ip_to_str (*p_ip_to_str)
|
|
|
|
#define ip6_to_str (*p_ip6_to_str)
|
|
|
|
#define time_secs_to_str (*p_time_secs_to_str)
|
|
|
|
#define time_msecs_to_str (*p_time_msecs_to_str)
|
|
|
|
#define abs_time_to_str (*p_abs_time_to_str)
|
|
|
|
|
|
|
|
#define proto_get_id_by_filter_name (*p_proto_get_id_by_filter_name)
|
|
|
|
#define proto_get_protocol_name (*p_proto_get_protocol_name)
|
|
|
|
#define proto_get_protocol_short_name (*p_proto_get_protocol_short_name)
|
|
|
|
#define proto_get_protocol_filter_name (*p_proto_get_protocol_filter_name)
|
|
|
|
|
|
|
|
#define prefs_register_obsolete_preference (*p_prefs_register_obsolete_preference)
|
|
|
|
|
|
|
|
#define add_new_data_source (*p_add_new_data_source)
|
|
|
|
|
|
|
|
#define fragment_table_init (*p_fragment_table_init)
|
|
|
|
#define reassembled_table_init (*p_reassembled_table_init)
|
|
|
|
#define fragment_add (*p_fragment_add)
|
|
|
|
#define fragment_add_seq (*p_fragment_add_seq)
|
|
|
|
#define fragment_add_seq_check (*p_fragment_add_seq_check)
|
|
|
|
#define fragment_add_seq_next (*p_fragment_add_seq_next)
|
|
|
|
#define fragment_get (*p_fragment_get)
|
|
|
|
#define fragment_set_tot_len (*p_fragment_set_tot_len)
|
|
|
|
#define fragment_get_tot_len (*p_fragment_get_tot_len)
|
|
|
|
#define fragment_set_partial_reassembly (*p_fragment_set_partial_reassembly)
|
|
|
|
#define fragment_delete (*p_fragment_delete)
|
|
|
|
#define show_fragment_tree (*p_show_fragment_tree)
|
|
|
|
#define show_fragment_seq_tree (*p_show_fragment_seq_tree)
|
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
#endif
|
2000-02-07 17:08:27 +00:00
|
|
|
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
|
|
|
#include <epan/conversation.h>
|
2000-11-13 10:13:26 +00:00
|
|
|
#include "prefs.h"
|
2002-11-14 18:54:53 +00:00
|
|
|
#include "reassemble.h"
|
2001-07-22 10:12:11 +00:00
|
|
|
#include "packet-giop.h"
|
2002-02-22 08:56:48 +00:00
|
|
|
#include "packet-tpkt.h"
|
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 "packet-tcp.h"
|
2000-02-07 17:08:27 +00:00
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
#include "plugin_table.h"
|
2000-02-07 17:08:27 +00:00
|
|
|
|
2000-03-15 19:09:52 +00:00
|
|
|
#ifdef PLUGINS_NEED_ADDRESS_TABLE
|
2000-02-07 17:08:27 +00:00
|
|
|
/* The parent executable will send us the pointer to a filled in
|
2000-03-15 19:09:52 +00:00
|
|
|
plugin_address_table_t struct, and we copy the pointers from
|
|
|
|
that table so that we can use functions from the parent executable. */
|
2000-02-07 17:08:27 +00:00
|
|
|
void plugin_address_table_init(plugin_address_table_t*);
|
|
|
|
#else
|
2000-03-15 19:09:52 +00:00
|
|
|
#define plugin_address_table_init(x) ;
|
2000-02-07 17:08:27 +00:00
|
|
|
#endif
|
2002-02-02 03:42:18 +00:00
|
|
|
|
|
|
|
#endif /* PLUGIN_API_H */
|