Number of packages of offline files

Apr 26, 2012 at 2:09 PM

I am reading a file (PCAP) with the class(OfflinePacketDevice) and before calling the method ReceivePackets I need to know the number of packets that file, is there any method / property that returns that number?

thank you

Coordinator
Apr 27, 2012 at 5:30 AM

Hi Leolosi,

 

There's no way knowing how many packets are in a .pcap file without going over the entire file.

Using Pcap.Net, the simplest way is to read the packets once just to count them and then doing a second reading of the packets to handle them.

 

I hope this helps,

 

Boaz.