Native LAN scanner for Haiku: a self-contained BeAPI app that walks the local subnet, probes TCP services, and enriches every host with vendor (OUI), reverse DNS, mDNS / DNS-SD, NetBIOS, SNMP and SSDP / UPnP signals. Results are stored on BFS attributes so they survive across runs; a periodic auto-scan keeps the inventory live, and BNotifications fire when a new device joins or a known one drops off the LAN.

Main window — slate HeaderView with state dot on top, device table
with per-column live filters, coloured action rows for SSH / HTTP /
SMB, and the live scan status in the bottom bar.
If LANterna saves you time, consider supporting development:
- End-to-end LAN discovery — sweeps the selected interface's
subnet with parallel non-blocking TCP connects, then runs a
pluggable
Enricherpipeline on every responder to flesh out the row (MAC, vendor, hostname, type, banners). - Pluggable enricher pipeline —
ArpMacEnricher(MAC from the kernel ARP cache),OuiVendorEnricher(vendor from the IEEE OUI table),ReverseDnsEnricher(unicast PTR),MdnsEnricher(mDNS / DNS-SD multicast discovery),NetBiosEnricher(UDP 137 NBSTAT),SnmpEnricher(SNMPv1 sysDescr / sysName),SsdpEnricher(UPnP M-SEARCH for smart-TVs, Sonos, NAS, IGD routers), andTypeInferenceEnricher(device class inferred from the open-port fingerprint). Multicast enrichers query once per scan and cache by IP; unicast ones contact every host with a tight 250-300 ms timeout. - Haiku-native UI —
BColumnListViewdriven device table with per-column live filtering, a coloured port-action child row under every host (click a[ssh]/[http]/[smb]cell to open it through Tracker), and a context menu for ping, traceroute, history and Wake-on-LAN. - Sotoportego-family identity — slate
HeaderViewbanner with theBeacon.hvifbrand tile and a state-coloured dot: grey Ready, amber Scanning %d%%, green Done. N devices found., red No interface or Cannot start scan. The subtitle mirrors what's happening in real time. Easter egg: seven taps on the brand tile in three seconds opens the About box. - BFS-attribute persistence — every device (alias, notes, tags,
favourite / blacklist flags, first/last seen) is written as
LANTERNA:*attributes on a per-host file under~/config/settings/LANterna/devices/, so a re-scan rebuilds the inventory in its previous state andTrackerqueries can find hosts by tag or vendor. - Pivot / Summary window — group the current scan by vendor,
type or open-port set; counts and percentages roll up in a
BColumnListViewyou can keep open alongside the main one. - Interactive topology —
TopologyViewdraws a force-laid graph of every host coloured by inferred role (gateway, web, ssh, smb, printer, default). Nodes are draggable and can be pinned; the gateway always starts at the centre. - Per-host history — each device gets a
HistoryWindowwith a green / red timeline of online intervals, a 7-day x 24-hour heatmap of uptime minutes per hour, and a timestamped event log. Backed by an append-only event file under~/config/settings/LANterna/history/. - Continuous ping —
PingWindowruns a TCP-connect latency probe againsthost:portin a worker thread, drawing the sample history as a live graph with Last / Avg / Min / Max / Loss / Count stats below. - Built-in DNS lookup & traceroute —
DnsLookupWindowresolves any A / AAAA / MX / TXT / SRV / NS / PTR / SOA / CNAME record against a configurable resolver;TracerouteWindowshells out to the systemtracerouteand streams hops into a column view. - Wireless context —
WifiInfodecorates every interface entry in the picker with SSID and signal % when the underlying NIC is wireless, so you know which AP you're scanning from. - Periodic auto-scan + offline detection — a
BMessageRunnerre-runs the scan at the user-set cadence; hosts that were online before and didn't answer this round fire a X is offlineBNotification, and new hosts fire a new device one. The NetworkReplicant shows the live online-count next to the Deskbar clock. - Wake-on-LAN — fire a magic packet at any known MAC straight from the row context menu.
- Native Haiku localization (BCatalog) — every visible string
goes through
Tr(StringId)insrc/ui/Locale.h, backed byBCatalog. The active language follows the system Locale preflet, same as every other native Haiku app. English (source), Italian, Spanish, German and Japanese ship today; translators contribute by editinglocales/<lang>.catkeysand re-runningmake -f Makefile.haiku catalogs install-catalogs— no source edits needed. - CSV export — dump the current filtered view to a CSV that drops cleanly into a spreadsheet for record-keeping or asset audits.
- Haiku R1/beta5 or newer.
- The standard system libraries shipped with Haiku:
libbe,libnetwork,libbsd,libcolumnlistview,libshared,libtracker,libnetapi,libssl,libcrypto. No HaikuDepot packages needed beyond the base install. - For an up-to-date vendor lookup, drop the latest IEEE OUI file at
~/config/settings/LANterna/oui.txtor next to the binary asoui.txt. A trimmed sample (data/oui-sample.txt) ships with the source for the CLI demo.
The project carries two makefiles. The core scanner is plain POSIX and builds anywhere; the BeAPI UI builds on Haiku only.
make # core + lanterna-cli, portable POSIX
make -f Makefile.haiku # binary + Haiku resources, on Haiku
make -f Makefile.haiku catkeys # regenerate locales/en.catkeys
make -f Makefile.haiku catalogs # link every <lang>.catkeys to .catalog
make -f Makefile.haiku install-catalogs # copy catalogs to ~/config/non-packaged/data/locale/catalogs/
make -f Makefile.haiku clean # remove all build artifacts
The Haiku target also compiles LANterna.rdef into LANterna.rsrc
(via rc), injects the resources into the binary (xres) and
registers the MIME type (mimeset), so Tracker shows the proper
Beacon.hvif icon — without those three steps the binary boots
with the generic Haiku icon even though the rdef is present.
The three localization targets (catkeys, catalogs,
install-catalogs) are for translators: catkeys scans the UI
sources with collectcatkeys to refresh locales/en.catkeys (the
English master), catalogs compiles every per-language
<lang>.catkeys into a binary .catalog, and install-catalogs
drops them under ~/config/non-packaged/data/locale/catalogs/x-vnd.atomozero-LANterna/
where BCatalog looks them up at runtime. Without installed
catalogs the app falls back to the English source strings.
./LANterna
From the main window:
- Pick an interface from the dropdown — wireless ones show the SSID and signal strength next to the IP/netmask. All interfaces is offered when more than one is present.
- Click Scan. The header dot turns amber and the subtitle tracks the progress percentage; the device table fills in as responders come back. Each host shows IP, hostname, MAC, vendor, inferred type, open-port summary, first/last seen and tags.
- Open the per-column filter row to live-search by any field.
- Double-click a host to open its details window; double-click a
coloured
[ssh]/[http]/[smb]child row to launch the corresponding URL through Tracker. - Right-click any host for the context menu: Ping, Traceroute, History, Wake-on-LAN, Favourite / Blacklist toggle, Edit alias and notes, Copy IP / MAC.
- Summary opens the pivot window; Topology draws the network graph; DNS opens the standalone resolver; Export writes the current filtered table to a CSV.
The Settings button covers language, the scanned port list, connect timeout, max in-flight probes, auto-scan interval and the banner-grab toggle.
./lanterna-cli --list-interfaces
./lanterna-cli --oui data/oui-sample.txt
The CLI exercises the same core scanner without the UI, useful for smoke-testing the discovery logic on POSIX hosts during development.
src/net/ Low-level networking primitives — Subnet, PortProbe,
Resolver, ArpCache, WakeOnLan, BannerGrabber,
TlsCertGrabber, DnsLookup.
src/model/ DeviceStore (in-memory), DevicePersistence (BFS
attributes) and DeviceHistory (append-only event log
for the per-host History window).
src/enrich/ The Enricher pipeline — OuiDatabase + the seven
concrete enrichers (ARP MAC, OUI vendor, reverse
DNS, mDNS, NetBIOS, SNMP, SSDP, type inference).
src/scan/ Scanner — orchestrates a single scan: enumerate
targets, parallel probe, run enrichers, emit
BMessages.
src/cli/ lanterna-cli — POSIX test driver for the core.
src/ui/ LANterna — the native GUI. Main window stack:
HeaderView (slate banner + state dot + Beacon
tile), MainWindow, DeviceDetailsWindow, PivotWindow,
TopologyView, HistoryWindow, PingWindow,
TracerouteWindow, DnsLookupWindow, SettingsWindow,
NetworkReplicant (Deskbar live count), ScanRunner
(worker-thread driver), WifiInfo (SSID / signal
sidecar), Locale.h (5-language string table).
data/ oui-sample.txt — trimmed IEEE OUI file for the CLI
demo; replace with the real one at
~/config/settings/LANterna/oui.txt for full vendor
coverage.
docs/ Design notes for the L0 discovery layer and the
on-Haiku verification checklist.
| Binary | MIME signature |
|---|---|
LANterna |
application/x-vnd.atomozero-LANterna |
lanterna-cli |
POSIX binary, no Haiku MIME |
- The Scanner is the single source of truth during a scan. The
UI dispatches
kMsgScanStartand otherwise just renders what the worker thread broadcasts:kMsgDeviceFound,kMsgScanProgress,kMsgScanDone. State changes — theHeaderViewdot included — are reactions to those messages on the window's looper thread, never direct mutations from the worker. - Persistence is per-host. Each device lives in its own file
under
~/config/settings/LANterna/devices/with all user metadata stored asLANTERNA:*BFS attributes. That lets Tracker queries find hosts by tag, vendor or favourite flag without LANterna being open, and lets the next scan rebuild the inventory from the filesystem rather than a database. - Multicast enrichers run once per scan.
MdnsEnricherandSsdpEnricherfire a single discovery burst at the start of the scan and populateip -> datacaches; the per-hostEnrich()then just looks up the cache. Unicast enrichers (NetBiosEnricher,SnmpEnricher) contact each host directly with tight timeouts so they don't stall the scan tail. - Locale is a compile-time table.
src/ui/Locale.his a flat[StringId][Language] -> const char*array. Switching language at runtime walks the table; there's no.catkeypipeline and no external dependency. - The
HeaderViewis shared identity with Sotoportego. Same slate background, same dot palette, same HVIF caching strategy. Only the brand tile (Beacon.hvif) and the state enum (kHeaderIdle / Progress / Done / Errormapped to scan phases) differ.
- IPv6 sweep mode for link-local prefixes (today the scanner enumerates IPv4 subnets only; IPv6 traceroute and ping already work per-host).
- Optional raw ICMP sweep behind a Settings flag for users with the privilege to open raw sockets — useful for hosts that silently drop the TCP probe.
- Service-version probes (HTTP server header, SSH banner parse, TLS cert grab is wired but disabled by default).
MetricPill-style freshness badge in the device details window (Online / Recent / Stale / Never), borrowed from Sotoportego's visual vocabulary.- Export to JSON in addition to CSV.
Developer's Note: This software may contain traces of peanuts and LLM. It has been developed with passion for the Haiku platform.