Hi, I managed to implement my taprouter software into DOSemu.
It means that it's possible for users to get an internet connectivity inside DOSemu that 'just works', without needing to play with bridges, routing, nat, etc etc etc, and without having to run anything with root privileges. The only required actions are: - having the slirp binary installed somewhere in the system - changing the dosemu configuration file The DOSemu configuration file would need to be changed as follows: $_vnet = "slirp" $_netdev = "/usr/bin/slirp" *** How does it work? *** when the $_vnet="slirp" backend is used, DOSemu calls my librouter_init() function, that creates a unix socket pair, and forks itself. Since then, DOSemu uses a 'normal' dgram socket to tunnel ethernet-level communications, thus from the DOSemu point of view, it's almost identical to using a tun interface. the librouter code handles all the ARP-level connectivity, DHCP requests interception, SLIP encapsulation and DNS forwarding on its own, routing all traffic for non-local destinations to the slirp executable configured in $_netdev. If that's of any interest to anyone, I have put the modified source code below: http://www.viste-family.net/mateusz/temp/dosemu-slirp/ I hope I haven't broken anything in the process, but I believe I have not, since my modifications on DOSemu are minimal (mostly recognizing the new configuration file token, and adding a new 'VNET_TYPE_SLIRP' case here and there. 99% of my modifications are inside new files, that I've put in a dedicated directory in src/dosext/net/net/librouter Do not hesitate to ask me should you have any questions, doubts, or suggestions about improving the quality of this contribution. *** Known bugs *** It only works for udp/tcp traffic. this is a 'by design' limitation of SLIRP, due to the fact that it uses unprivileged user sockets to emulate a routed environment. This simply means that you won't be able to ping anything from within DOSemu, but wget, htget, fdnpkg etc tools will work just fine. cheers, Mateusz Viste ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Dosemu-devel mailing list Dosemu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dosemu-devel