sana2loop¶
A hardware-free SANA-II network device for AmigaOS.
loopback.device gives any network stack, shim, or driver-consuming
software a deterministic test partner with zero hardware and zero
emulator network support required — the obvious first thing to reach
for when testing a TCP/IP stack, a shim, or anything else that talks to
a SANA-II driver.
(Prior art: nullsana, a binary-only virtual SANA-II device from 2000, was found only after sana2loop's first release. sana2loop is open source, runs on Kickstart 1.3, and adds pcap replay/record, fault injection, and conformance tooling.)
It provides three modes on the same device: echo (whatever you write comes straight back to you), crossover (two opens of the device talk to each other, like a virtual null-modem cable), and pcap replay/record (play back a captured trace on real, deterministic timing, or capture whatever a unit actually sees). A configurable fault-injection pipeline — drop, duplicate, truncate, reorder, silently-oversized frames, forced online/offline flaps — lets you test how a stack copes with a bad link, not just a perfect one.
It targets plain 68000 and Kickstart 1.3 — a test tool's value is universality, so there's no reason to demand anything newer. It runs identically on a stock A500 or an accelerated/emulated machine.
Where to start¶
- New user? Read Installation, then Getting Started for a first echo test.
- Configuring a unit? The
Configuration Reference covers every
ENV:sana2loop/unitN.configkey. - Testing against a flaky link? See Fault Injection.
- Replaying or capturing traffic? See Replay and Record.
Documentation¶
| Page | What it covers |
|---|---|
| Installation | Requirements, copying the device and tools into place |
| Getting Started | First OpenDevice(), going online, an echo round-trip |
| Configuration Reference | Every unitN.config key, defaults, and fail-fast rules |
| Echo and Crossover Modes | The two live-traffic modes and how units pair up |
| Replay and Record | Playing back a pcap capture, and recording real traffic to one |
| Fault Injection | Drop/duplicate/truncate/reorder/oversilent/online-flap knobs |
| SanaInfo Reference | The bundled CLI query/online-toggle tool |
| SanaDump and SanaSend | Capturing and sending traffic through a unit from the Shell |
| SANA-II Conformance | Rev 2/3/4/7 support, and the SanaConform probe tool |
| Troubleshooting and FAQ | Common problems and questions |
| Building and Testing | Cross-building the device and running the on-target test suite |
| Changelog | What landed in each milestone |
Developer-facing design documents (the full milestone plan, protocol notes,
and the reasoning behind specific implementation choices) live in the
repository under
docs/.
AI-assisted development¶
Be aware: sana2loop was written largely by an AI coding agent (Anthropic's Claude, via Claude Code), working under human direction, review, and on-hardware/on-emulator testing. Every milestone is validated on-target under the Copperline emulator against both a real Kickstart 1.3 ROM and a bundled, redistributable AROS Kickstart replacement before being considered done — see Building and Testing. The entire source is BSD-licensed and open for review.
License¶
BSD 2-Clause. Copyright © 2026 Simon Dick.