add flags for disabling discovery and controlling logging

This commit is contained in:
Ian Gulliver
2026-01-17 21:02:30 -08:00
parent 477b6e9c99
commit 3c8afa9bdf
4 changed files with 54 additions and 21 deletions

View File

@@ -7,9 +7,20 @@ import (
)
func main() {
iface := flag.String("i", "", "interface to use (default: all interfaces)")
iface := flag.String("i", "", "interface to use")
noARP := flag.Bool("no-arp", false, "disable ARP discovery")
noLLDP := flag.Bool("no-lldp", false, "disable LLDP discovery")
noSNMP := flag.Bool("no-snmp", false, "disable SNMP discovery")
logTree := flag.Bool("log-tree", false, "log full tree on changes")
logReasons := flag.Bool("log-reasons", false, "log addition reasons")
flag.Parse()
t := tendrils.New(*iface)
t := tendrils.New()
t.Interface = *iface
t.DisableARP = *noARP
t.DisableLLDP = *noLLDP
t.DisableSNMP = *noSNMP
t.LogTree = *logTree
t.LogReasons = *logReasons
t.Run()
}