Wireshark-dev: Re: [Wireshark-dev] Number of packets
From: Jeff Morriss <[email protected]>
Date: Thu, 09 Jun 2011 15:43:00 -0400
Artur Gontijo wrote:
Hi guys,

I have 2 doubt:

1 - How can I know the number of packets that was opened?
I'm not aware of a way to do that (unless you only want to count how 
many packets came to your dissector).
2 - How can I know when user opens another file? (I want to free some memory before the user opened a new file)
Register an initialization routing with register_init_routine().  This 
is not called when the file is closed but rather when a (new) file is 
opened which is often what you want.