Commit Graph

155 Commits

Author SHA1 Message Date
Volker Ruppert
79156f6b2f Added support for setting up the vnet FTP service with a different IPv4 address.
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.
2020-06-12 06:31:09 +00:00
Volker Ruppert
a4bf5843f0 Some work on the vnet server code.
- 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.
2020-06-11 14:26:34 +00:00
Volker Ruppert
08386c771e Some work on the vnet FTP support and documentation.
- 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.
2020-06-04 16:08:03 +00:00
Volker Ruppert
f378ca5418 Added some core functions to the vnet FTP service and some fixes.
- 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.
2020-05-30 14:44:53 +00:00
Volker Ruppert
2b79641f3a Added support for deleting files in the vnet FTP support and some cleanups. 2020-05-29 09:02:14 +00:00
Volker Ruppert
548f9456e8 Packet logging in text format now controlled by option "pktlog" in slirp config. 2020-05-19 17:55:15 +00:00
Volker Ruppert
9c3a99856e Added basic TCP handling and FTP server stub for testing.
- 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).
2020-05-12 20:51:26 +00:00
Volker Ruppert
d30dcfdd3c Added log file support to the 'bxhub' utility. Log output can be sent to file
specified with command line option, otherwise stderr is used.
2020-04-13 19:35:56 +00:00
Volker Ruppert
451b60b8a2 Rewrite of the 'vnet' server code used by the vnet networking mode and the bxhub
utility to get rid of code duplication. New class vnet_server_c now contains all
of the network emulation including the DNS code from bxhub.cc.
2020-04-12 09:14:01 +00:00
Volker Ruppert
9eb1cf233c Fixes for compiling on MacOS (bxhub and eth_socket / patch by Yasser Rathore). 2020-02-17 20:49:10 +00:00
Stanislav Shwartsman
96e2c50bef applying SF patch #545 Speling fixes 2019-12-09 16:29:23 +00:00
Volker Ruppert
445bf01b2a Removed deprecated function GetVersion() from eth_win32.cc and niclist.c.
Since the presence of UNICODE or ANSI format only depends on the PACKET.DLL
version, no Windows version check is necessary.
2019-12-08 18:14:30 +00:00
Volker Ruppert
1855f22d2b Added sector size option in bximage for creating flat, sparse and growing mode
images. TODO: using ATA disk images with big sectors requires BIOS support.
2018-03-30 21:04:04 +00:00
Volker Ruppert
0d7c32c6b5 Minor fixes and cleanups in the bxhub code.
TODO: rewrite of the vnet server code to reduce code duplication.
2017-07-04 18:53:33 +00:00
Volker Ruppert
851e9a084c Fixed compilation on MSVC (Bochs always defines stricmp). 2017-06-23 19:44:30 +00:00
Volker Ruppert
d22cdbdbf7 Some work on the bxhub utility.
- 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).
2017-06-17 12:40:13 +00:00
Volker Ruppert
2fb6263102 Compilation fixes for Cygwin.
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).
2017-04-18 20:45:28 +00:00
Volker Ruppert
8c310f68e1 Documentation updates.
- Added section about the 'socket' networking module.
- Updated and sorted lists of installed files on Windows and Linux.
- Fixed bxhub help message.
2017-03-19 19:08:15 +00:00
Volker Ruppert
758f4de4d4 Rewrite of the network driver plugin code.
- 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.
2017-03-12 07:48:08 +00:00
Volker Ruppert
30a20ba50f Fixed compilation errors on Windows. 2017-03-08 22:09:50 +00:00
Volker Ruppert
a037c74071 Added support for connecting the 'bxhub' utility running on another machine.
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.
2017-03-07 19:20:35 +00:00
Volker Ruppert
e67493c58e Some work on the bxhub code.
- Prepared bxhub for connections from other machines.
- Added missing WSACleanup() for Windows.
- TODO: Support for other machines in eth_socket.cc.
2017-03-06 19:00:52 +00:00
Volker Ruppert
c756fed13e Fixed and simplified default IP address generation. 2017-03-04 13:32:41 +00:00
Volker Ruppert
112e9016c2 Some changes in bxhub and related code.
- 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.
2017-03-03 09:56:18 +00:00
Volker Ruppert
06511be14d Added support for up to 4 connections to Bochs sessions (same machine only). 2017-03-02 10:21:14 +00:00
Volker Ruppert
0011092ddb Some work on the eth_vnet and bxhub code to reduce code duplication. Moved some
shared functions to netmod.cc and modified ARP, IPv4 and ICMP code.
2017-03-01 16:53:57 +00:00
Volker Ruppert
b25d050676 Some changes in the socket networking module for Windows compatibility.
- eth_socket.cc: Added missing winsock init.
- bxhub.cc: Added missing CDECL macro to the signal handler.
- Added some definitions for non-Windows platforms similar to the serial and
  rfb code.
2017-02-28 16:52:15 +00:00
Volker Ruppert
f17107957c Added signal handler to terminate bxhub correctly at CTRL+C. 2017-02-28 12:40:39 +00:00
Volker Ruppert
027b3ffd41 Some work on the 'socket' networking module.
- bxhub.cc: Put all client data in a structure and added send_packet() function.
- bxhub.cc: Added SVN ID line.
- netmod.cc: Changed some DHCP messages to BX_DEBUG.
- eth_socket.cc: Minor cleanups.
2017-02-28 10:18:15 +00:00
Volker Ruppert
d6166344eb Added ethernet module 'socket'. designed to connect two Bochs instances with
external program 'bxhub' (simulating a two port ethernet hub). It is based on
an old SF patch and it has been updated and extended:
- Windows support (tested with MinGW/MSYS and MSVC nmake).
- Command line arguments for 'bxhub' (base port number, MAC address, TFTP).
- Added support for DHCP, TFTP, ARP and ICMP echo (ping). It uses parts of the
  code for the 'vnet' module with some additions from the former "slirp backend".
- TODO: code cleanup to reduce duplication, rewrite of the networking plugins
  stuff similar to the work done with the sound drivers.
2017-02-27 22:26:43 +00:00
Volker Ruppert
135d64cb1f Fixed outdated prompt for floppy images. 2017-02-12 16:51:52 +00:00
Volker Ruppert
400704d038 Added macro BX_FATAL() that works like BX_PANIC(), but with hardcoded action
"fatal". It can be used for all cases when there is no workaroud present to
avoid application crash or incorrect simulation behaviour. As a first step now
using BX_FATAL() for some data structure size and bit field errors.
2016-12-30 10:04:06 +00:00
Volker Ruppert
3e54ff2e36 Added Oracle(tm) VM VirtualBox image support (VDI version 1.1). Patch written
by Ben Lunt plus some additions (bximage fixes, big endian support).
TODO: update MSVC workspace files.
2015-03-29 14:27:32 +00:00
Volker Ruppert
422a06652d Fixed bximage compilation on big endian hosts. 2015-03-20 18:01:52 +00:00
Stanislav Shwartsman
b5a603c8c7 fixed %d->%u format found by cppcheck (patch by Maxim Derbasov) 2015-01-25 21:24:13 +00:00
Stanislav Shwartsman
055da948a0 fixed problems found by cppcheck tool (patch by Maxim Derbasov) - second round 2015-01-07 16:17:40 +00:00
Stanislav Shwartsman
1f4d3e7194 fixed problems found by cppcheck tool (patch by Maxim Derbasov) 2015-01-03 13:53:52 +00:00
Volker Ruppert
c8ef526143 Fixed some warnings. 2014-12-01 17:06:00 +00:00
Volker Ruppert
3ce9f04329 Update copyright notice in the header of some remaining files 2014-07-10 11:14:49 +00:00
Volker Ruppert
6f75ceadbc Removed sources of legacy tools bxcommit and bximage_old and updated MSVC workspaces 2014-06-19 08:57:28 +00:00
Volker Ruppert
12b019b8dd Fixed niclist.exe compiled with MSVC (DLL functions also need CDECL) 2014-06-07 11:42:47 +00:00
Volker Ruppert
3a73bacf60 Fixed MSVC warnings after adding /Gr option
CRITICAL BUG: niclist.exe doesn't report anything if compiled with MSVC and
option /Gr present in CFLAGS_CONSOLE. File niclist.c needs to be fixed !
2014-06-07 07:32:06 +00:00
Volker Ruppert
a07bb921e8 Fixed some format warnings 2014-04-20 12:50:05 +00:00
Volker Ruppert
a5c687dfb0 Slirp: added host forwarding feature for host-to-guest access.
TODO: add support for multiple port redirections
2014-04-18 09:27:48 +00:00
Volker Ruppert
8159a00b3e Added access() check before detecting image mode to get an accurate panic
message in case of failure.
2014-03-23 09:19:44 +00:00
Volker Ruppert
9052c65049 Added support to specify the IP address of the SMB server.
Handle special value "none" for the slirp.conf to avoid error message.
2014-03-21 18:47:14 +00:00
Volker Ruppert
159228db5d Slirp: added SMB support for non-Windows platforms. The new slirp.conf option
'smb_export' can be used to set up shared folder. TODO: the location of 'smbd'
and IP address of the SMB server is currently hardcoded.
2014-03-20 18:02:44 +00:00
Volker Ruppert
aad090d03c Slirp dnssearch: added support for comma-separated list of DNS suffixes 2014-03-09 16:41:36 +00:00
Volker Ruppert
46037ee5f5 Slirp: added basic 'dnssearch' option (currently only 1 entry supported).
TODO: 'dnssearch' option should accept a comma-separated list of suffixes.
Other slirp TODOs: SMB support on Linux, reduce code duplication (ARP, DHCP, TFTP)
2014-03-08 08:54:33 +00:00
Volker Ruppert
0c4e5eb6c5 Renamed slirp option 'dhcp' to 'dhcpstart' (similar to Qemu)
Ignore case when checking for slirp options
Improved slirp documentation
2014-03-04 18:58:51 +00:00