My App

Discover on a multi-NIC laptop

Use --interface or --all-interfaces when your dev machine has multiple network interfaces

Discover on a multi-NIC laptop

If your laptop has Wi-Fi + wired Ethernet both up, default go-udap discover only emits broadcasts on the kernel's default-route NIC. If your Squeezebox is on the other interface's subnet, you'll see zero devices.

Goal

Make go-udap discover find a Squeezebox that's reachable only via a non-default NIC

Prerequisites

  • go-udap installed and on PATH
  • Multi-NIC dev machine (Wi-Fi + Ethernet, or multiple Ethernet)
  • macOS or Linux — Windows multi-NIC discovery is not yet supported (tracked as Task #29)

Steps

  1. List your usable interfaces: go-udap interfaces
  2. Either pick one explicitly: go-udap --interface en7 discover
  3. Or fan out across all of them: go-udap --all-interfaces discover

Verification

You should now see the device's MAC in the output. Run tcpdump -i any 'udp port 17784' in another terminal to confirm the broadcast went out the NIC you expected.

Which one should I use?

  • --interface NAME — when you know exactly which NIC reaches the device. Faster (one socket), simpler.
  • --all-interfaces — when you're unsure. Sends concurrently on every interface; the device replies via whichever one reaches it.

The two flags are mutually exclusive. Combining them is a usage error (exit code 1).

What's actually happening on the wire?

See Multi-NIC discovery for the underlying mechanics (IP_BOUND_IF, SO_BINDTODEVICE, SO_REUSEPORT).

On this page