Debian Codegraph @

network/net_wifi.go

raw symbols SCIP
1 package networkscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/
2
3 import (
4 "syncscip-go gomod github.com/golang/go/src go1.16 sync/"
5 )
6
7 const NO_CHANNELscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/NO_CHANNEL. = -1
8
9 var (
10 currChannelsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannels. = make(map[string]int)
11 currChannelLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannelLock. = syncscip-go gomod github.com/golang/go/src go1.16 sync/.Mutexscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#{}
12 )
13
14 func GetInterfaceChannelscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/GetInterfaceChannel().(iface string) int {
15 currChannelLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannelLock..Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().()
16 defer currChannelLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannelLock..Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().()
17 if curr, found := currChannelsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannels.[iface]; found {
18 return curr
19 }
20 return NO_CHANNELscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/NO_CHANNEL.
21 }
22
23 func SetInterfaceCurrentChannelscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/SetInterfaceCurrentChannel().(iface string, channel int) {
24 currChannelLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannelLock..Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().()
25 defer currChannelLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannelLock..Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().()
26 currChannelsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/network`/currChannels.[iface] = channel
27 }