What is the protocol to send echo ICMP Raw packets to hosts on network without
specifying destination host. The purpose of this is to write a diagnostic to test
the network on the src host, such as pinging a network without actually providing
destination host. The following is a sample of what I tried....
sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)
ip->protocol = IPPROTO_ICMP;
ip->saddr = inet_addr(dest_addr);
icmp->type = ICMP_ECHO;
connection.sin_family = AF_INET;
connection.sin_addr.s_addr = inet_addr(dest_addr);
sendto(,,,&connection,,,);
recvfrom(,,,&connection,,,,);
Thank you. Yehuda