Am 17.03.2006, 16:22 Uhr, schrieb Jaap Keuter <jaap.keuter@xxxxxxxxx>:
Hi,
Refer to the comments in epan/prefs.c in the neighborhood of the
g_assert's for the reason why.
Good to know. There is no comment at the asserting code in
proto_register_protocol().
I guess you mean the comments in prefs_register_module_or_subtree(), but
they are for preference module names and not for protocol filter names.
However the comments there still don't give a sufficient answer for both
cases. Why are capital letters not allowed in protocol filter and
preference module names, although they are allowed in names in usual
display filter fields like "sip.Status-Code"?
I guess this was some legacy requirement. Quotation from prefs.c:
"the [module] name can be used on the command line, and shouldn't require
quoting, shifting, etc."
So do we want to have display filter names and preference module names
case insensitive and if this is true, do we want to avoid shifting?
BTW: shouldn't these be DISSECTOR_ASSERT(), or does that only hold for
the
dissection code itself.
Yes, you can use DISSECTOR_ASSERT() only during packet dissection as this
will also stop the dissection of the current packet. You can't use it to
skip registration for a protocol.
But your implicit question is good. Should we just skip the registration
for a protocol instead of aborting ethereal?
Regards,
Lars
On Fri, 17 Mar 2006, Lars Roland wrote:
Am 17.03.2006, 14:03 Uhr, schrieb Grossert, Alexander
<Alexander.Grossert@xxxxxxxxxxx>:
> Sure. It was just there because the plugin_register is of course only
> called, when the code is compiled as a dll. In case of a built-in
> dissector the test proto_register_xxx is called directly.
>
> By the way....PROBLEM SOLVED!
>
> I rebuilt the dev sources of ethereal completely and added the plugin
> there, instead of the standard distribution. When I started it, a so
> called "debug console" popped up to tell me that the protocol filter
> name (it is described by parameter abbreviation in funtion
> proto_register_protocol) contained "illegal" characters. In my case it
> was just a capital character.
>
> Well, who would expect a capital letter in the protocol abbreviation
to
> crash the registration of the register process?
>
> Does someone have an idea why it has been implemented that way and why
> registering chrashes due to this character?
>
I really don't know why capital letters aren't allowed in protocol
filter
names. There are display filter names with capital letters, e.g.
"sip.Status-Code".
The crash without debug message on Windows was a bug that was fixed
after
0.10.14 release.
Anyhow you should not use plugins with any not corresponding ethereal
binary.
If you wan't to use a plugin with official 0.10.14 binaries, you should
also use the official ethereal sources for this version to build the
plugin. The API and the ABI of libethereal is not stable.
Regards,
Lars
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev