Question

I'm writing a program (C++) which will detect devices around me using Wi-fi on Windows OS.
In order to do that I'm using Netmon API and I need to switch the wireless network adapter to monitor mode.
I read that Netmon doesn't have an API for that and therefore I need to do it using WDK and NDIS.

Does anyone know how to switch to monitor mode? I would appreciate a code sample.

Thanks.

Was it helpful?

Solution

In usermode, switch the wireless interface into monitor mode with

WlanSetInterface(
    . . . ,
    wlan_intf_opcode_current_operation_mode,
    DOT11_OPERATION_MODE_NETWORK_MONITOR);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top