AminetAminet
Search:
85453 packages online
About
Recent
Browse
Search
Upload
Setup
Services

comm/net/sana2loop.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric iconother icon
No screenshot available
Short:Hardware-free SANA-II loopback device
Author: simond at irrelevant.org (Simon Dick)
Uploader:simond irrelevant org (Simon Dick)
Type:comm/net
Version:1.0
Architecture:m68k-amigaos
Date:2026-07-31
Distribution:Aminet
Download:comm/net/sana2loop.lha - View contents
Readme:comm/net/sana2loop.readme
Downloads:0

sana2loop builds loopback.device, a hardware-free SANA-II network
device for AmigaOS: echo, crossover, and pcap replay/capture modes,
plus companion Shell tools (SanaInfo, SanaDump, SanaSend, SanaConform).
No null/dummy SANA-II device has ever existed before this, despite
being the obvious first tool for testing any network stack, shim, or
driver-consuming software - deterministically, with zero hardware and
zero emulator network support required.

Features
--------
  - Echo mode: a CMD_WRITE is delivered straight back to a matching queued
    CMD_READ (typed, orphan, or a bounded rxqueue), with real SANA-II
    src/dst address semantics.
  - Crossover mode: pair two units so traffic written to one is
    delivered to the other, with real unswapped addressing and
    unicast/broadcast/multicast/promiscuous receive filtering.
  - Real SANA-II buffer-management hooks (S2_CopyToBuff/CopyFromBuff/
    PacketFilter), broadcast/multicast writes and group membership,
    S2_ONEVENT, global/type/special stats, and per-unit config files
    (ENV:/S: sana2loop/unitN.config).
  - Fault injection pipeline, all off by default: packet drop, duplicate,
    truncate, reorder, forced online/offline flapping, and an
    "oversilent" PMTUD black hole - an overlong crossover write
    vanishes silently instead of erroring, so a stack's actual PMTUD
    black-hole detection/recovery can be tested, not just assumed - all
    seeded and reproducible.
  - pcap replay (on-demand or real-time VBlank-scheduled) and pcap
    recording, both driven off a hand-rolled classic pcap reader/writer
    with no host dependency.
  - SANA-II Rev 2/3/4/7 conformance: wider buffer-management hooks
    (S2_CopyToBuff16/32, genuinely invoked, not just accepted),
    S2_GETPEERADDRESS/S2_GETDNSADDRESS, Sana2DeviceQuery.RawMTU, and Rev 7
    DMA hook negotiation (accepted and counted, gracefully never invoked).
  - Companion Shell tools: SanaInfo (open/query/online-offline a unit),
    SanaDump (capture a unit's traffic to a pcap file), SanaSend (replay a
    pcap file's frames onto a unit), SanaConform (probes a unit's SANA-II
    Rev 2/3/4/7 conformance and reports what it finds).
  - Targets plain 68000 and Kickstart 1.3 for the device itself - a test
    tool's value is universality, and nothing here needs more.

Requirements
------------
  - loopback.device: any Amiga, from a stock 68000 upwards, Kickstart 1.3
    (V34) or later, 2 MB RAM minimum. No utility.library, no dos.library
    calls from the unit's own I/O path.
  - SanaInfo/SanaDump/SanaSend/SanaConform: AmigaOS 2.04 (V37) or later
    (CreateMsgPort()/CreateIORequest() are V36+ Exec calls, but V36 itself
    never shipped outside early pre-release hardware, so 2.04 is the
    realistic floor). No additional libraries or archives to install.

Installation
------------
  Copy "loopback.device" to DEVS:. Copy "SanaInfo", "SanaDump", "SanaSend",
  and "SanaConform" to a directory on your PATH (e.g. C:). No reboot is
  required - a device is picked up the next time something opens it by
  name.

  If you also want a real network stack (AmiTCP, AmiTCP_NG, Roadshow) to
  find and use it, additionally copy "loopback.device" to DEVS:Networks/
  - the conventional location a stack's own network configuration expects
  a SANA-II driver in. This is a SEPARATE step, not a replacement:
  OpenDevice() only ever searches plain DEVS: for a bare device name; a
  stack's own config instead opens the full path
  (DEVS:Networks/loopback.device) itself once you point it there.

  Optional per-unit configuration lives in ENV:sana2loop/unit<N>.config
  (falling back to S:sana2loop/unit<N>.config) - see the included
  sana2loop.guide for the full key reference (mode, peer, mtu, rxqueue,
  fault-injection knobs, replay/record).

Quick start
-----------
  SanaInfo 0                          open unit 0, print DEVICEQUERY info
  SanaDump UNIT=0 FILE=capture.pcap   capture unit 0's traffic to a file
  SanaSend UNIT=0 FILE=capture.pcap   replay a pcap file's frames onto
                                       unit 0
  SanaConform 0                       probe unit 0's SANA-II Rev 2/3/4/7
                                       conformance

AI disclosure
-------------
  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. The entire source is
  BSD-licensed and open for review.

Documentation
-------------
  The full protocol reference, per-mode configuration guide, fault
  injection cookbook, and troubleshooting notes are online at
  https://sidick.github.io/sana2loop/ and included as sana2loop.guide in
  this archive (AmigaGuide/MultiView, OS 2.x+) for offline/on-Amiga
  reading -- same source, both forms.

Source and licence
-------------------
  Free and open source, BSD 2-Clause. Full source, documentation and issue
  tracker: https://github.com/sidick/sana2loop


Contents of comm/net/sana2loop.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
drwxr-xr-x  1001/1001        0       0 ****** -lhd- 0000 Jul 31 16:18 sana2loop/
-rw-r--r--  1001/1001      680    1298  52.4% -lh5- 965d Jul 31 16:18 sana2loop/LICENSE
-rwxr-xr-x  1001/1001    15979   28200  56.7% -lh5- 2f6a Jul 31 16:18 sana2loop/SanaConform
-rwxr-xr-x  1001/1001    16224   28088  57.8% -lh5- 566d Jul 31 16:18 sana2loop/SanaDump
-rwxr-xr-x  1001/1001    14999   25912  57.9% -lh5- 2487 Jul 31 16:18 sana2loop/SanaInfo
-rwxr-xr-x  1001/1001    15972   27632  57.8% -lh5- 0f9c Jul 31 16:18 sana2loop/SanaSend
-rwxr-xr-x  1001/1001     9515   16884  56.4% -lh5- dcbe Jul 31 16:18 sana2loop/loopback.device
-rw-r--r--  1001/1001    24967   64550  38.7% -lh5- 4383 Jul 31 16:18 sana2loop/sana2loop.guide
-rw-r--r--  1001/1001     2474    5216  47.4% -lh5- d26c Jul 31 16:18 sana2loop/sana2loop.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         9 files  100810  197780  51.0%            Jul 31 23:18
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>