Ethereal-dev: Re: [Ethereal-dev] Patch to plugin_api_list.c

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 22 Jan 2004 16:40:21 -0800

On Jan 21, 2004, at 11:43 AM, Pierre JUHEN wrote:

The declaration of find_protocol_by_id was forgotten in plugins/plugin_api_list.c in version 0.10.0, if this function is used in the plugin.

Not forgotten, just not included. No plugins that come with Ethereal use it, and nobody'd sent us a patch until now, so presumably either nobody'd created a plugin that used it until now or nobody who did had bothered to send us a patch.

How are you using it in your plugin? (Note that it does a linear search of a long list, so you'd want to call it in your register routine and save the result.) Note that if a dissector is called through a dissector handle or protocol table, you don't need to call it in order to see whether that dissector's protocol is enabled - that's done for you by the code that calls through handles and dissector tables.