Thanks to the two of you, I think this clears it up a lot for
me.
At 12:41 AM 10/8/2002 -0700, Guy Harris wrote:
On Tue, Oct 08, 2002 at 10:27:59AM
+0300, Antti Tuominen wrote:
> So I should see if another dissector is registered, if so
unregister
> it, register my own, and then if I don't know how to handle the
packet
> pass it to the other dissector?
No, as there's no way to see if another dissector is
registered.
> I would guess this is a quite common problem that you have IPv4
and
> IPv6 versions of a protocol which use the same port, but
different
> messages.
I don't know of any protocols that do that other than, apparently,
AODV
and OLSR. Perhaps there are others.
> Is there a way in ethereal to register a protocol to
> e.g. UDP(654) + IPv6 only?
No, you can only register a protocol to a particular port, not to a
particular port+network-layer type.
However, you could have the dissector for that port check the type
of
the source or destination address for the packet, and behave
differently
if it's IPv4 or IPv6. Check "pinfo->src.type" or
"pinfo->dst.type" to
see whether it's AT_IPv4, AT_IPv6, or something else.
Aaron Shey Woo
(202) 404-4905
woo@xxxxxxxxxxxxxxxx
Code 5523
Bld. 12/338