Commit Graph

4 Commits

Author SHA1 Message Date
Allofich
67ebe980a7 Remove unneeded includes 2021-06-06 04:39:54 +09:00
Wengier
8f5373dc9b allow backend=auto to select a backend 2021-05-29 21:59:28 -04:00
Jookia
197e1fbaff dosbox: Add configuration for PcapEthernetConnection
This commit modifies the EthernetConnection interface to pass a
configuration section, and sets up the PcapEthernetConnection
implementation to use it.

The following changes have been made to the configuration properties:
- An [ethernet, pcap] section has been added
- realnic has been moved from [ne2000] to this section
- [ne2000] now specifies its Ethernet backend via the 'backend' option
- The 'enable' option in [ethernet, pcap] must also be enabled to use
  this backend with the ne2000
2021-03-06 09:17:00 +11:00
Jookia
ca9111abc2 ethernet: Add EthernetConnection interface
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.
2021-03-05 05:39:11 +11:00