The existing Ethernet connection implementation is PCAP-based. This
allows bridging your virtual machine directly to the host's network, but
requires elevated permissions on your OS and appropriate drivers which
often aren't available on Wi-Fi cards.
This commit adds a libslirp-based backend that provides just enough
internal networking to handle TCP/IP out of the guest to host, LAN or
Internet. As such things like ICMP, IPX and NetBIOS don't work properly.
The use case for this connection is to give Internet access to the guest
for things like IRC, HTTP and other connections to online services.
This change separates the pcap code out of the NE2000 code to its own
EthernetConnection backend, and modifies the NE2000 to use the
EthernetConnection abstraction.
Currently DOSBox-X only supports one emulated network adapter and one
network backend: the NE2000 using libpcap.
In order to change either of those we need an abstraction between them,
and as such I've written the EthernetConnection interface.
The EthernetConnection interface will be used by emulated network
adapters (such as the NE2000) to send and received Ethernet frames to
and from the guest, usually through a DOS packet driver.
The actual implementation of EthernetConnection objects will take the
packets sent from the emulated network adapter and pass them to some
kind of backend (such as libpcap) then pass any received packets from
the backend back to the guest network adapter.
This will allow more emulated Ethernet adapters and more network
backends to be implemented with minimal changes to unrelated code.
- TODO: fix up FreeType runtime library re-importing (lots of warnings)
- TODO: fix up type conversion warnings inside printer.cpp
- Linux compilation path also probably needs fixes, the configure option and FreeType dependency
- Start partial refactor of sdlmain.cpp output code
- Move general definitions into sdlmain.h (incomplete)
- Move little part of OpenGL output related code out
- Move almost all of surface output related code out
- Generalize xBRZ postscaling operations into their own respective function to reuse
- Bugfix: commits 3a8d77f and ebdfc33 break intentional output window fill-in for xBRZ
- Minor: non-ppl runs can be done without granularity based loop, adjusted
- TODO: continue factoring out output code
- TODO: SDL2 build is probably not xBRZ-capable now
- TODO: see what can be used instead of ppl taskgroups for other platforms, xBRZ is too slow without parallel processing
- TODO: adjust other build configurations to include new source files / headers