From owner-freebsd-hackers Sat Sep 8 21:30:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 3351E37B407; Sat, 8 Sep 2001 21:30:20 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 04EF181D05; Sat, 8 Sep 2001 23:30:15 -0500 (CDT) Date: Sat, 8 Sep 2001 23:30:15 -0500 From: Alfred Perlstein To: "E.B. Dreger" Cc: hackers@freebsd.org, net@freebsd.org Subject: Re: outbound SOCK_STREAM - force source addr? Message-ID: <20010908233014.J2965@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eddy+public+spam@noc.everquick.net on Sun, Sep 09, 2001 at 04:04:06AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * E.B. Dreger [010908 23:04] wrote: > Greetings all, > > Any way to force the source address for an outbound SOCK_STREAM? I > know that one can do it for SOCK_DGRAM... but I've found no way to > do so for, say, a TCP connection. It's not immediatly obvious, but you can bind(2) a socket before calling connect(2) in order to do this. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message