ping_send - Send ICMP echo requests to all associated hosts and wait for ICMP echo responses to arrive
int ping_send (pingobj_t *obj);
The ping_send method is the actual workhorse of this library. It crafts ICMP
packets for the hosts associated with obj and sends them via the
corresponding sockets. It then waits for echo responses and receives them,
writing latency information for each host. The method returns after all echo
replies have been read or the timeout (set with ping_setopt(3)) is reached.
After this function returns you will most likely iterate over all hosts using
ping_iterator_get(3) and ping_iterator_next (described in the same manual
page) and call ping_iterator_get_info(3) on each host.
ping_send returns the number of echo replies received or a value less than
zero if an error occurred. Use ping_get_error(3) to receive an error message.