I'm trying to make a program that will list all of the IP addresses of devices on a network. One of the main components of this is being able to ping devices. This program must work on Linux, Windows and Mac, so I chose the Boost library.
I managed to find this example in the documentation: http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/example/icmp/ping.cpp
I am fairly experienced at C++ when using OpenGL 3.1 and Shaders but when I run this program it pings over and over (454+) and understanding it is throwing me for a loop (No pun intended) , it seems to contain a substantial amount of shorthand, functions I've never seen etc.
Is there a simpler method to ping a machine with Boost:asio? or Is there a way I can get this method to run just 4 times and return the average response time?