From owner-freebsd-questions Mon Dec 3 6: 3:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from vvi.com (vvionly.penn.com [208.22.30.250]) by hub.freebsd.org (Postfix) with ESMTP id A0E2D37B419 for ; Mon, 3 Dec 2001 06:03:52 -0800 (PST) Received: from [206.229.112.1] (HELO vvih001) by vvi.com (CommuniGate Pro SMTP 3.4.7) with ESMTP id 300261; Mon, 03 Dec 2001 09:07:03 -0500 Date: Mon, 3 Dec 2001 09:07:03 -0500 Subject: Re: bind() error on stale port ... Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v472) Cc: freebsd-questions@FreeBSD.ORG To: Edwin Groothuis From: Lance Bland In-Reply-To: <20011203234721.B546@k7.mavetju.org> Message-Id: <069E8AC2-E7F7-11D5-A5E1-0030659A531A@vvi.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.472) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Monday, December 3, 2001, at 07:47 AM, Edwin Groothuis wrote: > You do it with setsockopt and SO_REUSEADDR: > > int x=1; > if (setsockopt(fd6,SOL_SOCKET,SO_REUSEADDR,(char > *)&x,sizeof(x))<0) { > bugf("init_socket6(): SO_REUSEADDR: %s",ERROR); > exit(1); > } Edwin- thanks! that worked. Why would I NOT want to set that socket option? It seems like something I would always want to do. I have 1000 pages of unix socket books and also man pages, but they don't seem to be comprehensive enough. Is there a book that describes all the features of setsockopt() (for example)? For example,the man page I have doesn't describe the optional parameters (e.g.: &x) to setsockopt(). -lance _______________________________________________ Lance Bland System Administrator at VVI mailto:lance.bland@vvi.com http://www.vvi.com Realtime, bulk and web data reporting and visualization To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message