Skip to content

lsnet 0.9.0

Choose a tag to compare

@sanford sanford released this 06 Oct 08:35
· 30 commits to main since this release

What changed since last time

lsnet now remembers each network it scans, so the next scan can say what's different. The list marks devices that are new (+), that moved to another address (→), that were renamed (~), and that were here last time but didn't answer (-, dimmed at the bottom). A line under the results sums it up: since the last scan, 2 hours ago: 1 new, 1 moved. Printed tables get a CHANGE column.

Most home networks use the same addresses, so a network is recognized by its router: the identifier it announces over UPnP (no sudo needed), its MAC, or its .local name. Devices are recognized by MAC, then .local name, then address. Before calling a device missing, lsnet gives its last address a second chance, which wakes most Wi-Fi devices that dozed through the first round, and a device that answers but says nothing about itself keeps the name and type it had.

The history is a JSON file in your user data folder, readable only by you, and nothing leaves your machine. --no-history skips it, and lsnet --forget shows what's in it and deletes it once you agree. The README's "History and privacy" section says exactly what's kept and where.

Results as they arrive, and listening afterwards

The browser now shows devices about a second into the scan and fills in their details as answers come back, with what it's still waiting for in the header (including how far the port probe has got on a large network). Once the scan is done, it keeps listening to Bonjour announcements, and with sudo to ARP, so a phone that wakes up later is added to the list and asked the same questions as everything else. r rescans without clearing the screen.

Devices on the wrong address

lsnet now points out devices whose address doesn't fit, usually the hardest ones to find:

  • link-local: a 169.254.x.x address the device gave itself because no DHCP server answered
  • off-subnet: on your network segment, but using an address from another network, usually a static one left over from somewhere else
  • address conflict: two devices answering for the same address

Their IP is shown in yellow (red for a conflict), with a line under the results and an explanation in the details, and /conflict, /link-local and /off-subnet filter for them. These come from listening to ARP, so they need sudo (or setcap) on macOS and Linux. Without it, link-local devices that answer Bonjour are still found. Windows reports only one MAC per address, so it gets only the Bonjour ones.

Why it thinks so

Every device's details now say what decided its type and where its name came from, like Type from Bonjour airplay model = AppleTV14,1 and Name from AirPlay. If lsnet gets a device wrong, that line points at the rule to fix.

Dante and NDI

Audio and video over IP gear is now recognized: Dante devices (by their Bonjour services, including in safe mode, or an Audinate network interface) as Audio device · Dante, named as they are in Dante Controller, and NDI sources as Video device · NDI. A Mac or PC that's only running Dante or NDI software still shows as a computer.

Try it without a network

lsnet --demo shows a made-up network, with a history and some address problems, without sending a packet. The README's screenshots are taken from it.

Fixes

  • A machine on Wi-Fi and Ethernet at once is now identified at both of its addresses, not just one.
  • Names: when a device's preferred name is machine-generated junk, the next-best name is used instead of none.
  • The MAC vendor database is up to date.

Upgrading from 0.8.0

  • The first scan of each network writes a history file. --no-history turns that off; nothing else changes without it.
  • Once a network has a history, printed tables get a CHANGE column and the browser's list a column of marks, and missing devices are listed under printed output. --json output never includes missing devices.
  • --json has new fields: type_from and name_from on each device, and when they apply, flags, other_macs and other_ips (address problems), first_seen and changes (history), and udn under ssdp. Nothing was removed or renamed.
  • New options: --demo, --no-history and --forget. Set LSNET_HISTORY to keep the history somewhere else.

Download

  • macOS (Apple silicon): brew install sanford/tap/lsnet, or download lsnet-macos-arm64.tar.gz below (signed and notarized)
  • Windows: scoop install sanford/lsnet, or download lsnet-windows-x64.zip below
  • Anywhere with Rust: cargo install lsnet

Full changes: v0.8.0...v0.9.0