On Thu, Mar 06, 2003 at 05:55:35PM -0500, Jason House wrote:
> Just another thought...
> Plugins can be used by both ethereal and tethereal?
Currently, the only plugins we support are plugin dissectors, so they
can safely be used both by Ethereal and Tethereal.
Tap plugins are trickier, because they'd display their output somehow.
If the tap plugin just produces a table, as the "tap-rpcprogs.c" tap
does, it might be possible to have an API by which a tap can register a
table - the Tethereal implementation would print the table after the
file has been read, and the Ethereal implementation would pop up a
window showing the table and update the table whenever it's told that
new table values are available (Ethereal taps appear to support
incremental updating - I assume this is for "Update list of packets in
real time" captures, as incremental updating while reading in a file
from a completed capture doesn't seem all that useful).
Similar things could perhaps be done for graphs - Ethereal's
implementation could draw a graph using the GUI toolkit, while the
Tethereal implementation could, for example, put out numbers to be piped
to a program that draws the graphs.
The hard part would be taps that have a user input; those taps would be
usable only by Ethereal, and we'd have to have some mechanism by which
the plugin-loading code can recognize them and not load them if told by
their caller that there's no GUI code. (That also becomes tricky if
there's more than one GUI toolkit we support - the plugin might also
have to specify which toolkit is being used, or we might have to provide
a "virtual toolkit" of some sort.)
> If so, some caution might be required with adding a callback like I
> proposed.
The callback would have separate Ethereal and Tethereal implementations.
The Ethereal implementation would add the item to the menu; the
Tethereal implementation would do nothing.