[ros-dev] ping -t 127.0.0.1

Gedi gedi at ntlworld.com
Thu May 26 21:45:49 CEST 2005


Gedi wrote:

> ea wrote:
>
>> Run it twice, in two console windows.
>> This exposes a bug (it seems packets get corrupted).
>>
>> Emanuele Aliberti
>>
> The ICMP packets are being picked up by the wrong process and thus the 
> ICMP id field isn't maatching up with the process ID.
>
> Busy at the mo, but if no one has sorted it by Wednesday, I'll have a 
> look at it.
>
>

OK, I've had a look at this and I'm struggling to come up with decent
solution.
After getting a severe headache, I contacted Warren Young who runs the
Winsock FAQ and he suggested there is a weakness in the MS stack.

As the bug ea spoke about is evident on Windows, this would support that
theory.
However as our stack has derived from Linux, and Linux doesn't replicate
this bug, I'm at a loss.

My only 2 thoughts to get around this problem at the moment at to write
all ICMP packets into a buffer and tell ping, tracert, etc to check the
ID field before removing them, or possibly polling recvfrom with MSG_PEEK.

Both of these are obviously nasty hacks, the first more so than the second.


This will become a problem in the future, so I'd welcome any thoughts /
ideas to rectify this now.

Regards,
Ged.




More information about the Ros-dev mailing list