Ethereal-dev: Re: [ethereal-dev] Why are we doing a conversation_init in rescan_packets in fi

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

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Wed, 23 Aug 2000 14:47:21 +0900
At 12:03 AM 8/24/00 -0700, Guy Harris wrote:
>On Wed, Aug 23, 2000 at 11:50:58PM -0700, Guy Harris wrote:
>> I'm not sure why having to figure stuff out again on a subsequent pass
>> through the file is a problem, however, other than a performance
>> problem, as long as, on the subsequent pass, every single packet gets
>> fed to the dissectors, in the same order that they got fed to the
>> dissectors in the previous pass; unless a preference changed, the
>> dissector should behave the same on subsequent passes (and, as per the
>> above, if a preference changed, the dissector might not behave the same
>> on subsequent passes, *and if that means it constructs different state
>> on the subsequent pass, that's the state that should be kept around, not
>> the state from the previous pass*).
>
>Or, to put it another way:
>
>Why is
>
>	discarding all the state, resetting the "visited" flag to 0, and
>	redissecting all the packets on a subsequent pass through the
>	file
>
>any different from
>
>	closing the file, reopening it, and rereading it?

Because of per-frame state information.

In the second case, the per-frame state information is removed. In the
first case, this does not happen.

Now, I think that I probably should revisit the per-frame code and add a
method to re-initialize it, because I think you are correct, and there
should be no difference between the above two scenarios.


Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba