Commit Graph

85 Commits

Author SHA1 Message Date
Volker Ruppert
e2823889de Fixed some MSVC warnings. 2024-08-21 11:11:59 +02:00
Volker Ruppert
5c4f964b40 Fixed some issues related to the GTK version of the gui debugger.
- Fixed compilation error in case USB debugger is also present.
- Fixed segfault on exit exposed with gui debugger, but caused by slirp.
- Fixed some format warnings.
- Added some new code for GTK 3.0 to fix some of the deprecated warnings
  (to be continued).
2024-07-16 20:45:43 +02:00
Volker Ruppert
87c3e4be79 Changed version of libslirp source to 4.8.0. 2024-05-22 17:06:19 +02:00
Volker Ruppert
fe390c3921 Builtin slirp: Last set of updates from libslirp 4.8.0. 2024-05-22 17:02:57 +02:00
Volker Ruppert
da41022ee2 Builtin slirp: Some more updates from libslirp and warning fixes. 2024-05-20 18:37:24 +02:00
Volker Ruppert
ccfdb05e29 Builtin slirp: First set of updates from recently released libslirp 4.8.0.
- icmpv6: added echo request forwarding support
- tftp: fixed use-after-free and added cleanup code
- eth: pad ethernet frames to 60 bytes
2024-05-20 12:00:59 +02:00
Volker Ruppert
16e5f5828b Builtin slirp: Added some replacement macros for glib ones.
Now slirp_new() checks correctness of config settings.
Some other small additions and cleanups.
2024-05-19 18:32:18 +02:00
Volker Ruppert
b76ead90ed Builtin slirp: several fixes and additions.
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.
2024-05-18 23:14:45 +02:00
Volker Ruppert
c5435aef15 Improved builtin slirp debug message support.
All DEBUG_* messages now ported from libslirp and connected to the Bochs
logfunctions method ldebug().
Function slirp_warning() renamed to slirplog_error() (TODO: it should also be
able to handle arguments and replace the fprintf(stderr, ...) stuff).
2024-05-18 16:00:07 +02:00
Volker Ruppert
9e9e1f5e28 Some additions for the builtin slirp support.
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).
2024-05-17 20:00:53 +02:00
Volker Ruppert
64e4671c00 Builtin slirp: Added IPv6 support from libslirp code.
TODO: replacements for glib function, debug support, code cleanup.
2024-05-16 23:31:47 +02:00
Volker Ruppert
7dd1a7be9e Big update of builtin slirp networking support (IPv4 only).
Update of existing files based on libslirp 4.7.0 code. It compiles and works
on Linux (gcc 10.4) and Windows (mingw/msys with gcc 14 and VS2019).
Functionality tested on both platforms with Linux guest OS (Firefox shows website).
Next step will be the start of the IPv6 integration.
2024-05-14 20:48:17 +02:00
Volker Ruppert
91c7c1c50a Automatic tab2space changes. 2024-05-13 22:06:12 +02:00
Volker Ruppert
eb477d7bb2 Some work on the builtin slirp core.
- Updated function arp_input() and related code.
- Updated get_dns_addr() functions for 3 different platforms (Apple code untested).
- Started updating IPv6 header file for C++ compatibilty (to be continued).
- Some other small updates.
2024-05-09 11:29:32 +02:00
Volker Ruppert
8a30642092 Continued updating builtin slirp code (no functional changes).
- Some variable type name changes.
- DEBUG code changes (not yet usable).
- Comment additions and tab-to-space changes.
2024-05-07 19:47:57 +02:00
Volker Ruppert
5489f18ff2 Some work on builtin slirp header files.
- Get rid of slirp_config.h.
- Added ip6_icmp.h (not yet used).
- Updates in some other headers.
- Added c++ static_assert for structure size checking at compile time.
- Updated Makefile dependencies and VS2019 project files.
2024-05-05 20:00:45 +02:00
Volker Ruppert
a684734975 Next set of updates from libslirp.
- Started implementing guest forwarding feature.
- Updated most of socket.h.
- Added if_mtu / if_mru handling.
- Cleaned up MIN / MAX defines.
2024-05-05 12:27:12 +02:00
Volker Ruppert
94f6336d15 Continued updating builtin slirp from libslirp.
- Cleaned up system includes in slirp.h and removed most of the HAVE_* defines.
- Renamed exec_list to guestfwd_list and removed ex_pty member.
- Using type "char *" instead of "caddr_t".
2024-05-03 20:58:46 +02:00
Volker Ruppert
74df052eea Updated slirp polling functions from libslirp. 2024-05-02 23:30:48 +02:00
Volker Ruppert
b0f238af76 Continued updating slirp code from libslirp (no functional changes). 2024-04-29 22:38:10 +02:00
Volker Ruppert
47f9e4bc12 Builtin slirp: Continued updating from libslirp code.
Processed chksum.cc and dnssearch.cc.
Removed obsolete / unused stuff from compat.h and slirp_config.h.
2024-04-28 21:05:41 +02:00
Volker Ruppert
afba2c932e Builtin slirp: Now util.cc replaces compat.cc completely. 2024-04-28 14:22:51 +02:00
Volker Ruppert
58f44900de Builtin slirp: Removed QTAILQ* stuff and some other cleanups. 2024-04-28 10:43:00 +02:00
Volker Ruppert
c6b7961799 Some more work on builtin slirp - no functional changes yet.
Added all of the SlirpCb and SlirpConfig structures from libslirp.
2024-04-26 22:40:12 +02:00
Volker Ruppert
c5fd56558f Builtin slirp: compilation fixes for VS2019 and Cygwin.
- VS2019 needs C++20 standard to be set.
- Some Cygwin related additions in util.cc.
- slirp_ssize_t definition and usage fixed.
- changed include position of compat.h in slirp.h.
2024-04-25 21:10:48 +02:00
Volker Ruppert
8c81464156 Updated builtin slirp TFTP support from libslirp code.
Added most of ip6.h, util.c and util.h files (except glib stuff).
Related changes in several files.
2024-04-24 22:55:03 +02:00
Volker Ruppert
7e3edfe7d9 Continued updating builtin slirp from libslirp code.
- Updated arp_table.cc (except debug code).
- Updated bootp.cc (Bochs extensions still present).
- Related changes in other files.
2024-04-21 20:35:27 +02:00
Volker Ruppert
aa529a42f6 Fixed slirp compilation issues related to inet_aton(). 2024-04-21 13:13:36 +02:00
Volker Ruppert
f1259413fb Continued work on builtin slirp networking support.
- Modified info / error log message handling.
- Renamed insque / remque functions using "slirp_" prefix.
- Removed useless SVN ID from most file headers and add license specifier instead.
2024-04-21 11:27:51 +02:00
Volker Ruppert
fa5c5ebe88 Started updating builtin slirp from libslirp code (callback support).
Added callbacks send_packet() and clock_get_ns().
2024-04-19 22:18:29 +02:00
Volker Ruppert
a290ce33e0 Builtin slirp now also returns "local" as the domain name.
Some other cleanups in bootp_reply().
2024-04-18 18:08:00 +02:00
Volker Ruppert
4c7e3d6f2f Fixed size of TFTP option reply. 2024-04-16 20:23:32 +02:00
Volker Ruppert
0f6287b592 Applied suggested fix for slirp TFTP support to fix issue #305. 2024-04-16 17:54:59 +02:00
Volker Ruppert
5376f129ee Some work on the slirp networking code.
- Added support for optional TFTP server name in builtin slirp and libslirp.
- Added default domain name for libslirp.
2024-04-14 11:04:01 +02:00
Volker Ruppert
0ff2905998 Added support for using external slirp library instead of builtin one.
- Added configure option --enable-using-libslirp to turn on the search for the
  library. In config.h BX_HAVE_LIBSLIRP is set to 1 if found. The network Makefile
  is set up accordingly. If not enabled or not found, the builtin slirp code is used.
- Moved samba server code and host forwarding code to eth_slirp.cc.
- Modified builtin slirp API to reduce differences.
- NOTE: IPv6 support present in libslirp is not yet enabled (needs more testing).
- TODO: Update builtin slirp code based on libslirp 4.7.0 code.
2024-04-07 19:57:25 +02:00
Biswapriyo Nath
e1d67d9ce0
Fix checking Android platform with __ANDROID__ macro (#299)
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
2024-04-06 23:18:01 +02:00
Volker Ruppert
68ff4be0b8 Fixed a memory leak in the slirp code. 2023-11-24 22:35:43 +01:00
Volker Ruppert
27c120154b Fixed a GCC warning and some MSVC warnings. 2021-02-27 20:53:10 +00:00
Volker Ruppert
093b274b53 Changed bx_bool to bool type in some more device and the developer doc. 2021-02-01 12:42:12 +00:00
Volker Ruppert
87d660e652 Fixed some MSVC warnings. 2020-11-30 08:50:22 +00:00
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
0e72952798 Fixed hostname reporting in DHCP reply. 2020-08-23 10:54:16 +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
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
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
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
Volker Ruppert
32c342eda7 Fix for SF bug #1405 based on a patch for Qemu. 2019-11-11 21:44:38 +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