Ethereal-dev: Re: [ethereal-dev] Multiple Dissectors

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: Wed, 5 Jul 2000 09:51:10 -0500
On Wed, Jul 05, 2000 at 03:56:02AM -0500, Neil Hunter wrote:
> 
> 
> Hi,
> I've just started looking through the Ethereal code and documents, so 
> apologies
> if this is covered elsewhere (but I haven't spotted it yet!).
> 
> Is it possible to chain dissectors together?
> 
> I'll explain the scenario in case I'm coming at this in the wrong way. WAP 
> uses
> up to three separate protocols to carry its data and uses UDP as the
> transport. Therefore a UDP packet could contain WTLS, WTP or WSP data. The
> combination is (thankfully) defined by the port being used.
> 
> So, for port 9200, the UDP packet contains only WSP data. However, for port
> 9201 the UDP packet contains WTP data *followed* by WSP data.
> 
> I'd rather keep the protocol dissection separate if possible and not have a
> single wap dissector that splits everything up internally - but is this
> feasible?

Sure. Look at the ppp dissector for an example. It has both
dissect_ppp() and dissect_payload_ppp().

--gilbert