add flags for disabling discovery and controlling logging
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user