From owner-freebsd-net Fri Jan 21 8:56:16 2000 Delivered-To: freebsd-net@freebsd.org Received: from web208.mail.yahoo.com (web208.mail.yahoo.com [128.11.68.108]) by hub.freebsd.org (Postfix) with SMTP id 66FF015162 for ; Fri, 21 Jan 2000 08:56:14 -0800 (PST) (envelope-from julian_elischer@yahoo.com) Received: (qmail 14069 invoked by uid 60001); 21 Jan 2000 16:55:03 -0000 Message-ID: <20000121165503.14068.qmail@web208.mail.yahoo.com> Received: from [212.211.72.2] by web208.mail.yahoo.com; Fri, 21 Jan 2000 08:55:03 PST Date: Fri, 21 Jan 2000 08:55:03 -0800 (PST) From: Julian Elischer Subject: Re: How to I get the interface on which the packet came in... To: gbnaidu , freebsd-net@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org If you use the divert function of ipfw the packet the divert target receives has teh received interface encoded into the sockaddr. --- gbnaidu wrote: > Hi I would like to know How to get the interface on > which the packet came in? > > One way is to use the falg IP_RECVIF flag. But can > some body tell me the code fragment how to > manipulate this option? > > Another option could be to bind different IP address > to different sock and try to read them. But in a > host with multiple interfaces, will this hold good? > How do I make sure on which interface it has came > in? > > To reply use this address: gbnaidu@sasi.com > > regards > --gb > > > --== Sent via Deja.com http://www.deja.com/ ==-- > Share what you know. Learn what you don't. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the > message > ===== +------------------------------------+ | __--_|\ Julian Elischer | | / \ julian@elischer.org +--from Perth to the world. | ( OZ ) World tour 2000 +- X_.---._/ presently in: Germany v __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message