Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Using wiretap library in a project

From: Neagaru Daniel <neagarudan@xxxxxxxxx>
Date: Thu, 03 Jan 2013 17:06:40 +0100
Hello!

I am working on a C project, which uses the libpcap library to open the capture files. Due to wireshark's migration to pcap-ng, most of the capture files users give me, are pcap-ng format, so I can't use my code anymore, without converting every pcap-ng to libpcap. Other capture formats except pcap-ng and libpcap most probably won't be used, so I wanted to ask, is there any way to convert the format from the code, without the system() call to editcap? Or just open it as a simple libpcap file for further processing?

Cheers,
Daniel