I'm trying to read a pcap file that was created with TShark 1.10.6 with libpcap version 1.4.0 on FreeBSD 9.2, and am doing this on Windows 7 with c# in Visual Studio, SharpPcap 4.2, PacketDotNet 0.13 and WinPcap 4.1.3.
The exception being raised is Unable to open offline adapter: bad dump file format, and it occurs in the routine CaptureFileReaderDevice at line:
IntPtr adapterHandle = LibPcapSafeNativeMethods.pcap_open_offline( captureFilename, errbuf);
What's interesting, is that Wireshark Version 1.10.3 on the same system -- and is also using the same version of WinPcap, is able to open the file!
What would cause SharpPcap to be unable to open this file?
EDIT #1:
I looked more closely at WireShark's version information, and apparently it's using a version of WinPcap without AirPcap support. I believe SharpPcap includes AirPcap, so I wonder if that somehow makes a difference.
Running on 64-bit Windows 7 Service Pack 1, build 7601, with WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008), GnuTLS 2.12.18, Gcrypt 1.4.6, without AirPcap.
Also, I'm compiling for a 32-bit output.
EDIT #2:
Using WireShark's Statistics / Summary for the pcap, it displays the following about the capture:
- OS: FreeBSD 9.2-RELEASE-p10
- Capture application: Dumpcap 1.10.6 (Git Rev Unknown from unknown)