I've done this on Linux. I had an old laptop that had no ethernet port, and I had no USB-ethernet port or PCMCIA ethernet adapters, but it did have a serial port. You need a null modem cable, and your NetBSD needs to be running a PPP daemon (it's called
pppd on Linux).
You then set up serial port in Windows XP as a modem. You need to go to the "Phone and Modem Options" in the Control Panel and create a new modem based on the COM port you want to use and set the baud rate, etc. options accordingly. This then lets you use the "modem" as an Internet interface and you can enable Internet Connection sharing and all that good stuff.
Only caveat is that Windows thinks it's dialing a modem, so it will send modem commands to the serial port that
pppd normally wouldn't expect. But you can use a chat script with
pppd to basically tell
pppd to pretend to be a modem to Windows.
After all this, you'll have an interface
ppp0 or whatever NetBSD calls it forwarded through Windows Internet Connection Sharing running at the astonishing speed of 115Kbps.
Basically, this script fragment is the essence of what I'm running on the Linux box. $LOCAL_IP is the IP address of my router/DNS server, which is 10.0.0.1/24, and $LOCAL_NET_MASK is it's netmask which is 255.255.255.0 in this situation.
You need two consecutive IP addresses on the same subnet to form the "tunnel" that PPP depends on. That is then your IP address on the NetBSD box.
echo "link: $TTY, IP interface: $PPP_IFACE_ADDRESS"
pppd 115200 netmask $LOCAL_NET_MASK crtscts connect 'chat -v -f /etc/admin/network/winclient.chat' lock local ms-dns $LOCAL_IP ms-wins $LOCAL_IP persist proxyarp silent $PPP_IFACE_ADDRESS $TTY noauth
winclient.chat contains this text:
with an extra newline at the end of it.
But that's Linux. Don't know if
pppd works on NetBSD the same way.