I need to provide a encap/decap layer which encapsulats ethernet packets in a custom FPGA header before putting the packet on the wire and decapsulating the custom FPGA header before handing the packet off to the TCP/IP stack.
Why not just a custom net driver? If you already have a driver for the on-board ethernet, you could just hack that driver to do the encapsulation you need.
If a userland solution is acceptable, you could use AF_PACKET sockets to get frames to/from the FPGA, then use the TAP/TUN driver to feed them to the kernel.
I have done work like this many times. If you want to discuss it further (and no one else has a better suggestion), then I'll be happy to discuss it with you off-list.
John
- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html