The files were not being closed using pcap_close() - This was the problem.<br><br><div class="gmail_quote">On Fri, Mar 5, 2010 at 9:48 PM, Guy Harris <span dir="ltr"><<a href="mailto:guy@alum.mit.edu">guy@alum.mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
On Mar 5, 2010, at 4:49 AM, Selçuk Cevher wrote:<br>
<br>
> I wrote a small program which calls pcap_next_ex() function to read packets while processing a bunch of PCAP files (offline mode) "sequentially" - one after another.<br>
<br>
</div>So you're opening a file with pcap_open_offline(), processing its packets, closing the file with pcap_close(), opening the next file with pcap_open_offline(), processing *its* packets, closing the file with pcap_close(), etc.?<br>
<div class="im"><br>
> However, pcap_next_ex() generates a segmentation fault (I observed this using GNU gdb).<br>
<br>
</div>Can you show us the stack trace?<br>
<div class="im"><br>
> I use Ubuntu 9.10 (64-bit) which installs libpcap v1.0.0-2ubuntu1 by default.<br>
<br>
</div>...so this is probably not the best list for this - WinPcap is the port of libpcap to Windows.<br>
<br>
<a href="mailto:tcpdump-workers@tcpdump.org">tcpdump-workers@tcpdump.org</a> is the right list for libpcap questions (and even WinPcap questions can go there if they're not asking about WinPcap-specific features).<br>
<div><div></div><div class="h5">_______________________________________________<br>
Winpcap-users mailing list<br>
<a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>
<a href="https://www.winpcap.org/mailman/listinfo/winpcap-users" target="_blank">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br>
</div></div></blockquote></div><br>