Faruk Keskin
2008-Apr-24 05:30 UTC
[Bridge] Access the bridge through the userspace (Rx/Tx)
Hello everybody, I'm trying to implement Layer 2 packet processing, where I need to transfer packets arriving at the Linux Bridge to a dedicated userspace application. So my very basic question would be whether you could recommend a strategy to achieve this. Can I use TUN/TAP or do I need to implement specific code around a socket? Thanks in advance, Faruk
Andy Gospodarek
2008-Apr-24 18:17 UTC
[Bridge] Access the bridge through the userspace (Rx/Tx)
On Thu, Apr 24, 2008 at 1:30 AM, Faruk Keskin <faruk at eit.uni-kl.de> wrote:> Hello everybody, > > I'm trying to implement Layer 2 packet processing, where I need to > transfer packets arriving at the Linux Bridge to a dedicated userspace > application. So my very basic question would be whether you could > recommend a strategy to achieve this. > > Can I use TUN/TAP or do I need to implement specific code around a socket? > > Thanks in advance, > Faruk >Yes that would work fine. I've seen userspace apps that handle frames work well with the tap driver. I've also seen vpn clients in userspace that do the same and successfully forward traffic.
Malcolm Scott
2008-Apr-28 19:57 UTC
[Bridge] Access the bridge through the userspace (Rx/Tx)
On Thu, 24 Apr 2008, Faruk Keskin wrote:> I'm trying to implement Layer 2 packet processing, where I need to > transfer packets arriving at the Linux Bridge to a dedicated userspace > application. So my very basic question would be whether you could > recommend a strategy to achieve this. > > Can I use TUN/TAP or do I need to implement specific code around a socket?You could alternatively use libpcap, if I understand your requirements properly. -- Malcolm Scott Research Assistant University of Cambridge Computer Laboratory