webmastermattd
05-23-2003, 05:32 AM
Greetings all,
I am still working on getting a version of ping going (just for the fun of it) though am not too sure about how to calculate the time that it takes to send and recieve the ICMP packet.
Any help on implementation stratergies would be of great use.
What i am currently doing is saving the time that the packet was sent in a time_t struct, and then again when it is recieved in a different time_t struct and using difftime(); to get the difference between the two. This unfortunantly will often result in a difference of 0 which is not what I am after (more accuracy is needed).
Also, if anyone knows of any good tutorials or books on the different socket options that can be implemented with setsockopt(); it would be of great help.
Later,
I am still working on getting a version of ping going (just for the fun of it) though am not too sure about how to calculate the time that it takes to send and recieve the ICMP packet.
Any help on implementation stratergies would be of great use.
What i am currently doing is saving the time that the packet was sent in a time_t struct, and then again when it is recieved in a different time_t struct and using difftime(); to get the difference between the two. This unfortunantly will often result in a difference of 0 which is not what I am after (more accuracy is needed).
Also, if anyone knows of any good tutorials or books on the different socket options that can be implemented with setsockopt(); it would be of great help.
Later,