Re: Fw: sendpkt: Connection refused

Andi Kleen (ak@muc.de)
Wed, 14 Oct 1998 12:16:19 +0200


> IMO, SO_BSDCOMPAT should be the default. The arrival of (possibly
> unrelated) error messages shouldn't disable normal operation.

I disagree. If you send a packet over a socket the error message is related.

>
> Setting IP_RECVERR and select()ing for recvmsg(MSG_ERRQUEUE) would
> be a much cleaner solution, wouldn't break older apps without
> error handling, and could still conform to RFC1122.

That isn't possible with select (because the exceptfd fd_set is not for
errors but for exceptional events like urgent data), but you can do it
with poll() by waiting for POLLERR.

> PS: Don't get me wrong. I would love to see a method to get reliable
> error messages (the error queues look right) but why should old
> APIs be broken by that?

Linux 2.0 had that kind of API fo two years now. Changing to SO_BSDCOMPAT
would break that "old API".

-Andi

-
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/