Ethereal-dev: Re: [ethereal-dev] Ascend router capture

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: Wed, 22 Sep 1999 14:16:17 -0700 (PDT)
> I don't see how it could have worked - Lex seems to be reading 20K out 
> of the file at one go, so the actual file offset seems to have jumped
> 20K down from the first packet and stays there until some time later
> when it jumps further.

Note that the offset returned by "ascend_read()" *has* to be unique for
each packet, otherwise you simply can't click on a packet and get a
detailed dissection, because the code has to be able to read the data
for a particular packet, given the offset.

As long as that offset increases monotonically, and is in the range 0 <=
offset < file size, the progress bar works.

Note also that the parser, and thus the lexical analyzer, are called
once for every packet, with the file position set before it's called -
see "ascend_read()".