Date: Wed, 29 Aug 2001 17:00:42 -0400 (EDT) From: Robert Watson <rwatson@freebsd.org> To: Mike Silbersack <silby@silby.com> Cc: freebsd-net@freebsd.org Subject: Re: BPF question Message-ID: <Pine.NEB.3.96L.1010829165726.72843B-100000@fledge.watson.org> In-Reply-To: <Pine.BSF.4.30.0108291454041.45090-100000@niwun.pair.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Depends on the SIMPLEX flag I believe, but for most ethernet interfaces, there's a software loopback. I actually take advantage of that to support the following BPF ioctl which I added: BIOCSSEESENT BIOCGSEESENT (u_int) Set or get the flag determining whether locally generated packets on the interface should be returned by BPF. Set to zero to see only incoming packets on the interface. Set to one to see packets originating locally and remotely on the interface. This flag is initialized to one by default. This is determined by checking that the mbuf pointer is non-NULL, indicating it originated in the interface code, rather than NULL, which signifies that it descended from a socket. Not 100% accurate with weird netgraph/etc cases, but sufficient for my needs, which permitted userland bridging using bpf. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services On Wed, 29 Aug 2001, Mike Silbersack wrote: > Silly question I could probably figure out myself, but thought it would be > quicker to ask here... > > When listening on an ethernet interface, are the packets you see from > yourself intercepted inside the network stack, or are you actually > sniffing them off the wire? I'm helping someone track down corrupted > packets he's seeing in tcpdump, and I'd like to know if I can locate where > the corruption may be occuring more exactly. > > Thanks, > > Mike "Silby" Silbersack > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1010829165726.72843B-100000>