Ethereal-dev: Re: [Ethereal-dev] Dissector Question

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: Fri, 20 Jul 2001 16:25:49 -0700 (PDT)
> A few days ago, I submitted the PGM dissector.  Since PGM is a
> transport protocol, I wanted people to be able to dissect protocols that
> were layered on top of PGM.

I infer from the draft at

	http://search.ietf.org/internet-drafts/draft-speakman-pgm-spec-06.txt

that the protocol being used atop PGM is specified by the
Data-Destination port in a packet.

If so, then the right way to handle this is to do as TCP and UDP do with
their source and destination ports, and create a dissector table (with a
name like "pgm.destport") with "register_dissector_table()".  Then

	use "dissector_try_port()", in the PGM dissector, to try to hand
	off the payload to the next dissector;

	have dissectors for protocols that run atop PGM register
	themselves with that dissector table with "dissector_add()".