Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 2009 10:33:39 -0700
From:      Julian Elischer <julian@elischer.org>
To:        freebsd-emulation@freebsd.org
Subject:   Re: freebsd-emulation Digest, Vol 330, Issue 3
Message-ID:  <4A9571F3.1010605@elischer.org>
In-Reply-To: <20090826120020.27CAE106570D@hub.freebsd.org>
References:  <20090826120020.27CAE106570D@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Robert said:

 > Hi Fredrik:
 >
 > The technical approach you've taken here is a bit unusual
 > and potentially  quite fragile -- replacing the method pointers
 > on struct ifnet's maintained by  other drivers and "borrowing"
 > spare fields is likely going to prove  problematic in the future
 > (and, in fact, already).
 >
 > It looks like a lot of what the driver is trying to accomplish
 > can already be one entirely from userspace using bpf(4): taking
 > a tee of incoming frames  arriving at the NIC, perhaps selecting
 > down to ones to specific ethernet addresses, taking the card into
 > and out of promiscuous mode, and injecting  frames into the
 > output path, are exactly what BPF is designed to support.  I
 > was wondering if you'd looked at this approach as an alternative
 > to a custom kernel driver?
 >
 > Robert
-------------End quote----------

BPF is pretty lousy for that job..

Take a look at the netgraph hooks at interface level to divert
packets to other destinations.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A9571F3.1010605>