ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Plugin API

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 29 Oct 2001 00:57:10 -0800
On Mon, Oct 29, 2001 at 12:47:25AM -0800, Guy Harris wrote:
> Because the current version of Ethereal doesn't have those routines in
> the table of routines that can be called from plugins.

Actually, it does.

The "p_" variables are declared by including the header file that
declares the corresponding function, but doing so *AFTER* including
"plugin_api.h".

"plugin_api.h" defines "get_CDR_any", for example, as
"(*p_get_CDR_any)"; if you include "plugin_api.h" *before* including
"packet-giop.h", the lines

void get_CDR_any(tvbuff_t *tvb, proto_tree *tree, gint *offset, gboolean stream_is_big_endian,
		 int boundary, MessageHeader * header );

in "packet_giop.h" are changed by the #define of "get_CDR_any" to be

void (*p_get_CDR_any)(tvbuff_t *tvb, proto_tree *tree, gint *offset, gboolean stream_is_big_endian,
		 int boundary, MessageHeader * header );