Ethereal-dev: [ethereal-dev] Random packet generator

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Fri, 10 Sep 1999 00:31:32 -0500
I have just added to ethereal CVS 'randpkt', a random packet
generator. It uses wiretap, and is compiled along with ethereal as
a default target.

I need to work on the configure script; all the GTK+ flags that are used
to compile ethereal are also used when compiling randpkt; this need
not be; but I'll leave the autoconf work until another evening.

You can use randpkt to create a libpcap file of packets of random size
with random data in them. That's how I found the problems with packet-tr.c,
packet-trmac.c (last night), and packet-fddi.c (tonight).

My TR code trusted the packet data, which is the wrong thing to do in a
packet sniffer, since you can always receive bad packets. And the FDDI
code had a bad default case which was never found because all the proper
values found in good packets were handled in the switch statement
appropriately.

It's very easy to add more packet types to randpkt.c.  doc/randpkt.txt
documents how to do so. Enjoy! And may we remove all the bugs
from Ethereal. :)

--gilbert