refactor to per-node snmp polling and immediate arp dump

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-22 23:09:54 -08:00
parent d2a09250d0
commit c3ed8e30e3
4 changed files with 94 additions and 53 deletions

5
arp.go
View File

@@ -15,8 +15,6 @@ func (t *Tendrils) pollARP(ctx context.Context) {
ticker := time.NewTicker(30 * time.Second)
defer ticker.Stop()
t.readARPTable()
for {
select {
case <-ctx.Done():
@@ -35,7 +33,6 @@ type arpEntry struct {
func (t *Tendrils) readARPTable() {
entries := t.parseARPTable()
localNode := t.getLocalNode()
for _, entry := range entries {
@@ -65,7 +62,7 @@ func (t *Tendrils) parseARPTable() []arpEntry {
}
func (t *Tendrils) parseARPDarwin() []arpEntry {
cmd := exec.Command("arp", "-a")
cmd := exec.Command("arp", "-an")
output, err := cmd.Output()
if err != nil {
return nil