Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g2TLS1500832 for netdev-outgoing; Fri, 29 Mar 2002 13:28:01 -0800 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.129]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g2TLRv200829 for ; Fri, 29 Mar 2002 13:27:57 -0800 Received: from westrelay03.boulder.ibm.com (westrelay03.boulder.ibm.com [9.17.194.24]) by e31.co.us.ibm.com (8.9.3/8.9.3) with ESMTP id PAA134714; Fri, 29 Mar 2002 15:24:29 -0500 Received: from d03nm035.boulder.ibm.com (avpilot.boulder.ibm.com [9.17.188.135]) by westrelay03.boulder.ibm.com (8.11.1m3/NCO/VER6.00) with ESMTP id g2TKRqF122292; Fri, 29 Mar 2002 13:27:52 -0700 From: "Nivedita Singhvi" Importance: Normal Sensitivity: Subject: Re: Opening more than 65000 sockets To: Yan-Fa Li Cc: sri@linux.ibm.com.sgi.com, Ben Greear , Yan-Fa Li , netdev@oss.sgi.com X-Mailer: Lotus Notes Release 5.0.3 (Intl) 21 March 2000 Message-ID: Date: Fri, 29 Mar 2002 12:27:50 -0800 X-MIMETrack: Serialize by Router on D03NM035/03/M/IBM(Release 5.0.9a |January 7, 2002) at 03/29/2002 01:27:51 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: owner-netdev@oss.sgi.com Precedence: bulk Content-Length: 627 Lines: 28 Are you doing a bind() to the unique local address you wanted? Are you doing the setsockopt() prior to that? bind() returns an EINVAL when the port is being used, if you havent actually done a REUSEADDR, which is what you need in this case.. thanks, Nivedita > Thanks for the tip. I tried it out and it doesn't > appear to work. It actually fails with a different > return code EINVAL (22). Which isn't even a listed > return code on the connect() man page :( > Anybody else got any more ideas I can try ? > Here's what I used: > k=tcp and on=1 > setsockopt(*opensock,k->p_proto,SO_REUSEADDR,&on, > sizeof(on));