Ethereal-dev: Re: AW: AW: [Ethereal-dev] Plugin naming conventions?

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

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Fri, 17 Mar 2006 10:26:31 -0600
Lars Roland wrote:
>> 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".

It's because README.developer says so:

"PROTOABBREV     A name for the protocol for use in filter expressions;
                 it should contain only lower-case letters, digits, and
                 hyphens."

I added code to proto.c to enforce this a while back in order to
prettify the display filter reference:

  http://www.ethereal.com/docs/dfref/

As I recall, underscores had to be added to the "allowed character" list
because a lot of protocols were using it.

README.developer also hints that each display filter field should begin
with a valid protocol name:

    /* Setup list of header fields  See Section 1.6.1 for details*/
            static hf_register_info hf[] = {
                    { &hf_PROTOABBREV_FIELDABBREV,
                            { "FIELDNAME",
===>                          "PROTOABBREV.FIELDABBREV",
                              FIELDTYPE, FIELDBASE, FIELDCONVERT,
                              BITMASK, "FIELDDESCR", HFILL }
                    },
            };

We don't currently enforce this, at least according to the display
filter reference:

    http://www.ethereal.com/docs/dfref/3/3comxns.html
    http://www.ethereal.com/docs/dfref/i/ipmi.html
    http://www.ethereal.com/docs/dfref/m/map_dialoguepdu.html

Should we?