cmake: add ENABLE_BURSTMODE option
All checks were successful
Source release / source-package (push) Successful in 48s

Expose the existing experimental Packet Burst code through a CMake option.

Generate ENABLE_BURSTMODE in config.h from -DENABLE_BURSTMODE instead of
keeping it hard-coded to 0, and print the selected state during configuration.

Also fix the existing nwconn burst dispatch conditional so the source compiles
when ENABLE_BURSTMODE is enabled.

This only makes the existing Packet Burst code build-selectable; it does not
change the default behavior, which remains disabled.
This commit is contained in:
Mario Fetka
2026-05-29 19:12:55 +02:00
parent f10a81566d
commit dd91d45beb
3 changed files with 10 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ INCLUDE(${CMAKE_MODULE_PATH}/MarsNweInstallDirs.cmake)
option(ENABLE_DEBUG "Compile in MARS NWE debug logging code (DO_DEBUG)" OFF)
option(ENABLE_DEBUG_BUILD "Build with debug compiler flags (-g3 -O0 -fno-omit-frame-pointer)" OFF)
option(ENABLE_DEBUG_DOSUTILS "Enable NCP 17/02 debugging support for mars_dosutils" OFF)
option(ENABLE_BURSTMODE "Enable experimental Packet Burst support" OFF)
option(MAINTAINER_BUILD "Enable maintainer-only test helpers and diagnostics" OFF)
option(ENABLE_INTERNAL_RIP_SAP "Should we build Mars Nwe with Internal Router?" ON)
option(ENABLE_SHADOW_PWD "Should we build Mars Nwe with Shadow Password Support?" ON)
@@ -117,6 +118,12 @@ ELSE (ENABLE_DEBUG_DOSUTILS)
SET (MARS_NWE_DEBUG_DOSUTILS "0")
ENDIF (ENABLE_DEBUG_DOSUTILS)
IF (ENABLE_BURSTMODE)
SET (MARS_NWE_ENABLE_BURSTMODE "1")
ELSE (ENABLE_BURSTMODE)
SET (MARS_NWE_ENABLE_BURSTMODE "0")
ENDIF (ENABLE_BURSTMODE)
IF (ENABLE_INTERNAL_RIP_SAP)
SET (MARS_NWE_INTERNAL_RIP_SAP "1")
ELSE (ENABLE_INTERNAL_RIP_SAP)
@@ -202,6 +209,7 @@ message(STATUS "Install DOS utilities: ${MARS_NWE_INSTALL_DOSUTILS}")
message(STATUS "Install new DOS utilities: ${MARS_NWE_INSTALL_NEW_DOSUTILS}")
message(STATUS "Build DOS utilities: ${MARS_NWE_BUILD_DOSUTILS}")
message(STATUS "Maintainer build: ${MAINTAINER_BUILD}")
message(STATUS "Packet Burst support: ${ENABLE_BURSTMODE}")
# put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources

View File

@@ -47,7 +47,7 @@
/* 2 = max. IPX packets = 1470 +30 Byte (1444 Byte RWBuff) */
/* 3 = max. IPX packets = 4130 +30 Byte (4096 Byte RWBuff) */
#define ENABLE_BURSTMODE 0 /* 0 = disable burstmode, 1 = enable burstmode */
#define ENABLE_BURSTMODE @MARS_NWE_ENABLE_BURSTMODE@ /* 0 = disable burstmode, 1 = enable burstmode */
/* still NOT working correct !!!!! */
/* to get Burstmode really enabled, section '6' in conf-file */
/* must be set to a value > 1 (3.12 Server) */

View File

@@ -3237,7 +3237,7 @@ int main(int argc, char **argv)
handle_burst((BURSTPACKET*)readbuff, data_len);
} else
#endif
else if (ncp_type == 0x2121) { /* request from nwbind */
if (ncp_type == 0x2121) { /* request from nwbind */
/* mst:25-Apr-00 */
requestlen = data_len - sizeof(NCPREQUEST);
handle_nwbind_request();