Re: select refuses connection with datagrams

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sun, 4 Oct 1998 00:13:41 +0100


On Sat, Oct 03, 1998 at 11:03:12PM +1000, Keith Owens wrote:
> Alan Cox posted some mail November 1997 on this subject, basically
> saying that it is required by RFC 1122. The destination responds with
> ICMP port or host unreachable, a pending error is stored, the next send
> gets an error. To handle it, if write gets ECONNREFUSED, retry a
> couple of times. The initial question and Alan's response can be found
> in
>
> http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Nov_97/1634.html
> http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Nov_97/1647.html

How can you test for the ECONNREFUSED status, if you don't have another
packet to send elsewhere for a while? Can you be notified of the ICMP
through select()?

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/