Hi,
I am trying to write a program similar to ping in linux but a simplified version so i can learn the sockets programming under linux.
I have had a look at the ping.c from the iputils package under linux but i cannot understand how everything is working in this file.
All want to do is send a icmp echo to an IP address and display a result when i get a echo reply back.
After i can do this i would like to start adding more features such as setting IP TOS bits and etc....but i just need a simple example to get started.
I also had a look at Beej's guide but it discusses only SOCK_STREAM and SOCK_DGRAM.
Can someone let me know where i can get some simple examples of raw socket programming for linux.....

Is anyone is able to share a example so i can have look at this and get started.

Thanks