From owner-freebsd-questions Tue Aug 15 9: 8:11 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.bezeqint.net (mail-a.bezeqint.net [192.115.106.23]) by hub.freebsd.org (Postfix) with ESMTP id 36E2D37B935 for ; Tue, 15 Aug 2000 09:08:05 -0700 (PDT) (envelope-from nimrodm@bezeqint.net) Received: from bsd.net.il (bzq-171-234.bezeqint.net) by mail.bezeqint.net (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0FZC003NSCPVOA@mail.bezeqint.net> for freebsd-questions@FreeBSD.ORG; Tue, 15 Aug 2000 19:05:56 +0300 (IDT) Received: (from nimrodm@localhost) by bsd.net.il (8.9.3/8.9.3) id SAA01647 for freebsd-questions@FreeBSD.ORG; Tue, 15 Aug 2000 18:59:51 +0300 (IDT envelope-from nimrodm) Date: Tue, 15 Aug 2000 18:59:50 +0300 From: Nimrod Mesika Subject: Re: Can a tcp client use bind to force which interface is to be used? In-reply-to: <20000814185251.11423.qmail@camelot.bitart.com>; from gerti@bitart.com on Mon, Aug 14, 2000 at 01:52:50PM -0500 To: freebsd-questions@FreeBSD.ORG Reply-To: nimrodm@email.com Message-id: <20000815185950.A1403@localhost.bsd.net.il> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline Mail-Followup-To: freebsd-questions@FreeBSD.ORG User-Agent: Mutt/1.2i References: <20000814185251.11423.qmail@camelot.bitart.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Aug 14, 2000 at 01:52:50PM -0500, Gerd Knops wrote: > Hi everyone, > > Looking through Stevens this questions doesn't seem to be answered: > > If I use bind() for an outbound socket connection to set the source > IP-address, does this mean that the interface associated with that > IP-address is used (as opposed to the interface dictated by the routing > table for the given target IP)? > Yes you can. For an example, see the /usr/src/sbin/ping/ping.c (the -s option of ping). -- Nimrod. http://www.geocities.com/rodd_27 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message