[Winpcap-users] multiple instances of pcap_dump_open
Michael Sangster
mksangster at hotmail.co.uk
Thu May 9 02:45:31 PDT 2013
Hi
I’m trying to open more than one pcap dump file similar to
the following:
m_pcapout =
pcap_open_dead(DEFAULT_DLT_TYPE, SNAPLEN)
…
m_phandle1 =
pcap_dump_open(m_pcapout, file1)
…
m_phandle1 =
pcap_dump_open(m_pcapout, file2)
…
m_phandle1 =
pcap_dump_open(m_pcapout, file3)
note: fname1,fname2
and fnam3 are all different.
What I find however is m_phandle1, m_phandle2, m_phandle3
all have the same value 0x1003D200. All pcap records written appear in only the last dumpfile opened – i.e. file3. The symptoms seem to be that one handle is being reopened/reused each time. Interestingly, for this example, file1
and file2 are both created and are 1K in size.
Looking at the source for pcap_dump_open() I cannot see why
this should not work. Am I missing some obvious point.
One further note: I am using winpcap version 4.1.2/4.1.3 on a
win7 machine and have tried the same executable on a winxp machine with identical results.
Regards
mks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20130509/3c265a28/attachment.html>
More information about the Winpcap-users
mailing list