Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
This module providis utility functions for NL80211 subsystem. For more information see usrincludelinuxnl80211.h
- data NL80211Socket
- type NL80211Packet = GenlPacket NoData80211
- getWifiEIDs :: Get Attributes
- makeNL80211Socket :: IO NL80211Socket
- joinMulticastByName :: NL80211Socket -> String -> IO ()
- queryOne :: NL80211Socket -> Word8 -> Bool -> Attributes -> IO NL80211Packet
- query :: NL80211Socket -> Word8 -> Bool -> Attributes -> IO [NL80211Packet]
- getInterfaceList :: NL80211Socket -> IO [(String, Word32)]
- getScanResults :: NL80211Socket -> Word32 -> IO [NL80211Packet]
- getConnectedWifi :: NL80211Socket -> Word32 -> IO [NL80211Packet]
- getWifiAttributes :: NL80211Packet -> Maybe Attributes
- getPacket :: NL80211Socket -> IO [NL80211Packet]
- getFd :: NL80211Socket -> Fd
- getMulticastGroups :: NL80211Socket -> IO [String]
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
:: 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.
:: 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
getPacket :: NL80211Socket -> IO [NL80211Packet] Source #
NL80211 version of recvOne
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