add dante subscription discovery via arc protocol

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-23 11:30:40 -08:00
parent a157a2a5e4
commit 47b48337b3
6 changed files with 467 additions and 6 deletions

View File

@@ -107,6 +107,7 @@ func (t *Tendrils) processMDNSResponse(ifaceName string, srcIP net.IP, msg *dns.
aRecords := map[string]net.IP{}
srvTargets := map[string]string{}
danteNames := map[string]bool{}
danteARCPorts := map[string]uint16{}
skaarhojNames := map[string]bool{}
for _, rr := range allRecords {
@@ -138,6 +139,9 @@ func (t *Tendrils) processMDNSResponse(ifaceName string, srcIP net.IP, msg *dns.
if target != "" {
srvTargets[name] = target
}
if strings.Contains(r.Hdr.Name, "_netaudio-arc.") && r.Port > 0 {
danteARCPorts[name] = r.Port
}
}
}
if isSkaarhojService(r.Hdr.Name) {
@@ -163,7 +167,8 @@ func (t *Tendrils) processMDNSResponse(ifaceName string, srcIP net.IP, msg *dns.
if ip == nil {
ip = srcIP
}
t.nodes.UpdateDante(name, ip)
arcPort := int(danteARCPorts[name])
t.nodes.UpdateDante(name, ip, arcPort)
}
for name := range skaarhojNames {