Commit Graph

189 Commits

Author SHA1 Message Date
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
b4ce6bca2e Fix for the non-Windows SMB support in Slirp. Updated format of temporary
smb.conf to make it work with latest smbd version.
2020-06-07 19:17:07 +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
548f9456e8 Packet logging in text format now controlled by option "pktlog" in slirp config. 2020-05-19 17:55:15 +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
614ecd7455 Some fixes for the vnet module found with TCP / FTP testing code.
Fixed maximum size of an ethernet packet (1460 bytes TCP user data + headers).
Don't activate timer for a new packet if another is still pending.
2020-05-18 19:25:27 +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
1b0845b48a Slirp: Added support for logging packets in text format (disabled by default). 2020-05-07 15:49:54 +00:00
Volker Ruppert
f9da9f9249 Fixed possible buffer overflow (patch by Randy Sommerfeld). 2020-05-06 11:17:34 +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
9b844fc341 Some changes in the 'vnet' networking module.
- Enable packet logging in text format if file name is specified with the
  "script" parameter.
- Don't start RX timer if vnet server returns 0.
- Added TCP header structure for future extensions.
2020-05-02 21:21:53 +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
762d2a35af Some work on the "multiple NICs" support.
- Added support for the E1000 network card similar to ne2k implementation.
- Define BX_NE2K_MAX_DEVS to make the maximum number of devices variable.
2020-03-08 16:45:52 +00:00
Volker Ruppert
d51f6480a0 Some fixes for the "multiple NICs" support.
- Fixed ne2k parameter save function.
- For backward compatibility, card #0 defaults to PCI if the ne2k is assigned
  to at least one PCI slot.
- The "bootrom" parameter is only valid for the PCI card type.
2020-03-04 17:37:34 +00:00
Volker Ruppert
835a745215 Added experimental "multiple NICs" support (currently NE2000 only). Unlike the
old SF patches this solution is compatible with the plugin architecture. The
ne2k plugin is loaded only once and a new ne2k_main_c object creates up to 4
ne2k device objects depending on the config. The new ne2k parameter "card"
specifies the zero-based card number to configure. If not given, the default
is card #0 for compatibility. The new ne2k parameter "type" specifies the bus
it is connected to ("isa" or "pci"). Card #0 defaults to PCI, the others to
ISA. In the PCI slot configuration the ne2k device can be used multiple times
if more than one card is configured.
Related changes:
- removed SMF stuff for ne2k
- always convert device prefix to uppercase (ne2k uses NE2K0 ... NE2K3)
- removed unused BXPN values
- TODO: add multiple NICs support for the E1000
2020-03-02 22:04:10 +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
Volker Ruppert
d1822224a9 Fixed some gcc 9.2 warnings on Windows. 2020-02-06 17:13:01 +00:00
Volker Ruppert
70691fa532 Some fixes in the build system based on Debian patches for 2.6.10.
- The pthread library is not needed at all by the Windows ports.
- Link the ALSA and SDL sound modules only with required library.
- Fixed curses cross-compilation issue found by Debian.
- slirp/cksum.cc: NOTE for Debian.
2019-12-26 19:17:47 +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
32c342eda7 Fix for SF bug #1405 based on a patch for Qemu. 2019-11-11 21:44:38 +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
05f80c2c81 Fixed slirp compilation in MinGW/MSYS.
TODO: Update GTK gui debugger to GTK 3.0 (v2.0 conflicts with wxGTK 3.1).
2019-11-03 12:48:52 +00:00
Volker Ruppert
9ab4b36ec1 Fixed compilation after upgrading Linux host to openSUSE Leap 15.1.
- configure script now supports wxGTK 3.1 (using GTK 3.0).
- added workaround for GDK keysym name change.
- define deprecated WXWIN symbol wxADJUST_MINSIZE for compatibility.
- compilation fix for Linux in the slirp code.
2019-11-02 19:30:39 +00:00
Volker Ruppert
7412ebc07b Added new macros BX_DEBUG_PCI_READ and BX_DEBUG_PCI_WRITE to unify the debug
output of PCI config space handlers.
Banshee: some PCI register fixes.
2018-05-01 15:54:37 +00:00
Volker Ruppert
1e35653b1e Added method to return the PCI device name and improved debug output. 2018-02-18 07:41:42 +00:00
Volker Ruppert
50c1370216 Some work on the PCI devices code.
- Added INT pin init to method init_pci_conf().
- Moved readonly register handling to the common PCI write handler.
- Moved IRQ line reporting to the common PCI write handler.
2018-02-04 18:17:28 +00:00