Perl Read Pcap Files

Tcpdump Read Pcap

A pure Perl library to read and write PCAP files. Extracting email attachements from pcap files. Use the following perl command to read the mail file in via stdin and dump out the decoded MIME message. Yaesu 8900 Programming Software on this page.

Net::Pcap doesn't understand ERF format files such as those that come from an Endace capture. Sonic Generations Special Edition Ps3. (I get 'unknown file format' from the open_offline sub). ERF is identical to pcap, except that there is an additional timestamp that has a higher resolution than what pcap can provide. Tcpdump can parse ERF files no problem, but it seems that knowledge is in the tcpdump source and not libpcap itself (and therefore not Net::Pcap).

Before I download and read the tcpdump source code to find the precise format and write my own parser, does anyone have one they'd like to share or is there a module out there I didn't find? Update: Actually tcpdump can not parse the native files that come from Endace resulting in the same error returned by Net::Pcap, which makes sense ('unknown file format'). We discovered that mergecap is changing the files into the libpcap format which can then be read by libpcap/tcpdump/Net::Pcap.

Mergcap converts from (File type: Endace ERF capture, File encapsulation: Endace Record File) ->(File type: Wiresharek/tcpdump/. - libpcap, File encapsulation: Endace Record File. Libpcap can read the latter, but not the former. So, the wireshark programs can read the native Endace file format, but libpcap can not.

Libpcap can however capture live from DAG's and the code seems to be there (pcap-dag.c). The code from wireshark to read the Endace files is in erf.h, erf.c, but there are so many conditionals in how the specifics of the file can look, that this looks better to be a small C project if I want to avoid manually processing the files before processing with Perl. It would be great to convert this to a perl module, but I just need the data and don't have the time or C->Perl experience to be an open source hero! Thanks for the feedback! Adventurer Six-speed Folding Bike Owners Manual there. By (Initiate) on Mar 18, 2011 at 00:06 UTC Sounds like you figured it out already. ERF (Endace Record Format) is a proprietary binary format for captured network packets.

An ERF File is simply one or more records concatenated, with no file header. This makes it conceptually simpler than pcap files, which it is not directly compatible with. The Wireshark package (including mergecap, editcap, capinfos, tshark, wireshark etc) has the ability to read ERF Files and dissect the records.