Isn that needlessly complicated — why not just extract the ip packets and pass them on?
It’s not that simple under Windows. The Windows sockets API has some serious limitations. Raw sockets in general (except ICMP) do not work on any Windows flavor before Windows 2000. Further, the crucial function setsockopt( …, IP_HDRINCL, … ) does not work. Curiously enough, it might be because of these limitations/bugs that Windows “Tracert” utility uses ICMP echo request packets instead of UDP packets as most traceroute utilities do. Further, there is no way to tell that an external host is attempting to connect to an arbitrary local port. That’s why you must tell Basilisk II what ports to listen to if you want to run server software on your Mac. It would be possible to write a TDI filter driver, an NDIS intermediate driver or a Winsock layered service provider to handle the raw packet traffic. None of these three options is a trivial one, let alone portable.