From owner-freebsd-net Thu Nov 21 14:15:10 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55DC137B440 for ; Thu, 21 Nov 2002 14:15:09 -0800 (PST) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0961A43EB1 for ; Thu, 21 Nov 2002 14:15:08 -0800 (PST) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id OAA84783; Thu, 21 Nov 2002 14:04:25 -0800 (PST) Received: from arch20m.dellroad.org (localhost [127.0.0.1]) by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id gALM4QOS067572; Thu, 21 Nov 2002 14:04:26 -0800 (PST) (envelope-from archie@arch20m.dellroad.org) Received: (from archie@localhost) by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id gALM4QDX067571; Thu, 21 Nov 2002 14:04:26 -0800 (PST) From: Archie Cobbs Message-Id: <200211212204.gALM4QDX067571@arch20m.dellroad.org> Subject: Re: Sockets and changing IP addresses In-Reply-To: <0DC02941-FD99-11D6-81FD-00306544D642@mac.com> To: "Justin C. Walker" Date: Thu, 21 Nov 2002 14:04:26 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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