Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Accessing prior packets in Lua

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Wed, 16 Sep 2009 13:35:04 -0400
philippe alarcon wrote:
Hello,

I suggest you to keep your listener.

As far as I know, the listener is called when the file is loaded.
And the dissector is called for each selected packet.

Then I think you need both functionalities :
- a listener in order to analyse and memorise all the informations about the different packets,
- a dissector in order to analyse the current packet,
and verify if the packet has been acknowledged or not,
or any related information.

Actually a dissector is called once for each packet when the file is loaded and then again when each packet is selected.

Guy's suggestion is that when all the packets are dissected, the dissector stores the information which should be placed on an earlier packet (e.g., the "time to ack of this frame"). Then, when the dissector is called again because a packet (e.g., the one that was later ack'd) was selected, the dissector uses this information to add (new/generated) information to the now-selected packet's frame.