[p2p-hackers] ICMP on Win32
David Barrett
dbarrett at quinthar.com
Mon May 9 05:32:59 UTC 2005
Wow, excellent information. Thanks for the links.
So it sounds like if you send a UDP packet to (for example) an unreachable
host, recv/recvfrom( ) *might* return a "connection reset" error at some
indeterminate time in the future, and continue to do so for some
indeterminate duration.
Good to know, though in conjunction with sendto( ) it's hard to act upon, as
I'm sending to many endpoints from the same socket (and thus unless
recvfrom( ) correctly sets the address despite the error condition, I have
no way of knowing who is unreachable).
Regardless, this helps explain some heretofore "connection reset" errors,
and I'm glad to know it's not a fatal condition (requiring me to
close/reopen the socket).
Anyway, thanks for shedding light on this issue! Will, can you add any more
detail?
-david
_____
From: p2p-hackers-bounces at zgp.org [mailto:p2p-hackers-bounces at zgp.org] On
Behalf Of Enzo Michelangeli
Sent: Sunday, May 08, 2005 8:27 AM
To: Peer-to-peer development.
Subject: Re: [p2p-hackers] ICMP on Win32
UDP sockets may sometimes return error conditions due to the arrival of ICMP
packets. http://tangentsoft.net/wskfaq/articles/bsd-compatibility.html says:
According to Ilpo Ruotsalainen, "...most BSD socket implementations do not
pass delayed UDP errors (ICMP port unreachable at least, maybe others too)
to recvfrom() while Winsock 2 [under Windows 2000 but not Windows 98] does.
Linux [behaves like Windows 2000] too, but provives SO_BSDCOMPAT
setsockopt() for being compatible with the BSD style."
See also the posting at
http://lists.ximian.com/archives/public/mono-list/2004-February/018162.html
.
It all sounds like a typical case of "your mileage may vary depending on the
Windows version"...
Enzo
----- Original Message -----
From: David Barrett <mailto:dbarrett at quinthar.com>
To: 'Peer-to-peer <mailto:p2p-hackers at zgp.org> development.'
Sent: Saturday, May 07, 2005 12:44 PM
Subject: [p2p-hackers] ICMP on Win32
Does anyone here have experience receiving ICMP feedback for UDP packets on
Win32?
I don't know much about the topic (and am wondering if anyone who does know
can tell me whether it's worth learning), but I'm interested in learning
about UDP delivery failures, network congestion, timeouts, and so on.
However, I've read it requires the use of "raw" sockets, which I've
elsewhere read are being slowly prohibited - I think started with WinXP SP2.
Anyway, can you recommend any good resources? My ultimate goal is to weave
this into my reliable UDP layer, but I'd like to hear from those who have
gone before to see if it's worth the bother.
-david
_____
_______________________________________________
p2p-hackers mailing list
p2p-hackers at zgp.org
http://zgp.org/mailman/listinfo/p2p-hackers
_______________________________________________
Here is a web page listing P2P Conferences:
http://www.neurogrid.net/twiki/bin/view/Main/PeerToPeerConferences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://zgp.org/pipermail/p2p-hackers/attachments/20050508/9bcee63e/attachment.htm
More information about the P2p-hackers
mailing list