On Thu, Apr 24, 2003 at 07:27:09AM -0400, Haynes, Ryan wrote:
> I am working on a dissector that has several other sub dissectors
> that it calls that I have written. I am having trouble figuring out a way
> to have my main dissector be called when ethereal performs its capture.
> The problem that I have is that the messages that I am dissecting are coming
> across multicast on different UDP ports and I am not sure how to associate
> more than one port with my dissector or a multicast address. (To complicate
> the matter those ports are also dynamic and are based upon a run time
> configuration.) Does anyone have any suggestions how I should handle this?
Either
1) make the port (or ports) to use a preference item, if by
"are based on a run-time configuration" means that, at a
given site, a particular set of ports are the ones that will
be used
or
2) make your dissector a heuristic dissector, if there exists a
set of tests the dissector can perform on the packet contents
to figure out whether the packet is a packet for your main
dissector's protocol or not and those tests won't let too
many packets *not* for your protocol pass.