Portability | Linux |
---|---|
Stability | experimental |
Maintainer | ongy |
Safe Haskell | None |
- getCurrentWifi :: SSIDSocket -> Interface -> IO (Maybe String)
- getCurrentWifiStats :: SSIDSocket -> Interface -> IO (Maybe WifiStats)
- getInterface :: SSIDSocket -> String -> IO (Maybe Interface)
- gotReadable :: SSIDSocket -> Interface -> IO WifiConn
- getSSIDSocket :: IO SSIDSocket
- type Interface = Word32
- type SSIDSocket = NL80211Socket
- getWifiFd :: SSIDSocket -> Fd
- prepareEvents :: SSIDSocket -> IO ()
- 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
gotReadable :: SSIDSocket -> Interface -> IO WifiConnSource
This should be called when the fd returned by getWifiFd
got readable
getSSIDSocket :: IO SSIDSocketSource
Get a netlink socket bound to nl80211
Before this is used event based, call prepareEvents
type SSIDSocket = NL80211SocketSource
The socket type for this module
getWifiFd :: SSIDSocket -> FdSource
get the raw fd for eventing
prepareEvents :: SSIDSocket -> IO ()Source
Subscribe to multicast group
Signal type: http:lxr.free-electrons.comsourcenetwirelessnl80211.c#L6944
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 |