Hi,
Here is the status of my work on plugins. It is based on the TODO list
in my first post :
- the "name" symbol provided by the plugin must match the file name of
the plugin (so the symbol is not very useful, I may remove it in the
future) : done (symbol removed).
- I added a "version" string but I don't use it yet (it is displayed in
the dialog) : it is now used do identify dupplicate plugins in multiple
directories. A plugin is identified by its name and version.
- the "Enable" button doesn't refresh the packet list
- the "Details" button does nothing. It should allow to change the
"filter_string" used by a plugin : I replaced it with a "Filter" button
which allows to change the "filter_string".
- there is no way to disable a plugin
- if the same plugin is found in several directories, it will be listed
several times : not any more
- plugins should use ETT_NONE when creating subtrees (maybe we could
dynamically allocate ETT_xxx values) : done thanks to Guy
- I only put the hooks for calling the plugins in dissect_tcp : TODO
- plugins are only enabled on platforms which support dlopen. I don't
know what could be done on other platforms : TODO (add support for
guile/perl/python/... plugins)
So the new TODO list is :
- add hooks for plugins in more dissectors
- add support for other types of plugins. I looked at guile
documentation and found that it allows to use other scripting languages
like perl and python. Embedding guile seems to be a good solution but I
couldn't find much documentation about this. Does someone have
information or pointers ?
- enable/disable plugins : I wonder if it is really useful. If we want
to be able to disable plugins, we'll have to be able to unregister
protocol fields that were registered when the plugin was enabled. This
also means that we have to remove the filters which use these fields in
the new Combo. We could simply enable all plugins found in the various
directories when ethereal is started, unless they have been explicitly
disabled in a config file. Alternatively, we can disable the plugin
dissector, but keep the registered protocol fields. This means that we
will be able to use display filters with these fields but the protocol
won't be dissected. What do you think ?
Olivier
--
Barometer, n.:
An ingenious instrument which indicates what kind of weather we
are having.
-- Ambrose Bierce, "The Devil's Dictionary"