The slirplog object must exist before calling slirp_new().
Function slirplog_error() can handle arguments now.
Most of the fprintf() calls replaced by slirplog_error().
Added IPv6 host forwarding feature (not yet used by Bochs).
Added stubs for slirp_connection_info() and slirp_neighbor_info().
Fixed some warnings.
Started implementing slirp debug message support. For now DEBUG_CALL messages
can be sent to log file by setting new option 'debug_switches' to 1.
Moved function slirp_warning() to slirp.cc (TODO: change fprintf() to slirp_warning()).
Updated some tcp_emu() stuff from libslirp (not yet used by Bochs).
- Added capability to turn on IPv6 support with slirp.conf option (using default
QEMU settings for now / non-Windows platforms only).
- Added some basic timer code required by IPv6 based on example code.
This change fixes compiler errors in Android as following.
../../../iodev/sound/soundoss.cc:43:10: fatal error: 'sys/soundcard.h'
file not found
43 | #include <sys/soundcard.h>
| ^~~~~~~~~~~~~~~~~
../../../iodev/network/slirp/misc.cc:195:12: error: use of undeclared
identifier 'getdtablesize'; did you mean 'getpagesize'?
195 | for (s = getdtablesize() - 1; s >= 3; s--)
| ^~~~~~~~~~~~~
| getpagesize
/data/data/com.termux/files/usr/include/unistd.h:356:5: note:
'getpagesize' declared here
356 | int getpagesize(void) __INTRODUCED_IN(21);
| ^
The official documentation also suggests to use __ANDROID__ macro which
is defined by the compiler irrespective of included headers and build
system.
https://android.googlesource.com/platform/bionic/+/HEAD/docs/defines.md
otherwise the question may not even arrive there, depending on the
implementation-defined behaviour of stdio buffering.
fixes display of questions with musl libc.
- The selected / detected disk image mode is now stored as a string constant to
simplify code (same as Bochs core).
- Changed command line option to select operation mode to "-func=X" to avoid
confusion with disk image mode.
- Documentation updates.
implementing disk image support with an external C++ class. With the new code
it's now easier to implement support for additional disk images formats, so we
don't need the old stub anymore.
string constants instead of hardcoded values. Available modes are detected at
Bochs startup and stored in a string array before initializing options. In the
plugins case additional modes are read from the plugins list. If plugins are
off, the hdimage_locator_c registry is used. Related changes in all parts of
Bochs that need the hdimage stuff.
TODO #1: Network and sound drivers could be handled in a similar way.
TODO #2: Make disk image mode detection work again in plugins mode.
- Renamed vpc-img.* files to vpc.* and removed hack for image mode name conversion.
- Added suffix "_img" to all disk image mode plugin base names. This is important
for the future implementation of a plugin enumeration at Bochs startup.
- Added options "net" for the IP address space and "ftp" for the FTP server.
- Added some sanity checks for the IP address configuration.
- Added sample config file.
The 'vnet' networking module now uses 192.168.10.3 and bxhub is setting up the
slirp compatible IP 10.0.2.4 for additional services. Added host name "vnet-ftp"
in the DNS code to translate it to the new IP address.
- FTP: handle the hidden flag on Windows the same way as on other platforms.
- TCP/IP: fixed some gcc 9 warnings (checked with Cygwin gcc 9.3).
- DHCP: changed the way to set up the default client IPv4 address.
- Reset FTP session state in case of login failure.
- Improved FTP server status output.
- Added special error messages for 2 unimplemented commands.
- Updated vnet / socket / slirp networking module infos in source and docs.
- FTP: added support for renaming file, create and remove directory.
- FTP: added FTP server status report and fixed SYST reply.
- bxhub fix: send all pending packets one after the other.
- TCP fix: when connecting, return default MSS option value 1460.
- TCP fix: handle the case when FIN is set in final data packet.
- Partly re-implemented host_to_guest methods from legacy eth_vnet.cc.
- Added two dynamic packet buffers for vnet server replies.
- TFTP and FTP servers are only available if root directory is configured.
- Added TCP port handler methods similar to the UDP ones.
- Added basic TCP connection management and 3-way handshake.
- Added FTP server stub for testing TCP (only login/logout for now).
- Added DNS service support for the server "vnet" and connected clients.
- Added command line option "-loglev=" to control whether or not there is
BX_ERROR, BX_INFO or BX_DEBUG output. Default value is 1 (BX_ERROR only).
NOTE: networking still fails when compiled with Cygwin ('socket' mode fails
to set up non-blocking i/o / 'slirp' doesn't complain, but fails to connect
the internet).
- Removed "pseudo device plugin" containing common code and specific drivers.
- Moved network module base classes and module handling to the Bochs core.
Now loading network driver plugins in netmod.cc.
- Moved shared networking code used by the 'vnet' driver and 'bxhub' from
netmod.cc/.h to new files netutil.cc/.h.
- Created separate plugins for each network driver implementation.
- Modified Bochs plugin system to support new plugin type PLUGTYPE_NETWORK.
The format of the 'ethdev' string must be 'host:port' to use this feature.
Using the port number only for connecting 'bxhub' on the same machine is still
supported.
- Increase maximum number of Bochs client sessions to 6.
- Define bx_devmodel_c to 'void' for the bxhub case to simplify netmod code.
- Minor cleanups in bxhub and related vnet code.