Ethereal-dev: Re: [Ethereal-dev] problems on windows

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: Sun, 19 Mar 2006 13:15:57 -0800
Julian Cable wrote:

I have a couple of problems with the dissectors I've written. Any ideas would be really helpful.

As Jaap noted, you're only calling dissect_one_packet() if a protocol tree is being built. On the first pass through the packets, when the capture is being read, if there's no color filter or read filter or tap configured to force protocol trees to be built, the protocol tree isn't built, and any code inside "if (tree) { ... }" isn't executed.

You probably have different color filters, or other preferences that would affect whether protocol trees are built or not, configured on Linux and on Windows; your Linux configuration probably causes protocol trees to be built on the first pass, and your Windows configuration probably doesn't.

Code that calls subdissectors, *OR* that does reassembly (e.g., that calls any of the fragment_add routines), has to be called on the first pass through the packets, so it can't be put inside "if (tree) { ... }". I'd remove the "if (tree)" stuff from dissect_msc_data().