This is pretty much a hack.
1. Updated config.guess and config.sub for SDLnet to the latest version, making SDLnet building work.
2. Code patches mostly are about NDK and toolchain (mine is clang) oddities.
Running build-debug-sdl2 without parameters now succeed.
src/dosbox-x runs.
This may break building for other platforms, so please check.
Signed-off-by: Liu Wenyuan <15816141883@163.com>
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.
Currently the ne2000 emulator explicitly depends on pcap.
Decouple the ne2000 code and pcap code so we can always build with the
emulator but optionally disable pcap.
This also updates build defines and configuration to make this
decoupling explicit to the user.