Maintainer | ongy |
---|---|
Stability | experimental |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
- getCurrentWifi :: SSIDSocket -> Interface -> IO (Maybe String)
- getCurrentWifiStats :: SSIDSocket -> Interface -> IO (Maybe WifiStats)
- getInterface :: SSIDSocket -> String -> IO (Maybe Interface)
- guessInterface :: SSIDSocket -> IO (Maybe Interface)
- gotReadable :: SSIDSocket -> Interface -> IO WifiConn
- getSSIDSocket :: IO SSIDSocket
- type Interface = Word32
- data SSIDSocket
- getWifiFd :: SSIDSocket -> Fd
- prepareEvents :: SSIDSocket -> IO ()
- getExtendedWifi :: SSIDSocket -> Interface -> WifiStats -> IO (Maybe NL80211Packet)
- data Signal
- data WifiStats = WifiStats {}
- data WifiConn
Documentation
getCurrentWifi :: SSIDSocket -> Interface -> IO (Maybe String) Source #
Get only the name of the currently connected wifi
getCurrentWifiStats :: SSIDSocket -> Interface -> IO (Maybe WifiStats) Source #
Get the stats of a currently connected wifi network
getInterface :: SSIDSocket -> String -> IO (Maybe Interface) Source #
Get the interface id by name
guessInterface :: SSIDSocket -> IO (Maybe Interface) Source #
gotReadable :: SSIDSocket -> Interface -> IO WifiConn Source #
This should be called when the fd returned by getWifiFd
got readable
getSSIDSocket :: IO SSIDSocket Source #
Get a netlink socket bound to nl80211
Before this is used event based, call prepareEvents
data SSIDSocket Source #
The socket type for this module The first socket is general operation/event based the seconds socket will be used to get extended information. We use 2 sockets, to not get event/request mixed up.
getWifiFd :: SSIDSocket -> Fd Source #
get the raw fd for eventing
prepareEvents :: SSIDSocket -> IO () Source #
Subscribe to multicast group
getExtendedWifi :: SSIDSocket -> Interface -> WifiStats -> IO (Maybe NL80211Packet) Source #
Get some additional information about the currently connected wifi
SigMBM Word32 | Signal MBM |
SigUNSPEC Word8 | Strength 0-100 http://lxr.mein.io/source/iwinfo/api/nl80211.h#L3388 |
Wifi network connection information
Enum for connection change
WifiNone | Nothing changed, connection unrelated message |
WifiDisconnect | The current network was disconnectd |
WifiConnect WifiStats | A new connection was established |