WiFi Sniffer¶
See WiFi Sniffer for an example of how to use this.
API Documentation¶
-
group
wifi_sniffer WiFi promiscuous mode sniffer support.
Defines
-
ETH_MAC_LEN¶
Typedefs
-
using
WifiSnifferCallback= Delegate<void(uint8_t *data, uint16_t length)>¶
-
using
WifiBeaconCallback= Delegate<void(const BeaconInfo &beacon)>¶
-
using
WifiClientCallback= Delegate<void(const ClientInfo &client)>¶
-
struct
BeaconInfo¶ - #include <WifiSniffer.h>
Decoded Wifi beacon (Access Point) information.
-
struct
ClientInfo¶ - #include <WifiSniffer.h>
Decoded Wifi client information.
-
class
BeaconInfoList: public Vector<BeaconInfo>¶ - #include <WifiSniffer.h>
For applications to use to manage list of unique beacons.
-
class
ClientInfoList: public Vector<ClientInfo>¶ - #include <WifiSniffer.h>
For applications to use to manage list of unique clients.
-
class
WifiSniffer: public ISystemReadyHandler¶ - #include <WifiSniffer.h>
Public Functions
-
void
begin()¶ Initialise the sniffer.
-
void
end()¶ Stop the sniffer.
-
void
onBeacon(WifiBeaconCallback callback)¶ Register notification for beacon (AP) info.
-
void
onClient(WifiClientCallback callback)¶ Register notification for client info.
-
void
onSniff(WifiSnifferCallback callback)¶ Register notification for all incoming data.
- Note
Callback invoked for all packet types, including beacon/client
-
void
setChannel(unsigned channel)¶ Set the channel to listen on.
- Parameters
channel:
-
unsigned
getChannel()¶ Get the current channel being listened on.
-
void
-