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?
-c. Specifies the number of packets. This option is useful when you get an IP trace log. You can capture a minimum of ping packets.
In Windows, hit Windows+R. In the Run window, type “cmd” into the search box, and then hit Enter. At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter.
Have a blast at The Ping Page, which has a link to full source on the original Unix ping(8)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With