Ethereal-dev: Re: [Ethereal-dev] IPv6 Question

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 7 Oct 2002 15:58:26 -0700
On Tue, Sep 24, 2002 at 01:46:39PM -0400, Aaron Woo wrote:
>     I've written a dissect module for the Optimized Link State Routing 
> Protocol (OLSR) IPv4, and am now trying to write the same for the IPv6 
> version.  I can't seem to figure out how ethereal differentiates between v4 
> and v6.

What do you mean by "differentiates between v4 and v6"?

The way it differentiates betwen IPv4 packets and IPv6 packets is the
same way networking stacks do so - IPv4 and IPv6 have different Ethernet
packet type values, different PPP packet type values, and so on.

> I see that AODV6 has been written, so I've compared it to the AODV 
> dissect code, but I am still unable to figure out how ethereal knows which 
> version is being used.

It doesn't.  The AODV6 dissector was written by somebody who, I guess,
didn't quite understand the way Ethereal handles protocols that are
selected by port numbers - it registers both the AODV and AODV6
dissectors with UDP port 654, but, unfortunately, only *one* dissector
can be registered with a given port number.