Reputation: 466
I've a file in the pcapng format and want to open it by SharpPcap - that doesn't work.
SharpPcap uses Winpcap (libpcap).
So my question: Does WinPcap and/or SharpPcap support the pcap-ng format at the moment or in future? I can't find some current information about it, only some old posts.
Upvotes: 2
Views: 1753
Reputation: 1106
To read timestamp with nanosecond precision
pcap_open_offline_with_tstamp_precision
function to open the PCAP file and pass PCAP_TSTAMP_PRECISION_NANO
as a second parameter.pcap_pkthdr::ts
structure returned from pcap_next
as a seconds+nanoseconds.Sorry, I did not have chance to port it to SharpPcap.
Upvotes: 0
Reputation: 1339
Yes. SharpPcap supports the latest libpcap and npcap releases and these releases support pcap-ng file format.
Upvotes: 0
Reputation:
Does WinPcap and/or SharpPcap support the pcap-ng format at the moment
No. Support for reading pcap-ng files was added to libpcap in libpcap 1.1.0, and the latest WinPcap is based on libpcap 1.0.0.
or in future?
Hopefully some future WinPcap release will be based on a recent libpcap release. This will require some work, mainly for remote-capture support with the new pcap_create()
/pcap_activate()
APIs.
Upvotes: 1