From owner-freebsd-hackers Thu Jan 7 03:38:09 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA09065 for freebsd-hackers-outgoing; Thu, 7 Jan 1999 03:38:09 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ss1000.ms.mff.cuni.cz (ss1000.ms.mff.cuni.cz [195.113.19.221]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA09058 for ; Thu, 7 Jan 1999 03:38:07 -0800 (PST) (envelope-from mkop5230@ss1000.ms.mff.cuni.cz) Received: from beta.ms.mff.cuni.cz (mkop5230@beta.ms.mff.cuni.cz [195.113.16.70]) by ss1000.ms.mff.cuni.cz (8.8.8/8.8.8) with ESMTP id MAA12346 for ; Thu, 7 Jan 1999 12:29:35 +0100 Received: from localhost (mkop5230@localhost) by beta.ms.mff.cuni.cz (980427.SGI.8.8.8/8.8.8) with SMTP id MAA20821 for ; Thu, 7 Jan 1999 12:29:35 +0100 (MET) Date: Thu, 7 Jan 1999 12:29:35 +0100 (MET) From: Milan Kopacka Reply-To: Milan Kopacka To: freebsd-hackers@FreeBSD.ORG Subject: Re: Specifying local IP in connect() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 7 Jan 1999, Milan Kopacka wrote: Hi, I'm sorry. I was taught by authorities, that the right way to specify local IP is to use bind() call. Please forget my connect() extensions :) However, the rest remained. I still need to open connections from IP x which my system regulerly doesn't have while still being able to communicate with machine x. From my point of view, the specified information (local IP) only moves to other call. Using bind() disallows me to specify local adress other from adresses assigned to one of my interfaces. netinet/in_pcb.c: (in_pcbbind()) if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) return (EADDRNOTAVAIL); I think a change here + ip_input() modification will do all what I need. Adresses used in such a way don't show under any of machine interfaces, so traffic out for them is not affected and doesn't remain on my machine. The application, which needs such features is described in my previous message. Milan Kopacka -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message