monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilityexperimental
Maintainerongy
Safe HaskellNone

Monky.Wifi

Description

 

Synopsis

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 Interface = Word32Source

The interface identifier

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

data Signal Source

Signal type: http:lxr.free-electrons.comsourcenetwirelessnl80211.c#L6944

Constructors

SigMBM Word32

Signal MBM

SigUNSPEC Word8

Strength 0-100 http:lxr.mein.iosourceiwinfoapinl80211.h#L3388

data WifiStats Source

Wifi network connection information

Constructors

WifiStats 

Fields

wifiChannel :: Word8
 
wifiRates :: [Word32]
 
wifiName :: String
 
wifiFreq :: Word32
 
wifiSig :: Signal
 

data WifiConn Source

Enum for connection change

Constructors

WifiNone

Nothing changed, connection unrelated message

WifiDisconnect

The current network was disconnectd

WifiConnect WifiStats

A new connection was established