ping

mc_states.ping.checksum(source_string)

I’m not too confident that this is right but testing seems to suggest that it gives the same answers as in_cksum in ping.c

mc_states.ping.do_one(dest_addr, timeout)

Returns either the delay (in seconds) or none on timeout.

mc_states.ping.receive_one_ping(my_socket, ID, timeout)

receive the ping from the socket.

mc_states.ping.send_one_ping(my_socket, dest_addr, ID)

Send one ping to the given >dest_addr<.

mc_states.ping.verbose_ping(dest_addr, timeout=2, count=4)

Send >count< ping to >dest_addr< with the given >timeout< and display the result.