Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-cvs] cvs commit: ethereal packet-ndps.c

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 10 Oct 2002 13:22:12 -0700
On Thu, Oct 10, 2002 at 09:38:09AM -0600, Greg Morris wrote:
> The ndps dissector is triggered by the IPX socket and thus when it is
> called the SPX header is not present. So The NDPS dissector had to
> decode the SPX header if present... Perhaps I am doing this wrong and
> there is a better way to get ethereal to properly give me the offset
> after the SPX header is decoded. This would be prefered bu could not
> figure out how to do this. Suggestions on how to trigger ethereal for
> dissection after the SPX header?

Modify the SPX dissector so that it can, based on some field -
presumably the IPX socket number - call different dissectors.

I.e.:

	1) arrange that the IPX socket number be passed to the SPX
	   dissector (I'd have the IPX dissector set the "srcport" and
	   "destport" members of the "pinfo" structure);

	2) give the SPX dissector an "spx.socket" dissector table,
	   similar to the IPX dissector's "ipx.socket" dissector table,
	   and have it do the same "try the lower-numbered of the two
	   socket numbers and then try the higher-numbered one" stuff
	   the IPX dissector does;

	3) have the NDPS dissector register its socket numbers with
	   "spx.socket" rather than "ipx.socket".