TwclWiFiSniffer Class

The component allows your application to capture raw packets from your WiFi adapter.

Namespace: wclWiFi
TComponent
  wclWiFi.TwclWiFiSniffer
type
 TwclWiFiSniffer = class(TComponent)
 end;

The TwclWiFiSniffer type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates a new component.

Destroy

Frees the component.

Top
Show:
 NameDescription
Active

Gets the sniffer's state.

AfterOpen

The event fires after the Sniffer was opened with success.

BeforeClose

The event fires before the Sniffer will be closed.

DoNotChangeMode

Gets and sets the value controlled how the Sniffer will work with the WiFi hardware interface.

IfaceId

Gets the WiFi Interface ID.

Mode

Gets the current WiFi interface mode.

Top
Show:
 NameDescription
Close

Stops capturing WiFi frames and closes the sniffer.

DoAfterOpen

Fires the AfterOpen event.

DoBeforeClose

Fires the BeforeClose event.

DoFrameReceived(TwclWiFiSnifferFrameMetaData,Pointer,Cardinal)

Fires the OnFrameReceived event.

DoRawFrameReceived(Pointer,Cardinal)

Fires the OnRawFrameReceived event.

GetChannel(Cardinal)

Get the current channel.

GetMacAddr(Int64)

Gets the WiFi adapter current MAC address.

GetPhy(TwclWiFiSnifferPhy)

Gets the current adapter's PHY.

Open(TGUID)

Opens the sniffer and starts capturing WiFI frames.

SetChannel(Cardinal)

Sets the current channel.

SetPhy(TwclWiFiSnifferPhy)

Sets the current PHY.

Top
Show:
 NameDescription
OnFrameReceived

The event fires when a new frame received.

OnRawFrameReceived

The event fires when a new frame received.

Top

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.