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

Wireshark-dev: Re: [Wireshark-dev] saving data in pcap file format

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 11 Oct 2010 09:22:58 -0400
Lange Jan-Erik wrote:
Hello,
I want to analyze an usb datastream with wireshark. To record the data I use a proprietary development that uses libusb to receive the data. Ok, to analyze the data I want to use wireshark. Is there a way to save the recorded data as a *.pcap File? Is there a library I could use to write the data into a file? Can you an recommend overview about this file format?

The wiki:

http://wiki.wireshark.org/Development/LibpcapFileFormat

has some good information.