Ethereal-dev: Re: [ethereal-dev] Adding new protocols

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

From: David Frascone <dave@xxxxxxxxxxxx>
Date: Mon, 17 Jul 2000 12:40:44 -0500
On Mon, Jul 17, 2000 at 09:47:32AM -0700, Guy Harris wrote:
> On Mon, Jul 17, 2000 at 08:47:58AM -0500, David Frascone wrote:
> > The only problem with the preferences is that you have to not only register your
> > own dissector, but the offending disector as well.
> 
> "Register" in what sense?   Register a preference for the dissector?
> 
> If the XXX protocol runs atop UDP, UDP doesn't have to register a
> preference - only the XXX protocol has to register "xxx.ports", or, if
> it runs atop TCP and UDP, perhaps "xxx.tcp_ports" and "xxx.udp_ports".

Right, but if protocol xxx wants UDP.port 12, and protocol yyy also wants
UDP.port 12, then to make protocol yyy work, you have to modify the dissector
to protocol xxx (so that it does NOT grab port 12), and modify the dissector
yyy so that it DOES.

So, you have to add preferences for both dissectors to make it work.  Check
out the changes to packet-radius.c and the addition of packet-diameter.c that
I posted here.