WiFi Framework C++ Edition
|
The component allows your application to capture raw packets from your WiFi adapter. More...
#include <wclWiFi.h>
Public Member Functions | |
CwclWiFiSniffer () | |
Creates a new WiFi Sniffer. | |
virtual | ~CwclWiFiSniffer () |
Frees the Sniffer. | |
int | Close () |
Stops capturing WiFi frames and closes the sniffer. | |
int | Open (const GUID &Id) |
Opens the sniffer and starts capturing WiFI frames. | |
int | GetChannel (unsigned long &Channel) const |
Get the current channel. | |
int | GetMacAddr (__int64 &Address) const |
Gets the WiFi adapter current MAC address. | |
int | GetPhy (wclWiFiSnifferPhy &Phy) const |
Gets the current adapter's PHY. | |
int | SetChannel (const unsigned long Channel) |
Sets the current channel. | |
int | SetPhy (const wclWiFiSnifferPhy Phy) |
Sets the current PHY. | |
bool | GetActive () const |
Gets the sniffer's state. | |
__declspec (property(get=GetActive)) bool Active | |
Gets the sniffer's state. | |
GUID | GetIfaceId () const |
Gets the WiFi Interface ID. | |
__declspec (property(get=GetIfaceId)) GUID IfaceId | |
Gets the WiFi Interface ID. | |
wclWiFiOperationMode | GetMode () const |
Gets the current WiFi interface mode. | |
__declspec (property(get=GetMode)) wclWiFiOperationMode Mode | |
Gets the current WiFi interface mode. | |
bool | GetDoNotChangeMode () const |
Gets the value controlled how the Sniffer will work with the WiFi hardware interface. | |
void | SetDoNotChangeMode (const bool Value) |
Sets the value controlled how the Sniffer will work with the WiFi hardware interface. | |
__declspec (property(get=GetDoNotChangeMode, put=SetDoNotChangeMode)) bool DoNotChangeMode | |
Gets and sets the value controlled how the Sniffer will work with the WiFi hardware interface. | |
__event void | AfterOpen (void *Sender) |
The event fires after the Sniffer was opened with success. | |
__event void | BeforeClose (void *Sender) |
The event fires before the Sniffer will be closed. | |
__event void | OnFrameReceived (void *Sender, const wclWiFiSnifferFrameMetaData &Meta, const void *const Buffer, const unsigned long Size) |
The event fires when a new frame received. | |
__event void | OnRawFrameReceived (void *Sender, const void *const Buffer, const unsigned long Size) |
The event fires when a new frame received. | |
Protected Member Functions | |
virtual void | DoAfterOpen () |
Fires the AfterOpen event. | |
virtual void | DoBeforeClose () |
Fires the BeforeClose event. | |
virtual void | DoFrameReceived (const wclWiFiSnifferFrameMetaData &Meta, const void *const Buffer, const unsigned long Size) |
Fires the OnFrameReceived event. | |
virtual void | DoRawFrameReceived (const void *const Buffer, const unsigned long Size) |
Fires the OnRawFrameReceived event. | |
The component allows your application to capture raw packets from your WiFi adapter.
Please note, that not all WiFi adapters can capture the raw packets. To be able to do that your adapter must support Monitor Mode.
The component requires Microsoft Network Monitor 3.4 filter driver to be installed on your system. You can download and install the Microsoft Network Monitor 3.4 by the following link: https://www.microsoft.com/en-us/download/details.aspx?id=4865
NOTE: The component is not thread-safe.