Hacker News new | ask | show | jobs
by rickard 5506 days ago
Implement emulation of a network card... ;) The tech notes page states that "there is no network emulation at this point".
1 comments

Yeah. That would be a whole interesting can of worms. Would need PCI/USB/whatever bus your ethernet card was on. Plus emulation of the selected ethernet card itself.

Loopback (which is present) is so much simpler.

I guess a tun/tap to some server-side service might be possible too, but perhaps not very interesting. The x86 dynamic library api suggested in the tech notes sounds more useful.

Edit: Easier idea might be adding ttyS1 and connecting that to a websocket on the server. Combined with something like socat or ppp, that ought to work. Since the console is already ttyS0 and connected to the js terminal, it might be doable even with the obfuscated source.

How complicated is virtio (http://wiki.libvirt.org/page/Virtio)? It's designed for guests that know they're virtualised.
Maybe power the network using a server side relay script and an ajax request?
WebSockets?
Or you can write a simple paravirtualized eth card driver and its implementation side, without trying to emulate real hardware. Linux is free software, take advantage of that.