I want to write a C or C++ program, that given an IP address, Pings it and then performs further action based on whether the Ping was successful or not. How to do this?
Have a blast at The Ping Page, which has a link to full source on the original Unix ping(8)
.