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: Guy Harris <guy@xxxxxxxxxx>
Date: Thu, 6 Jul 2000 18:58:13 -0700 (PDT)
> 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?

You'd have a "dissect_wsp()" dissector, and would use "dissector_add()"
to specify that "dissect_wsp()" should be called for UDP port 9200.

You'd also have "dissect_wtpwsp()", and would use "dissector_add()" to
specify that "dissect_wtpwsp()" would be should be called for UDP port
9201.  "dissect_wtpwsp()" would call a "dissect_wtp()" routine for the
WTP portion and the aforementioned "dissect_wsp()" for the WSP portion.

This isn't chaining using only "dissector_add()", but we don't expect
that "dissector_add()" can necessarily solve *all* dissector-connection
problems.