This project is read-only.

Number of packages of offline files

Apr 26, 2012 at 3: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

Apr 27, 2012 at 6: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,