Commit Graph

39 Commits

Author SHA1 Message Date
Volker Ruppert
748b6a1279 Fixed gcc 9.3 warnings in case C++17 support is enabled. 2020-09-02 08:35:44 +00:00
Volker Ruppert
fbc8921b0a Some changes on the "vnet" networking module.
- Added new config file options "host", "dns" and "dhcpstart" (similar to slirp).
- modified bx_vnet_pktmover_c class to be compatible with other modules.
- On TFTP RRQ check file presence directly (fixes iPXE boot).
2020-08-29 17:45:42 +00:00
Volker Ruppert
b558f19338 Prepared vnet server for setting up client hostname from config. 2020-08-24 11:22:37 +00:00
Volker Ruppert
28de72b0ea Added support for setting up the network bootfile in the bxhub utility.
TODO: Implement configurable bootfile in the vnet module.
2020-08-09 17:24:08 +00:00
Volker Ruppert
52d52029dd Fixes in slirp and vnet networking module to make iPXE booting.
- Moved server ID and lease time options to the top of the DHCP reply.
- Increase TFTP buffer size as expected by iPXE.
- TODO: The vnet module still has boot file name hardcoded.
2020-08-08 19:23:35 +00:00
Volker Ruppert
5adcaf2291 Added missing variable initialisation. 2020-06-14 19:30:53 +00:00
Volker Ruppert
401ffecc54 Fixed comparsion (slirp.cc) and MSVC warning (netutil.cc). 2020-06-14 10:16:04 +00:00
Volker Ruppert
4bcc3ba13c Added stubs for IPv6 packets in the slirp and vnet server code and some cleanups. 2020-06-14 08:44:10 +00:00
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
f809d2b08b Improved vnet server DNS support.
- Reverse DNS support implemented.
- Return error status for unsupported format.
2020-06-08 19:55:32 +00:00
Volker Ruppert
4313db542d Some more work on the vnet FTP support.
- Added support for the extended passive mode.
- Handle LIST option to show hidden files (non-WIN32 only).
2020-06-06 19:02:46 +00:00
Volker Ruppert
168e303f82 Some work on the vnet FTP support.
- Added STOU command (store file under a name unique to current directory).
- Improved user login message.
2020-06-05 16:10:12 +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
50ddc67671 Some work on the vnet FTP support: improved file and directory checks. 2020-06-03 13:14:39 +00:00
Volker Ruppert
81026fa96a Some work on the vnet server FTP code.
- Major rewrite of the FTP command handling.
- The LIST command now supports an argument (absolute or relative path).
- Added NLST command (similar to LIST, but file / directory names only).
- The MKD and RMD commands now support absolute paths.
2020-05-31 20:46:33 +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
436766a7db Rewrite of the vnet FTP service "send data" code. Instead of creating a buffer
for the whole file, now the buffer has maximum TCP window size and the file is
read on demand. The directory list is now written to a temporary file that can
be sent with the new code.
2020-05-28 07:31:32 +00:00
Volker Ruppert
30264616f4 Added initial support for uploading files to the vnet FTP server. This is
permitted for user "bochs" only, since "anonymous" has read-only access.
TODO: delete / rename file, create / remove directory.
2020-05-26 18:53:58 +00:00
Volker Ruppert
d339332e8c Fixes for data transfer abort and cleanup on FTP session quit.
- Skip special TELNET sequence required for transfer abort to make it work.
- On FTP quit, unregister data port and free data buffer if necessary.
- Some other small FTP code cleanups.
2020-05-24 17:28:56 +00:00
Volker Ruppert
5c436d061b Partial rewrite of the TCP/IP and FTP host-to-guest data transfer code. 2020-05-24 08:40:35 +00:00
Volker Ruppert
8e7040dddb Some fixes for the vnet server TCP/IP and FTP support.
- TCP and FTP: some connect/disconnect cleanups and fixes.
- FTP: correctly report active transfer mode (no effect on the emulation yet).
2020-05-23 15:49:33 +00:00
Volker Ruppert
d69c7d14dc Two fixes for the bxhub utility.
- Makefile: added missing dependency.
- netutil.cc: removed duplicate include.
2020-05-23 09:04:35 +00:00
Volker Ruppert
ba5a279d61 Some more work on the TCP/IP and FTP support.
- TCP: If a connection is active, forward reset to the service handler.
- FTP: Added support to retrieve the file size.
- FTP: Handle the "file not found" case in RETR and SIZE code.
- FTP: Fixed the logout process.
2020-05-22 19:40:59 +00:00
Volker Ruppert
d5a4d1df48 Some more work on the TCP/IP and FTP support.
- Added support for browsing directories and download from subdirectories.
- Fixes for empty directories and files.
2020-05-22 07:35:35 +00:00
Volker Ruppert
b2b3de60d4 Some more work on the TCP/IP and FTP support.
- TCP: added new method tcpipv4_send_buffer() that can send multiple packets
  up to window size without waiting for ACK.
- TCP: when receiving ACK, the data transfer continues if necessary.
- FTP: list contents of root directory (tested on Linux and Win 10 host).
- FTP: added support for file download from root directory (RETR).
- TODO #1: browse directory tree (CWD, CDUP).
- TODO #2: upload file (STOR).
- TODO #3: file and directory commands (SIZE, DELE, MKD, RMD).
2020-05-21 16:21:49 +00:00
Volker Ruppert
eabcb9e478 Some work on the vnet server code.
- Compilation fixes for MSVC
- TCP: parse option header (not handled yet)
- TCP: RST flag forces disconnect
- FTP: ABOR command stops data transfer
2020-05-21 11:07:38 +00:00
Volker Ruppert
9ff6fddd82 Some work on the TCP/IP and FTP support.
- Added packet counter and use it for the IP id field.
- Added support for closing TCP connection from the server side.
- Added FTP passive mode and LIST demo for testing it.
- Some other small changes.
2020-05-20 19:38:33 +00:00
Volker Ruppert
89759dc371 Implemented dynamic packet handling in the vnet server (TCP can send multiple
packets up to window size without waiting for ACK).
Some other minor cleanups and improvements in the TCP and FTP code.
2020-05-19 12:10:52 +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
780517aeca Added TCP stub to vnet server - returning "Connection refused" for now. 2020-05-03 11:38:16 +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
455c28b3da Fixed compilation error on MSVC (bxhub.exe). 2020-04-12 15:47:11 +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
dbc8f1aa19 Fixed some warnings caused by possibly not enough space for sprintf format. 2019-11-08 13:49:48 +00:00
Volker Ruppert
17abf11e85 Check requested maximum DHCP message size and report if invalid (networking
modules vnet / socket only).
2017-06-18 15:54:54 +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
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