netlink-1.0.0.4: Netlink communication for Haskell

Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

System.Linux.Netlink.GeNetlink.NL80211

Description

This module providis utility functions for NL80211 subsystem. For more information see usrincludelinuxnl80211.h

Synopsis

Documentation

data NL80211Socket Source #

Wrapper for NetlinkSocket we also need the family id for messages we construct

type NL80211Packet = GenlPacket NoData80211 Source #

typedef for messages send by this mdoule

getWifiEIDs :: Get Attributes Source #

Get the EID Attributes from a buffer

makeNL80211Socket :: IO NL80211Socket Source #

Create a NL80211Socket this opens a genetlink socket and gets the family id

joinMulticastByName :: NL80211Socket -> String -> IO () Source #

Join a nl80211 multicast group by name

queryOne :: NL80211Socket -> Word8 -> Bool -> Attributes -> IO NL80211Packet Source #

queryOne for NL80211 (see queryOne)

query :: NL80211Socket -> Word8 -> Bool -> Attributes -> IO [NL80211Packet] Source #

query for NL80211 (see query)

getInterfaceList :: NL80211Socket -> IO [(String, Word32)] Source #

Get the list of interfaces currently managed by NL80211

getScanResults Source #

Arguments

:: NL80211Socket 
-> Word32

The id of the interface for which this should be looked up

-> IO [NL80211Packet] 

get scan results

In testing this could be a big chunk of data when a scan just happened or be pretty much only the currently connected wifi.

For more information about how this is structured look into kernel source or just try it out.

getConnectedWifi Source #

Arguments

:: NL80211Socket 
-> Word32

The id of the interface for which this should be looked up

-> IO [NL80211Packet] 

Get the information about the currently connected wifi(s).

This would technically work for multiple connected wifis, but since we only get information about one interface this should only ever be emtpy on a singleton list.

For more information about how this is structured look into kernel soruce or just try it out.

getWifiAttributes :: NL80211Packet -> Maybe Attributes Source #

Get the EID attributes from a NL80211Packet (for example from getConnectedWifi

getFd :: NL80211Socket -> Fd Source #

Get the raw fd from a NL80211Socket. This can be used for eventing

getMulticastGroups :: NL80211Socket -> IO [String] Source #

Get the names of all multicast groups this nl80211 implementation provides