From owner-freebsd-hackers Wed Mar 6 20:23:30 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 5696137B405 for ; Wed, 6 Mar 2002 20:23:27 -0800 (PST) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.6/8.11.5) with SMTP id g2748tD34247; Wed, 6 Mar 2002 23:08:55 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 6 Mar 2002 23:08:55 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Rajesh P Jain Cc: freebsd-hackers@freebsd.org Subject: Re: BPF - Locally Generated Packet Reception In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 It could be that this fails for interfaces that perform hardware loopback, since it relies on the behavior of software loop. There may also be some other circumstances where this occurs. Basically, the BPF device can tell it's "locally sourced" because it has a NULL interface pointer associated with it. If the packet ends up with a none-NULL interface pointer for some reason, it will be considered a non-locally sourced packet. In practice, we've used this successfully on a variety of ethernet devices -- which interface type are you using? Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services On Wed, 6 Mar 2002, Rajesh P Jain wrote: > Hi, > In the BPF - Berkeley Packet Filter, when a file descriptor is associated to an interface to send and receive packets, there is an ioctl parameter "BIOCSSEESENT", which is by default set to 1. Hence the packets both from "remote systems" and "locally generated" are received. > > If "locally generated" packets needs to be filtered, we can use the option "BIOCSSEESENT" and set the value to 0. > > But even after setting this value to 0 (using the ioctl call), the "locally generated" packets are received. > > Am I missing something ? Plese throw light on this issue. > > TIA > Raj > > > Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message