Ethereal-dev: Re: [Ethereal-dev] dissectors looking into lower layers

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

From: "packet steve" <packetsteve@xxxxxxxxxxx>
Date: Wed, 20 Feb 2002 16:09:44 -0500
Assume an hypothetical protocol that uses two UDP ports. The protocol used on the two ports is quite similar, but the dissector needs to print a port-dependent identification string. Without peeking into the private structure, one could define two dissectors:
  dissector_add("udp.port", PORT1, handle1);
  dissector_add("udp.port", PORT2, handle2);
the two dissectors are basically wrappers would call a common dissector carrying along an extra argument ", int udpportnum)". This isn't very elegant. It also doesn't work for other types of layer-specific data.







> Is there a preferred way for a dissector to grab information from a lower
> protocol layer?

.... Good stuff removed.  Thanks Guy.
What are you trying to do that you need information from the other
dissector?  There may already be a way of doing that with existing
mechanisms.

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.