A while ago (about a decade, oh no) I was involved in a project which did direct TCP from an FPGA. As part of debugging and verification, I made it so you could hook up the simulated version from Verilator to the Linux TUN/TAP device, enabling you to connect directly into it from the developer machine without tying up the physical hardware (which we only had one of). Fun project.