From: Dave H. <dhy...@gm...> - 2006-10-24 14:42:27
|
Hi Morgan, \> If I use fping, now the roundtrip times are negative, > like the example below... > > # ./fping -c 3 -e google.com > google.com : [0], 84 bytes, 0.-115640228 ms This seems to be a problem with the packet data coming from the network stack. fping is taking a timestamp from the received packet, and this timestamp doesn't seem to be adjusted based on the time of day. I threw some prints in timeval_diff and got this output on my FC5 box: a->tv_sec = 1161700624 b->tv_sec = 1161700624 google.com : [2], 84 bytes, 114 ms (96.9 avg, 0% loss) and this on my gumstix: a->tv_sec = 1161700684 b->tv_sec = 9548 google.com : [2], 84 bytes, 105209 ms (105251 avg, 0% loss) So the problem is that the b->tv_sec is using the original date/time. The data that's used to calculate b->tv_sec originates with the data in the recvfrom_wto call, which comes from the recvfrom call. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |