Ethereal-dev: Re: [Ethereal-dev] General plugins

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

From: Pavel Mores <pvl@xxxxx>
Date: Sat, 14 Jul 2001 14:31:36 +0200
On Fri, Jul 13, 2001 at 11:10:53AM -0700, Guy Harris wrote:

> > Has there been any discussion of implementing a general (non-dissector)
> > plug-in framework for ethereal?
> 
> I'm not sure a "general" framework, in the sense of being able to plug
> code into arbitrary places in Ethereal, would be possible (as it's *too*
> general, and every line of code would have to check to see if a plugin
> were present - and then there'd be the issue of what the calling
> sequence for the plugin is...); however, if particular points into which
> functionality could be plugged were identified, that could be done.

Why on earth should every line of code check for plugins? Have you ever
seen a program with plugin infrastructure implemented this way? I doubt
so because no such nonsense is necessary. If you allow for a single
callback point (upon a new packet arrival) you serve 80% of needs right
away. 90% of plugins would treat global data in read-only manner so the
calling sequence is not a major problem, too. Adding support for this
doesn't compromise architecture of ethereal in any way and basically,
it's a weekend project. The rest of issues can be solved too, if you
*want* to solve them in the first place.

	pvl