PDA

View Full Version : QtNetwork send ICMP Packet



SlowTree
9th April 2007, 03:32
Hello everybody,
i'm trying to create a simple ICMP Packet sender with Qt4, i would like to know if is possible to send ICMP Packets throw QAbstractSocket Extension or by another way.
I saw that using std socket it is possible (but as usual using IP RAW & u need root privileges on Linux) but i would like to use qt framework not only for GUI but also as Core engine for my app.
Thanks,
Bye Bye...
SlowTree

yabadabadoo
11th April 2007, 08:19
yes i also needed this . i want to START as well as STOP the Ping through my application. I am using Qt4 on Suse Linux 9.3.

J-jayz-Z
11th April 2007, 08:39
Hi,

you've to know the structure of the ICMP protocoll, than you're able to build such a package, using QTcpSocket. If you don't want to enter this topic so intense, you can use a portable Library like libpcap ( and winpcap on Windows ).

If you want to write such a lib manually, you've to take a look on RFC 792 ( http://www.faqs.org/rfcs/rfc792.html )

greetings

eleanor
29th October 2007, 20:13
Hi. I'm sorry I'm waking up this topic, but I have the some questions.

Well, I want to build my own ICMP packet:
- can this really be done using QTcpSocket?
- how can I start building one... by appending certain bits into a QString or what... Any tips will do!

I want to build a ping program based on ICMP packets and the hard thing to do is build a ICMP packet, so I need some help. Thanks