LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ping without raw socket (https://www.linuxquestions.org/questions/linux-networking-3/ping-without-raw-socket-124338/)

linuxnw 12-09-2003 04:08 PM

ping without raw socket
 
Hello all,
Iam wondering if there is any way to send/receive ICMP ECHO and REPLY messages w/o using RAW socket??

thank you

nikhiljosh 12-09-2003 06:45 PM

I've read in a book by Bach that ICMP echo uses raw BSD sockets,
can u give more info as what are u trying to achieve,

linuxnw 12-09-2003 11:54 PM

yeah thats correct actual/known PING program uses RAW sockets.

Iam working on my masters project and in that i needed to find "distance between given nodes" .. distance can be any metric like how many hops away,how much time it takes to go frm one nore to other etc,.

i tought i can construct an ICMP-ECHO message and send to the other node and get reply and parse the receive messages to get the required data,as used in PING/Traceroute programs. but problem here is,as said, they need/use raw sockets. so i thought of asking if any body knew any method of getting the work done w/o RAW sockets.

if not this info.. any suggestions on how to get the above said information would be great!!

thanks

linuxnw 12-09-2003 11:57 PM

BTW for the moment i have solved the problem by popening ping and parsing the result!!


All times are GMT -5. The time now is 05:52 AM.