From 1ca2115f4d630591d8b0eca978ffc1f500f3347d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 03:45:59 +0000 Subject: [PATCH] Build the modem into the Windows app on Linux and macOS The Windows app on macOS (and on Linux) had no built-in modem: CMake turned DMODEM_GUI_EMBED off for winport/, and CI did not check out the D-Modem submodule. The app looked for dmodemd. - CMake: DMODEM_GUI_EMBED is on by default for winport/. winport/ links libdmodem_embed. The data file of the line uses DIR_SEP. - CI: the winport jobs check out the submodule and check that the built-in modem is in the app. The smoke test starts the built-in modem (SIP, no account), and runs dmodemd with builtin=0. - CI: the SwiftUI app builds for arm64 and x86_64 (it was arm64 alone), and the check looks at each architecture. - Docs and the release notes say which builds have the modem. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRTrw1ffsyY5bhTghu1 --- .github/workflows/build.yml | 29 +++++++++++++++++++++------ .github/workflows/nightly.yml | 6 +++--- CMakeLists.txt | 14 +++++++------ README.md | 2 +- docs/building.md | 4 +++- docs/design.md | 17 ++++++++++++---- docs/download.md | 6 +++--- docs/embedded-modem.md | 20 ++++++++++++------- windows/src/link.cpp | 6 ++++-- winport/CMakeLists.txt | 6 ++++++ winport/test/smoke.sh | 37 ++++++++++++++++++++++++++++++++--- 11 files changed, 111 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 065720e..5ac2f3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,12 +172,15 @@ jobs: path: build/win7/windows/dmodem.exe # The Windows app for Linux and macOS (winport/), over the portable - # Win32 layer of clang-retro MFC. + # Win32 layer of clang-retro MFC, with the modem built in + # (external/D-Modem) winport-linux: - name: Windows app on Linux (clang-retro MFC's Win32 layer) + name: Windows app on Linux, the modem built in (clang-retro MFC's Win32 layer) runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/checkout@v4 with: repository: clang-retro/mfc @@ -186,13 +189,16 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends \ - cmake ninja-build clang llvm libx11-dev xvfb xauth + cmake ninja-build clang llvm libx11-dev xvfb xauth \ + libusb-1.0-0-dev libasound2-dev - name: Build run: | cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DDMODEM_GUI_LINUX=OFF -DDMODEM_GUI_WINPORT=ON -DCLANG_RETRO_MFC="$PWD/mfc" \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ cmake --build build --target dmodem-win32 + - name: The built-in modem is in the app + run: nm build/winport/dmodem-win32 | grep -q dmodem_embed_start - name: Smoke test (Xvfb) run: xvfb-run -a winport/test/smoke.sh build/winport/dmodem-win32 - name: Package @@ -203,10 +209,12 @@ jobs: path: dmodem-win32-linux-x86_64.tar.gz winport-macos: - name: Windows app on macOS (clang-retro MFC's Win32 layer) + name: Windows app on macOS, the modem built in (clang-retro MFC's Win32 layer) runs-on: macos-15 steps: - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/checkout@v4 with: repository: clang-retro/mfc @@ -219,6 +227,8 @@ jobs: -DDMODEM_GUI_WINPORT=ON -DCLANG_RETRO_MFC="$PWD/mfc" \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ cmake --build build --target dmodem-win32 -j"$(sysctl -n hw.ncpu)" + - name: The built-in modem is in the app + run: nm build/winport/dmodem-win32 | grep -q dmodem_embed_start - name: Package run: tar -C build/winport -czf dmodem-win32-macos-arm64.tar.gz dmodem-win32 - uses: actions/upload-artifact@v4 @@ -245,17 +255,24 @@ jobs: run: | brew install xcodegen cd macos && xcodegen + # (arm64 and x86_64: with no destination, xcodebuild builds for + # the runner's Mac alone) - name: Build run: | cd macos xcodebuild -project DModem.xcodeproj -scheme DModem \ -configuration Release -derivedDataPath ../build/xcode \ + -destination 'generic/platform=macOS' \ + ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO \ CODE_SIGN_IDENTITY=- build - - name: The built-in modem is in the app + - name: The built-in modem is in the app, for each architecture run: | app=build/xcode/Build/Products/Release/D-Modem.app/Contents/MacOS/D-Modem lipo -archs "$app" - nm "$app" | grep -q dmodem_embed_start + for arch in arm64 x86_64; do + lipo "$app" -verify_arch "$arch" + nm -arch "$arch" "$app" | grep -q dmodem_embed_start + done # (ditto keeps the bundle's symbolic links and executable bits) - name: Package run: ditto -c -k --keepParent build/xcode/Build/Products/Release/D-Modem.app D-Modem-macos.zip diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1ec3979..4935980 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -80,9 +80,9 @@ jobs: echo "| \`dmodem-win98.exe\` | The Windows app with the modem built in, for Windows 98 SE, ME, 2000 and later (on msvcrt.dll) |" echo "| \`dmodem-win7.exe\` | The Windows app for Windows 7 and later, with the modem built in |" echo "| \`dmodem-gui-linux-x86_64.tar.gz\` | The Linux app (GTK 4), x86_64. It needs GTK 4, libadwaita, PulseAudio and libsndfile. Its files are in \`usr/\`: extract it into \`/\`, for example with \`sudo tar -xzf dmodem-gui-linux-x86_64.tar.gz -C /\` |" - echo "| \`D-Modem-macos.zip\` | The macOS app (SwiftUI), arm64 and x86_64, macOS 13 and later. Not notarized: right-click the app and select Open |" - echo "| \`dmodem-win32-linux-x86_64.tar.gz\` | The Windows app on Linux (X11), x86_64 |" - echo "| \`dmodem-win32-macos-arm64.tar.gz\` | The Windows app on macOS, arm64 |" + echo "| \`D-Modem-macos.zip\` | The macOS app (SwiftUI) with the modem built in, arm64 and x86_64, macOS 13 and later. Not notarized: right-click the app and select Open |" + echo "| \`dmodem-win32-linux-x86_64.tar.gz\` | The Windows app on Linux (X11) with the modem built in, x86_64 |" + echo "| \`dmodem-win32-macos-arm64.tar.gz\` | The Windows app on macOS with the modem built in, arm64 |" echo "| \`SHA256SUMS\` | The SHA-256 of each file |" if [ -f missing ]; then echo diff --git a/CMakeLists.txt b/CMakeLists.txt index a2a7ef3..e994cdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,9 @@ # With DMODEM_GUI_WINPORT, the Windows app also builds for Linux and # macOS, over clang-retro MFC's portable Win32 layer (winport/). # With DMODEM_GUI_EMBED, the Linux app, the Windows app (Windows 95 and -# later) and the macOS app have the modem in them (libdmodem_embed -# from the D-Modem submodule, external/D-Modem): they need no dmodemd. +# later), the macOS app and the Windows app on Linux and macOS have the +# modem in them (libdmodem_embed from the D-Modem submodule, +# external/D-Modem): they need no dmodemd. # For the macOS app, CMake writes macos-embed.xcconfig # (cmake/MacosEmbed.cmake). cmake_minimum_required(VERSION 3.16) @@ -21,16 +22,17 @@ option(DMODEM_GUI_WINPORT "Build the Windows app for Linux or macOS (winport/)" set(CLANG_RETRO_MFC "" CACHE PATH "A clang-retro MFC checkout, for DMODEM_GUI_WINPORT") # the modem built in (docs/embedded-modem.md): the Linux, macOS and -# Windows apps, when the submodule is there (git submodule update --init) +# Windows apps, and the Windows app on Linux and macOS (winport/), when +# the submodule is there (git submodule update --init) set(DMODEM_GUI_DMODEM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/D-Modem CACHE PATH "The D-Modem tree, for DMODEM_GUI_EMBED") # (all the Windows builds: clang-retro's win32-picolibc, the Windows 95 # build, has libc++ for the modem's C++17, as win98 and win7 do) set(_embed_default OFF) if(EXISTS ${DMODEM_GUI_DMODEM_DIR}/CMakeLists.txt) - if(UNIX AND NOT APPLE AND DMODEM_GUI_LINUX AND NOT DMODEM_GUI_WINPORT) + if(UNIX AND NOT APPLE AND (DMODEM_GUI_LINUX OR DMODEM_GUI_WINPORT)) set(_embed_default ON) - elseif(APPLE AND NOT DMODEM_GUI_WINPORT) + elseif(APPLE) set(_embed_default ON) elseif(WIN32) set(_embed_default ON) @@ -38,7 +40,7 @@ if(EXISTS ${DMODEM_GUI_DMODEM_DIR}/CMakeLists.txt) endif() option(DMODEM_GUI_EMBED "Build the modem into the app (libdmodem_embed)" ${_embed_default}) -if(DMODEM_GUI_EMBED AND (WIN32 OR APPLE OR DMODEM_GUI_LINUX)) +if(DMODEM_GUI_EMBED AND (WIN32 OR APPLE OR DMODEM_GUI_LINUX OR DMODEM_GUI_WINPORT)) if(NOT EXISTS ${DMODEM_GUI_DMODEM_DIR}/CMakeLists.txt) message(FATAL_ERROR "DMODEM_GUI_EMBED: no D-Modem in " "${DMODEM_GUI_DMODEM_DIR} (git submodule update --init)") diff --git a/README.md b/README.md index 7323f1c..81dafa6 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ libdmodemctl. Thus they operate in the same way. - **Call Stats**: the rate, modulation, error control and line figures of the last call (AT#UD, ATI11) - **Line settings**: a SIP account, a USB modem, or a modem that already runs (dmodemd, or a hardware modem such as the MultiTech MT9234MU) - **Windows 95 and later**: plain Win32, built with [clang-retro](https://clang-retro.github.io/). The modem is built in on each Windows. The app can also connect to a modem through TCP or a COM port -- **The Windows app on Linux and macOS**: the same Win32 code, built over the portable Win32 layer of [clang-retro MFC](https://github.com/clang-retro/mfc). It starts dmodemd, or connects to a modem through TCP or a COM port. Refer to "The Windows app on Linux and macOS" in [Design](docs/design.md) +- **The Windows app on Linux and macOS**: the same Win32 code, built over the portable Win32 layer of [clang-retro MFC](https://github.com/clang-retro/mfc). It has the built-in modem. It can also start dmodemd, or connect to a modem through TCP or a COM port. Refer to "The Windows app on Linux and macOS" in [Design](docs/design.md) | | Windows | macOS | Linux | | --- | --- | --- | --- | diff --git a/docs/building.md b/docs/building.md index d07d0be..d38c939 100644 --- a/docs/building.md +++ b/docs/building.md @@ -44,7 +44,9 @@ is necessary for the built-in modem. Then use `brew install xcodegen && cd macos && xcodegen && open DModem.xcodeproj`. The Windows app on Linux or macOS: get [clang-retro MFC](https://github.com/clang-retro/mfc), -clang and `llvm-rc` (on macOS, `brew install llvm`). Then: +clang and `llvm-rc` (on macOS, `brew install llvm`). For the built-in +modem, get the D-Modem submodule (`git submodule update --init`). On +Linux, also install `libusb-1.0-0-dev` and `libasound2-dev`. Then: cmake -S . -B build -DDMODEM_GUI_WINPORT=ON -DCLANG_RETRO_MFC=/path/to/mfc \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ diff --git a/docs/design.md b/docs/design.md index 88e21b1..a42b2b2 100644 --- a/docs/design.md +++ b/docs/design.md @@ -556,12 +556,21 @@ code is the same as on Windows. no `SHGetFolderPath`. - The line is dmodemd by default. The layer tells the app that Windows is version 5, and on Windows the app then uses a COM port by default. - - dmodemd is `dmodemd` next to the app, or else on the `PATH`. + - dmodemd is `dmodemd` next to the app, or else on the `PATH`. The app + starts dmodemd only when the built-in modem is off (`builtin=0`). +- With the D-Modem submodule, the app has the built-in modem + (`DMODEM_GUI_EMBED`), as the Windows app on Windows has it. The layer's + `SOCKET` is a POSIX file descriptor, so `WSAAsyncSelect` works with the + socket that `libdmodem_embed` gives. The data file of the line is + `dmodem0.data` in the settings folder. - SSH uses `~/.ssh` and `/` in paths, because libssh uses POSIX paths on these systems. - The layer changes a COM port name to a device: `COM1` is `/dev/ttyS0`. - CI builds the app on Linux and macOS. On Linux, `winport/test/smoke.sh` - starts the app in Xvfb two times: with a TCP line, and with a dmodemd - that the app starts (`winport/test/dmodemd`, a test dmodemd). Each time, + starts the app in Xvfb three times: with a TCP line, with a dmodemd + that the app starts (`winport/test/dmodemd`, a test dmodemd), and with + the built-in modem on a SIP line with no account. For the first two, the test makes sure that the app stays up and sends AT commands to a - test modem. + test modem. For the third, the test makes sure that the app stays up + and that the built-in modem writes its data file. On Linux and macOS, + CI also makes sure that the built-in modem is in the app. diff --git a/docs/download.md b/docs/download.md index 3a75fe2..38f6831 100644 --- a/docs/download.md +++ b/docs/download.md @@ -16,10 +16,10 @@ When `main` has no new commits, the release does not change. | Windows 95, 98, ME, NT 4.0 and later | [`dmodem-win9x.exe`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win9x.exe) | The Windows app with the built-in modem. It needs no C runtime DLL. Windows 95 needs Winsock 2. | | Windows 98 SE, ME, 2000 and later | [`dmodem-win98.exe`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win98.exe) | The Windows app with the built-in modem, on `msvcrt.dll`. | | Windows 7 and later | [`dmodem-win7.exe`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win7.exe) | The Windows app with the built-in modem. | -| macOS 13 and later | [`D-Modem-macos.zip`](https://github.com/D-Modem/gui/releases/download/nightly/D-Modem-macos.zip) | The macOS app (SwiftUI), for arm64 and x86_64. | +| macOS 13 and later | [`D-Modem-macos.zip`](https://github.com/D-Modem/gui/releases/download/nightly/D-Modem-macos.zip) | The macOS app (SwiftUI) with the built-in modem, for arm64 and x86_64. | | Linux, x86_64 | [`dmodem-gui-linux-x86_64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-gui-linux-x86_64.tar.gz) | The Linux app (GTK 4). | -| Linux, x86_64 (X11) | [`dmodem-win32-linux-x86_64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-linux-x86_64.tar.gz) | The Windows app on Linux. | -| macOS, arm64 | [`dmodem-win32-macos-arm64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-macos-arm64.tar.gz) | The Windows app on macOS. | +| Linux, x86_64 (X11) | [`dmodem-win32-linux-x86_64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-linux-x86_64.tar.gz) | The Windows app on Linux, with the built-in modem. | +| macOS, arm64 | [`dmodem-win32-macos-arm64.tar.gz`](https://github.com/D-Modem/gui/releases/download/nightly/dmodem-win32-macos-arm64.tar.gz) | The Windows app on macOS, with the built-in modem. | | All | [`SHA256SUMS`](https://github.com/D-Modem/gui/releases/download/nightly/SHA256SUMS) | The SHA-256 of each file. | If a file is not in the release, the newest build did not make it. The diff --git a/docs/embedded-modem.md b/docs/embedded-modem.md index 9f0aa99..eeb47be 100644 --- a/docs/embedded-modem.md +++ b/docs/embedded-modem.md @@ -1,8 +1,9 @@ # The built-in modem -The Linux app, the macOS app and the Windows app (Windows 98 SE and -later) have the D-Modem modem in them. Thus, these apps do not need a -separate `dmodemd`. This includes the Windows 95 build. +The Linux app, the macOS app, the Windows app (Windows 98 SE and later) +and the Windows app on Linux and macOS have the D-Modem modem in them. +Thus, these apps do not need a separate `dmodemd`. This includes the +Windows 95 build. ## What it does @@ -49,7 +50,10 @@ On macOS: On Windows, the Line Settings dialog does not have this setting yet. Close the app, and add this line to the `[line]` section of -`%APPDATA%\D-Modem\dmodem.ini`: +`%APPDATA%\D-Modem\dmodem.ini` (Windows), `~/.config/D-Modem/dmodem.ini` +(the Windows app on Linux) or +`~/Library/Application Support/D-Modem/dmodem.ini` (the Windows app on +macOS): builtin=0 @@ -64,8 +68,8 @@ The D-Modem source is a git submodule in `external/D-Modem`. To get it: If the submodule is there, CMake builds the built-in modem (`DMODEM_GUI_EMBED`, on by default) for the Linux app, the macOS app, and the Windows app with the clang-retro configurations `win32-picolibc` (the -Windows 95 build), `win98`, `winme`, `win7` and later. It is off for the -Windows app on Linux and macOS (`DMODEM_GUI_WINPORT`). To build the app with no built-in +Windows 95 build), `win98`, `winme`, `win7` and later, and for the Windows +app on Linux and macOS (`DMODEM_GUI_WINPORT`). To build the app with no built-in modem, use `-DDMODEM_GUI_EMBED=OFF`. For a USB line and an ALSA line, also install `libusb-1.0-0-dev` and `libasound2-dev`. @@ -95,7 +99,9 @@ Windows and macOS, the build links libusb (LGPL-2.1) statically, as | Windows 98 SE and later | Done (`win98` build). It builds, and its imports agree with Windows 98 SE. It is not tested on Windows or Wine yet. | | Windows 7 and later | Done (`win7` build). It builds. It is not tested on Windows or Wine yet. | | Windows 95, NT 4.0 and later | Done (`win32-picolibc` build). It builds, and its imports agree with Windows 95 and NT 4.0. It is not tested on Windows or Wine yet. Refer to "Windows 95" below. | -| macOS | Done. CI builds it and checks that the library is in the app. It is not tested on a Mac yet. | +| macOS | Done. CI builds it for arm64 and x86_64, and checks that the library is in the app for each architecture. It is not tested on a Mac yet. | +| The Windows app on Linux | Done. CI builds it, checks that the library is in the app, and starts the built-in modem in Xvfb (`winport/test/smoke.sh`). | +| The Windows app on macOS | Done (arm64). CI builds it and checks that the library is in the app. It is not tested on a Mac yet. | ### Windows 95 diff --git a/windows/src/link.cpp b/windows/src/link.cpp index 7bc8862..2717bee 100644 --- a/windows/src/link.cpp +++ b/windows/src/link.cpp @@ -9,7 +9,8 @@ * Only what Windows 95 has: Winsock 1.1 (WSAAsyncSelect), anonymous * pipes read with PeekNamedPipe, and a COM port read on the timer. * - * With the modem built in (DMODEM_GUI_EMBED, Windows 98 SE and later), + * With the modem built in (DMODEM_GUI_EMBED: Windows 98 SE and later, + * and the Windows app on Linux and macOS), * the dmodemd line starts no dmodemd: libdmodem_embed runs the modem in * a thread of the app, and gives a connected socket as its DTE. The * thread's log lines and its end come to the main window as @@ -438,7 +439,8 @@ static bool start_embedded() /* the line's measurements, kept from call to call */ char data[MAX_PATH]; app_data_dir(data, sizeof(data) - 16); - strcat(data, "\\dmodem0.data"); + /* (the library opens it with the C library: "/" on Linux and macOS) */ + strcat(data, DIR_SEP "dmodem0.data"); e.data_file = data; if (!embed) embed = dmodem_embed_new(); diff --git a/winport/CMakeLists.txt b/winport/CMakeLists.txt index 64fcbfe..26085f6 100644 --- a/winport/CMakeLists.txt +++ b/winport/CMakeLists.txt @@ -78,6 +78,12 @@ if(TARGET dmodemssh) target_link_libraries(dmodem-win32 PRIVATE dmodemssh) target_compile_definitions(dmodem-win32 PRIVATE DMODEM_HAVE_SSH) endif() +# the modem built in (libdmodem_embed, DMODEM_GUI_EMBED): the dmodemd +# line starts no dmodemd (windows/src/link.cpp) +if(DMODEM_GUI_EMBED AND TARGET dmodem_embed) + target_link_libraries(dmodem-win32 PRIVATE dmodem_embed) + target_compile_definitions(dmodem-win32 PRIVATE DMODEM_GUI_EMBED) +endif() if(APPLE) target_link_libraries(dmodem-win32 PRIVATE "-framework Cocoa" pthread) else() diff --git a/winport/test/smoke.sh b/winport/test/smoke.sh index a5aacfa..fc73da5 100755 --- a/winport/test/smoke.sh +++ b/winport/test/smoke.sh @@ -4,8 +4,13 @@ # 1. With a TCP line (127.0.0.1:2323) to a test modem. # 2. With a dmodemd that the app starts: the test dmodemd in this # folder, found on the PATH, through a pipe (CreatePipe, -# CreateProcess with STARTF_USESTDHANDLES and PeekNamedPipe). -# Each time, the app must stay up and send its first AT commands. +# CreateProcess with STARTF_USESTDHANDLES and PeekNamedPipe). The +# built-in modem is off for this run (builtin=0). +# 3. With the built-in modem (DMODEM_GUI_EMBED), on a SIP line with no +# account. The modem must start: it writes the data file of the +# line in the settings folder. +# Each time, the app must stay up. Runs 1 and 2 must send the first AT +# commands of the app. # # DISPLAY=:99 winport/test/smoke.sh build/winport/dmodem-win32 set -eu @@ -43,10 +48,36 @@ run() { pid= } +# run_builtin INI: starts the app with this settings file, and waits for +# the data file of the built-in modem +run_builtin() { + rm -rf "$tmp/home" + dir="$tmp/home/.config/D-Modem" + mkdir -p "$dir" + printf '%b' "$1" > "$dir/dmodem.ini" + HOME="$tmp/home" XDG_CONFIG_HOME= WINPORT_BACKEND=x11 "$app" & + pid=$! + i=0 + while [ $i -lt 20 ] && [ ! -e "$dir/dmodem0.data" ]; do + sleep 1 + kill -0 $pid 2>/dev/null || { echo "FAIL (builtin): the app stopped"; exit 1; } + i=$((i + 1)) + done + [ -e "$dir/dmodem0.data" ] || + { echo "FAIL (builtin): the built-in modem did not start"; exit 1; } + sleep 2 + kill -0 $pid 2>/dev/null || { echo "FAIL (builtin): the app stopped"; exit 1; } + echo "builtin: the built-in modem started" + kill $pid + wait $pid 2>/dev/null || true + pid= +} + python3 "$here/fake_modem.py" 2323 "$tmp/tcp.log" & modem=$! sleep 1 run tcp '[line]\nline=1\ntcp=127.0.0.1:2323\n' # (a USB modem: dmodemd needs no SIP account for it) -run dmodemd '[line]\nline=0\nusb=test0\n' +run dmodemd '[line]\nline=0\nbuiltin=0\nusb=test0\n' +run_builtin '[line]\nline=0\nsip-anonymous=1\n' echo "PASS"