Skip to contentSkip to conversation

Ethernet frames filtering/relaying. Help needed

DISCUSSION Primiano Tucci 1 participant 1 message May 21, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all, I'm new to this Mailing list
Some days ago I started development of a new 2.6 network driver (formerly it should be a decentered Network Load Balancing driver).
I'm not too much familiar with kernel networking, so I'm asking you what's the best approach to do something like this:
- Allocate a new tun interface... let's say tun0 (no problems with this step)
- Monitor layer2 traffic on an existing device(let's say eth0). -Catch all Ethernet frames arrived on eth0 with an arbitrary destination MAC address.... let's say catch all the frames that has 01:00:02:03:04:05 as destination MAC addr.
-Extrapolate the IP datagram contained in the frames and push it in tun0

I need some suggestions about the best approach to catch and relay Ethernet frames on eth0. Should I use netfilter? Should I not?
Any help will be appreciated. Thanks

Primiano Tucci