Ethereal-dev: Re: [ethereal-dev] Displaying protocol types even if you don't decocde the proto

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Thu, 13 Apr 2000 07:32:09 -0500
On Wed, Apr 12, 2000 at 12:58:53AM +0900, Richard Sharpe wrote:
> Hi,
> 
> it seems that the way we handle most protocols is a little problematical,
> in that we have to hard code most of the decodes.
> 
> My view is that these should be table driven. This allows us to add info
> even if we cannot decode a protocol.
> 
> For example, ethertype 0x7030 is some silly Proteon thing, but I would have
> to add some code if I wanted this to show up in the display ...

You're right. The code in ethertype.c should be arranged into
a table similar to how packet-ipx.c. But both tables could be
changed so that the protocols that do have dissectors could be
called via the handoff routines (that is, dissector_add() is used
to register the dissector). Protocols that don't have dissectors
would simply have their name printed (that's what the packet-ipx.c
table called "ports" does).

--gilbert