new: added interface name and channel on wifi.show

This commit is contained in:
evilsocket 2019-01-19 18:03:31 +01:00
parent f71df54950
commit bf34561a19
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 13 additions and 1 deletions

View file

@ -38,6 +38,16 @@ func getInterfaceName(iface net.Interface) string {
return iface.Name
}
func GetInterfaceChannel(iface string) int {
currChannelLock.Lock()
defer currChannelLock.Unlock()
if curr, found := currChannels[iface]; found {
return curr
}
return 0
}
func SetInterfaceChannel(iface string, channel int) error {
currChannelLock.Lock()
defer currChannelLock.Unlock()