Hello to everybody,
I post again on this topic, after a mail of 27/7.
I have tried to implement a simple packet generator functionality in
ethereal. The code for the hex editor is "stolen" from netdude and
slightly modified by me, 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 help me making a better work. However, my little
tests show that the packet is really sent on the selected interface, so
the code has a minimum of functionality.
At the present moment the generator has many limitations: it needs that
a packet is selected, 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 these
problems, and could give suggestions about them, if he founds the code
useful.
I attach a patch against version 0.9.14. I will be very thankful if you
could give me an opinion about it.
Best regards,
Lanfranco
Attachment:
packetgen.bz2
Description: Binary data