From owner-freebsd-net Wed May 30 6:42: 4 2001 Delivered-To: freebsd-net@freebsd.org Received: from measurement-factory.com (measurement-factory.com [206.168.0.5]) by hub.freebsd.org (Postfix) with ESMTP id ED0AF37B424 for ; Wed, 30 May 2001 06:42:01 -0700 (PDT) (envelope-from rousskov@measurement-factory.com) Received: (from rousskov@localhost) by measurement-factory.com (8.9.3/8.9.3) id HAA68905; Wed, 30 May 2001 07:41:42 -0600 (MDT) (envelope-from rousskov) Date: Wed, 30 May 2001 07:41:42 -0600 (MDT) From: Alex Rousskov To: horape@tinuviel.compendium.net.ar Cc: freebsd-net@FreeBSD.ORG Subject: Re: why cannot bind to someipaddress:port when something else has *:port bound? In-Reply-To: <20010530073150.A15247@tinuviel.compendium.net.ar> Message-ID: MIME-Version: 1.0 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 On Wed, 30 May 2001 horape@tinuviel.compendium.net.ar wrote: > The following program binds *:1000 to a socket, and then tries to > bind 200.47.36.254:1000 to another socket, the error i gets is > "Address already in use". Why? *:1000 includes 200.47.36.254:1000 by definition of bind(2). Binding two sockets to one address (200.47.36.254:1000 in your case) cannot be allowed because it is unclear which of the two sockets should recieve packets destined to 200.47.36.254:1000. There may be other reasons. Alex. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message