Ethereal-dev: [Ethereal-dev] Proposal for packet generator

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

From: Lanfranco Salinari <lanfranco.salinari@xxxxxxxxxxxxx>
Date: Sun, 27 Jul 2003 12:26:17 +0200
Hello to everybody,
in the last two weeks I tried to implement a simple packet generator functionality in ethereal. The code for the hex editor is stolen from netdude, while the rest is "inspired" to gtk/packet_win.c. It is very rough code, it works only with Linux and GTK 1, and it surely has many bugs, because it's the first time that I use GTK libs, I have not much familiarity with ethereal source code, and also because I have not much time to dedicate to it after work. I send it to this list only because someone else could perhaps take it as a starting point and enhance it. At the present moment the generator has many limitations: it needs that a packet is selected, you cannot create a packet longer (or shorter) than the selected one, some lines in the protocol view should not be displayed, I think that some resources are not deallocated properly, etc... Surely someone among you knows better than me how to solve this problems, and could give suggestions about them, if he founds the code useful.
I attach a patch against the released 0.9.14, hoping it is not too big.
Best regards,

Lanfranco

Attachment: packetgen.bz2
Description: Binary data