I'm writing a rather elaborated software working on almost-exclusive layer-2 Ethernet. The system is really downcut - kernel has no filesystems, no IP stack (yep, just Ethernet drivers and CONFIG_PACKET
- I implemented rudimentary ARP and IP with no fragmentation, no routing tables, etc). I capture and emit packets using PACKET_MMAP
, and it works damn well.
I have one little problem. I'd love to capture and emit both VLAN tagged and untagged packets. IOCTLs used by vconfig and friends create new virtual Ethernet device for each vlan. I need no such functionality - I just need a catch-all on one side and emit-as-is on the other.
This could be probably achieved by giving NIC a right punch. I browsed through source code (I have twin VIA Velocity on-board) and found no clues on how to kill VLAN filter.