freebsd-emulation Digest, Vol 330, Issue 3

Julian Elischer julian at elischer.org
Wed Aug 26 17:46:57 UTC 2009


----- 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.




More information about the freebsd-emulation mailing list