restructure nodes to have interfaces with name, mac, and ips

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-18 08:28:57 -08:00
parent e3bed567ab
commit 09a99064c3
5 changed files with 144 additions and 106 deletions

View File

@@ -68,11 +68,7 @@ func (t *Tendrils) handleLLDPPacket(ifaceName string, packet gopacket.Packet) {
log.Printf("[lldp] %s: mac=%s port=%s name=%s", ifaceName, mac, childPort, systemName)
}
t.nodes.Update(nil, []net.HardwareAddr{mac}, "lldp")
if systemName != "" {
t.nodes.SetName(mac, systemName)
}
t.nodes.Update(mac, nil, childPort, systemName, "lldp")
}
}
}