From c2318279bff157c084775138f3010732fd52ba90 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 23 Jan 2026 07:02:47 -0800 Subject: [PATCH] add names for well-known multicast addresses and cap sacn universes Co-Authored-By: Claude Opus 4.5 --- nodes.go | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/nodes.go b/nodes.go index e9ef760..119f7d9 100644 --- a/nodes.go +++ b/nodes.go @@ -144,11 +144,25 @@ func (g *MulticastGroup) Name() string { return g.IP.String() } - if ip[0] == 239 && ip[1] == 255 { - universe := int(ip[2])*256 + int(ip[3]) - return fmt.Sprintf("sacn:%d", universe) + // Well-known multicast addresses + switch g.IP.String() { + case "224.0.0.251": + return "mdns" + case "224.0.1.129": + return "ptp" + case "224.2.127.254": + return "sap" } + // sACN (239.255.x.x, universes 1-63999) + if ip[0] == 239 && ip[1] == 255 { + universe := int(ip[2])*256 + int(ip[3]) + if universe >= 1 && universe <= 63999 { + return fmt.Sprintf("sacn:%d", universe) + } + } + + // Dante audio multicast (239.69-71.x.x) if ip[0] == 239 && ip[1] >= 69 && ip[1] <= 71 { flowID := (int(ip[1]-69) << 16) | (int(ip[2]) << 8) | int(ip[3]) return fmt.Sprintf("dante-mcast:%d", flowID)