ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] While writing to a pipe, getting some errorneous extra bytes betw

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Thu, 05 Jan 2006 03:10:56 +0100
Hi List!

I'm currently writing a test case for bug #652: "-w -" broken in 0.10.14

Having a test case for this bug hopefully will prevent us from getting the same bug again.

I'm calling the following (under cygwin):

./tethereal -i 3 -c 10 -a duration:30 -F libpcap -w - > ./testout.pcap 2>./testout.txt

This captures 10 packets from interface with index 3, and writes it in libpcap format to stdout. Stdout will be written to ./testout.pcap and stderr to ./testout.txt

Everything is working properly, but the ./testout.pcap file is broken after the first packet.

I had a look at the hex dump of the file ./testout.pcap and it seems that it's containing 10 packets so that's ok.

But there are three additional bytes: "00 00 02" between each captured packet (first appearance at offset 0x52), which obviously will produce an error when reading the file later.

I've debugged through tethereal but couldn't find any reason.

Any ideas what is wrong here? Am I doing something that I shouldn't do or is there a bug somewhere in tethereal?

Regards, ULFL

Attachment: testout.pcap
Description: Binary data