mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
all: add clients list command to debug Mac discovery
This commit is contained in:
committed by
Cuong Manh Le
parent
61b6431b6e
commit
437fb1b16d
@@ -27,3 +27,20 @@ func (a *arpDiscover) LookupMac(ip string) string {
|
||||
}
|
||||
return val.(string)
|
||||
}
|
||||
|
||||
func (a *arpDiscover) String() string {
|
||||
return "arp"
|
||||
}
|
||||
|
||||
func (a *arpDiscover) List() []string {
|
||||
var ips []string
|
||||
a.ip.Range(func(key, value any) bool {
|
||||
ips = append(ips, value.(string))
|
||||
return true
|
||||
})
|
||||
a.mac.Range(func(key, value any) bool {
|
||||
ips = append(ips, key.(string))
|
||||
return true
|
||||
})
|
||||
return ips
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user