monky-2.2.0.0: A system state collecting library and application

Maintainerongy
Stabilityexperimental
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

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 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

type Interface = Word32 Source #

The interface identifier

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

data WifiStats Source #

Wifi network connection information

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