Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2002 14:04:26 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        "Justin C. Walker" <justin@mac.com>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Sockets and changing IP addresses
Message-ID:  <200211212204.gALM4QDX067571@arch20m.dellroad.org>
In-Reply-To: <0DC02941-FD99-11D6-81FD-00306544D642@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Justin C. Walker wrote:
> >> Do people agree that my suggestion of returning ENETDOWN is reasonable?
> >
> > Wow.  There are other possibilities, EADDRNOTAVAIL or ECONNABORTED.
> > It doesn't matter so long as it the errno is unique to this situation
> > across all syscalls that might encounter it; ENETDOWN seems to meet
> > this criteria.
> 
> A thought: An attempt to reconnect will succeed, given the scenario 
> above, and ENETDOWN implies that the network is unavailable, so I don't 
> think this is a good response.  ECONNABORTED might be better (and 
> EADDRNOTAVAIL isn't really germane).

Good point... ECONNABORTED is probably better. The particular error
code can be determined later however...  more interesting is the
question, how should this be efficiently implemented?

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211212204.gALM4QDX067571>