[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115159":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":9,"rankLanguage":9,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":16,"hasPages":16,"topics":18,"createdAt":9,"pushedAt":19,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},115159,"mooftcp","matthewmrichter\u002Fmooftcp","matthewmrichter","Drop-in MacTCP replacement for System 6 \u002F 68000 Macs",null,"C",51,1,0,40.9,"MIT License",false,"main",[],"2026-11-14 20:45:21","2026-11-16 12:11:28","# MoofTCP\n\n**A modern, memory-lean replacement for MacTCP on 68k Macs running System 6.**\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n![Platform: System 6 \u002F 68000](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-System%206%20%2F%2068000-lightgrey.svg)\n![Version 1.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-1.0-brightgreen.svg)\n\nMoofTCP is a drop-in replacement for Apple's MacTCP. Programs written for MacTCP run on it unchanged, but\nunderneath it is a fresh TCP\u002FIP stack written from scratch in portable C, with its own control panel, installer\nand DHCP client. It was built for a Mac Classic with 4 MB of RAM, so every byte counts.\n\n![The MoofTCP control panel](docs\u002Fimages\u002Fpanel.png)\n\n## Why?\n\nMacTCP is wonderful, but it is old and closed, and on a 4 MB Mac Classic with a SCSI Wi-Fi\u002FEthernet adapter like\nBlueSCSI it is hungry for memory and awkward to set up. MoofTCP aims, in this order, for:\n\n1. **Reliability.** No hangs, no leaks, no surprises when apps quit.\n2. **Low latency** for interactive use, like typing in a telnet session.\n3. **Throughput**, for handling quasi-modern use cases.\n\n...all while using **no more resident memory than MacTCP does**.\n\n## Features\n\n- **Drop-in compatible.** Implements the MacTCP `.IPP` driver interface (TCP, UDP, ICMP echo) and the `dnrp`\n  name resolver. Your existing MacTCP programs just work.\n- **DHCP or a fixed address.** Pick either in the control panel. Don't need to manage static IP anymore.\n- **MoofTCP Lite.** A build without DHCP that saves about 5 KB of system memory, for tight machines. One\n  installer holds both; a checkbox picks which one.\n- **A friendly installer.** It moves MacTCP's files aside, installs MoofTCP, and its Remove button puts\n  everything back exactly as it was. An interrupted install repairs itself.\n- **MultiFinder-aware.** Quitting an app that had connections open cleans up after it.\n- **Built-in diagnostics.** An optional in-memory log and a small `MoofDiag` tool for bug reports.\n- **A portable core.** The TCP\u002FIP stack in `core\u002F` has no `malloc` and no global state, and is tested on the\n  desktop with sanitizers and fuzzers.\n\n## New in 1.1 (release candidate 1.1rc1)\n\n1.1rc1 is a release candidate. The download on the [Releases](..\u002F..\u002Freleases) page is still 1.0, and the version\nbadge and file names below stay 1.0 until 1.1 is final.\n\nMoofTCP 1.1 is faster than 1.0. Measured on a real Mac Classic (System 6.0.8, 4 MB, BlueSCSI v2 Wi-Fi), timed on\nthe PC: MoofTCP 1.1 with [MoofPort](https:\u002F\u002Fgithub.com\u002Fmatthewmrichter\u002Fmoofport\u002F) 1.1 against 1.0's behaviour (the\nMoofTCP 1.0 engine, with MoofPort at 1.0's settings). The gains come from both together: MoofTCP 1.1's shorter call\npath and MoofPort's `steadyack` timing, which MoofTCP 1.1 switches on. Medians:\n\n|                             | 1.0       | 1.1       |\n| --------------------------- | --------- | --------- |\n| Echo round trip, 1 byte     | 53.6 ms   | 41.4 ms   |\n| Terminal burst, 2,000 bytes | 153.6 ms  | 124.6 ms  |\n| TCP receive, 1 MB           | 45.3 KB\u002Fs | 55.6 KB\u002Fs |\n\nMeasured 2026-11-14 in one session of 10 pairs, with the AppleShare server's Wi-Fi power saving off. These three\nwere better in all 10 pairs (the session the night before gave the same direction). Not significant in this\nsession: TCP send with 4 sends queued (36.7 -> 41.0 KB\u002Fs), one-at-a-time sends (25.2 -> 23.9 KB\u002Fs) and AppleShare\ncopies (too few pairs with the volume mounted). The network was noisy that day: stock MacTCP's one-at-a-time send\nranged from 11 to 40 KB\u002Fs. The figures were measured over Wi-Fi and vary with the network.\n\nWith the DaynaPORT driver the gain is small: MoofTCP leaves DaynaPORT's driver as it is. Echo was about 54.9 ms with\nMoofTCP 1.1 against 57.6 ms with 1.0 (two blocks; the 1.0 figure is from an earlier session with different Wi-Fi\nsettings, so this is not a clean comparison).\n\nAgainst stock MacTCP with the DaynaPORT driver in the same session (3 blocks, medians): MacTCP still answers faster\n(echo 33.6 ms, terminal burst 109.1 ms) and usually sends faster, though its send figures varied widely that day;\nMoofTCP 1.1 with MoofPort receives faster (MacTCP 45.5 KB\u002Fs).\n\n- A shorter path through every MacTCP call, timer tick and packet.\n- With the MoofPort 1.1 driver, MoofTCP switches MoofPort to its `steadyack` timing when it opens the driver. With\n  any other driver it changes nothing.\n- The timer recovers by itself from a lost Time Manager task, with a once-a-second heartbeat as a backup.\n- Resident memory stays below MacTCP's.\n- To go back to 1.0: click **Remove** in the 1.1rc1 installer first, then **Install** in the 1.0 installer, and\n  restart (the 1.0 installer does not replace a newer MoofTCP). Your settings are kept.\n\n[CHANGELOG.md](CHANGELOG.md) has the full list.\n\n## Screenshots\n\n| Installer                                   | MoofTCP Lite panel                            |\n| ------------------------------------------- | --------------------------------------------- |\n| ![The installer](docs\u002Fimages\u002Finstaller.png) | ![The Lite panel](docs\u002Fimages\u002Fpanel-lite.png) |\n\n## Quick start\n\n1. Download `MoofTCP-1.0.dsk`, `MoofTCP-1.0.hqx` or `MoofTCP-1.0.sit` from the\n   [Releases](..\u002F..\u002Freleases) page and get it onto your Mac (a BlueSCSI shared folder works well).\n2. Open **MoofTCP Installer**, leave **Lite version (no DHCP)** unticked, and click **Install**.\n3. Restart the Mac.\n4. Open **Control Panels, MoofTCP**, enter your IP address, mask, router and DNS server (or tick\n   **Get the address by DHCP**), and save.\n5. Restart again. You're online.\n\nTo go back to MacTCP, run the installer and click **Remove**. The `Read Me` file in the release has the\ndetails, including how to switch between MoofTCP and MoofTCP Lite.\n\nStuffIt Lite 3.6 is tested as working for expanding the `.hqx` packages.\n\n### What you need\n\n- A 68k Mac with **System 6.0.8** (the version it was tested on). Please report back if it works on other versions!\n- An Ethernet adapter that provides the `.ENET0` driver, such as a **BlueSCSI v2 WiFi with DaynaPORT**. MoofTCP\n  does not include an Ethernet driver.\n\n## Compatibility\n\n**1.0 results:** tested on a real **Mac Classic** (System 6.0.8, 4 MB, BlueSCSI v2 WiFi with DaynaPORT) and in the\n[Snow](https:\u002F\u002Fgithub.com\u002Ftwvd\u002Fsnow) emulator.\n\n| Program (1.0)           | Result                       |\n| ----------------------- | ---------------------------- |\n| Flynn (telnet terminal) | Works, real Mac and emulator |\n| Wikipedia Reader        | Works, real Mac and emulator |\n| MacTCP Watcher          | Works in the emulator        |\n| NCSA Telnet             | Works in the emulator        |\n| Fetch (FTP)             | Works in the emulator        |\n| TurboGopher             | Works in the emulator        |\n| Eudora                  | Starts; mail was not tried   |\n\n**1.1rc1:** MoofTCP 1.1 ran on the real Mac Classic with the MoofPort driver (two sessions of 10 blocks) and with\nthe DaynaPORT driver (2 blocks), using the telnet-style echo and terminal tests, TCP send and receive, and\nAppleShare alongside. In Snow: the installer (install, switch to MacTCP and back, unattended), MultiFinder runs\nwith two applications (full and Lite), ApiProbe against MacTCP's recorded answers, and the resident-memory check.\nThe programs in the table above were not re-run with 1.1.\n\nHave a program that doesn't work? Please open an issue (see below).\n\n## Memory\n\n|                                                                                                    | MoofTCP       | MoofTCP Lite  |\n| -------------------------------------------------------------------------------------------------- | ------------- | ------------- |\n| Driver code, 1.1rc1                                                                                | 93,746 bytes  | 88,879 bytes  |\n| Driver code, 1.0                                                                                   | 95,623 bytes  | 90,722 bytes  |\n| Resident over the no-network baseline after network use, 1.1rc1 (emulator; MacTCP: 195,046 bytes) | 171,816 bytes | 166,852 bytes |\n| Free system heap after first open, 1.0 (real Mac Classic, single Finder, full build)               | about 30.7 KB | n\u002Fa           |\n\nMultiFinder grows the system heap on demand, so free memory varies more there.\n\n## Something went wrong?\n\nMoofTCP keeps a small diagnostic log in memory. If a program misbehaves but the Mac keeps running, run\n**MoofDiag** right away (it is in the release's diagnostic tools download), and open an issue with the\n`MoofDiag.out` file it writes next to itself, plus a note about what you were doing. Feel free to ask your LLM\nto analyze the codebase and the diagnostic output as well and to submit fix PRs.\n\n## Known limitations\n\n- No IPv6.\n- Tested only with the DaynaPORT and MoofPort Ethernet drivers on System 6.0.8.\n- The timer's once-a-second heartbeat runs only while some program calls `SystemTask`. A program that waits in a\n  synchronous MacTCP call on a quiet network calls nothing, so a lost timer task then waits for the next packet\n  or call.\n- DHCP is basic: no lease RELEASE, no INIT-REBOOT and no address-conflict probe. While it runs, programs cannot\n  use UDP port 68. With no DHCP server, the first open waits about 10 seconds and then fails.\n\n### Network setup note: AppleShare at start-up\n\nAppleShare volumes set to open at start-up can fail to mount. At start-up AppleShare finds the server with\nAppleTalk multicast lookups (4 tries in about 2 seconds, no retry), and on Wi-Fi these are lost far more often than\nnormal traffic. Measured on the test setup: with the server's Wi-Fi power saving on, about 1 in 7 to 1 in 3 boots\nfailed; with it off, 0 of 15 at night but up to 1 in 3 at busy times of day. The stock MacTCP + DaynaPORT driver\nfails the same way, and in an interleaved test MacTCP + MoofPort failed 4 of 10 boots and MoofTCP 1.1 + MoofPort 1\nof 10. It is not caused by MoofTCP or MoofPort. Workaround: open the volume from the Chooser; to make it rarer,\nreduce multicast loss (a wired connection for the server, the server's Wi-Fi power saving off).\n\n## Building from source\n\nYou only need Docker. The pinned [Retro68](https:\u002F\u002Fgithub.com\u002Fautc04\u002FRetro68) cross-compiler image is pulled\nautomatically.\n\n```sh\nscripts\u002Fbuild-mac.sh MoofTCP              # the MoofTCP file -> build-mac\u002Fmoof\u002F\nMT_LITE=1 scripts\u002Fbuild-mac.sh MoofTCP    # MoofTCP Lite -> build-mac-lite\u002F\nscripts\u002Frelease.sh --force 1.0            # one installer with both -> dist\u002FMoofTCP-1.0.{dsk,hqx,sit}\n```\n\n`release.sh` also needs hfsutils, macutils, unar, gcc and Python 3.\n\n### Running the tests\n\nThe portable core and the glue logic are tested on your desktop with gcc and CMake (AddressSanitizer and\nUBSan are on by default):\n\n```sh\ncmake -S . -B build && cmake --build build\nctest --test-dir build --output-on-failure\ncmake -S . -B build-lite -DMT_NO_DHCP=ON   # the Lite configuration\n```\n\nThe emulator tests (Snow) need Apple system software and the BlueSCSI DaynaPORT image. Those are not in this\nrepository and you must supply them yourself; the scripts in `scripts\u002F` (`setup-home.sh`, `golden-stage.sh`) show\nwhat is expected.\n\n## Project layout\n\n```\ncore\u002F      portable TCP\u002FIP stack (no malloc, no globals), host-tested\nmac\u002F       Mac glue: .IPP driver, INIT, resolver, control panel, installer, diagnostic apps\ntests\u002F     host tests (ctest), including fuzzers\nscripts\u002F   build, release, emulator and hardware-session scripts\ntools\u002F     pinned tool versions; tools\u002Fsit is a small StuffIt-format writer\n```\n\n## Contributing\n\nBug reports, compatibility reports (\"program X does\u002Fdoesn't work\") and pull requests are welcome. For code\nchanges, please read [CONTRIBUTING.md](CONTRIBUTING.md) and run the host tests first (see above). `CLAUDE.md` is a\ndetailed map of the code and its rules. Security problems: see [SECURITY.md](SECURITY.md).\n\n## Credits\n\n- [Retro68](https:\u002F\u002Fgithub.com\u002Fautc04\u002FRetro68) for the 68k cross-compiler.\n- [Snow](https:\u002F\u002Fgithub.com\u002Ftwvd\u002Fsnow) for the Mac emulator the tests run in.\n- [BlueSCSI](https:\u002F\u002Fbluescsi.com) and DaynaPORT for the network hardware this was built around.\n- [Claude Code](https:\u002F\u002Fclaude.ai) was used to develop this project, with human planning and testing.\n\n## TODO\n\n- More comprehensive bake-in testing on real hardware as we use it\n- Remake Daynaport similarly (stay tuned for _MoofPort_)\n- Review the BlueSCSI codebase for opportunities to integrate more tightly for better performance\n- There is potential for further algorithm optimization for added performance on smaller or older systems.\n\n## License\n\n[MIT](LICENSE). \"MacTCP\" and \"StuffIt\" are trademarks of their owners and are used here only to describe\ncompatibility. MoofTCP contains no Apple or third-party code; building it uses Apple's interfaces as shipped in\nthe Retro68 toolchain.\n","MoofTCP 是一个为运行 System 6 的 68k 架构 Mac（如 Mac Classic）设计的轻量级 MacTCP 替代 TCP\u002FIP 协议栈。它完全兼容 MacTCP 的 .IPP 驱动接口与 dnrp 域名解析器，支持 DHCP 自动配置、低内存占用（适配 4 MB RAM 系统）、MultiFinder 进程清理及内置诊断功能，核心用可移植 C 编写，无 malloc 和全局状态。适用于经典 Mac 老硬件网络化改造、复古计算场景下的稳定联网需求，尤其适合搭配 BlueSCSI 等现代外设实现 Wi-Fi\u002F以太网接入。",2,"2026-11-24 04:50:32","CREATED_QUERY"]