[Winpcap-users] Packet random access using file seek

Pat Marion pat.marion at kitware.com
Tue Apr 23 07:17:00 PDT 2013


On Wed, Apr 24, 2013 at 12:02 AM, Clemens Gruber <
clemens.gruber at pqgruber.com> wrote:

> > In that index file, I could jump to the packet number * my index
> structure's size and look up the offset for the pcap file, after that, I
> would call fseek and read the data from the pcap file.
>


When you did the fseek and read of the pcap data, did you use the pcap
library to read the data, or did you do your own file reading?  Part of my
problem is that I am unable to fseek on the FILE* that the pcap dll reads
from.


> What are you using for your index file?

I build the index in memory.  I load a save file and read each packet
sequentially to locate packets of interest which is usually once every 150
packets or so.  The index is stored using a std::vector<fpos_t> and the
vector is typically a few hundred to a few thousand values for the save
files I am reading.

Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20130424/59d2a33f/attachment.html>


More information about the Winpcap-users mailing list