Syntax
VM_RESULT vm_wlan_sniffer_on(
    const vm_wlan_sniffer_on_config_t* config, 
    vm_wlan_sniffer_on_callback callback, 
    void* user_data
);
ContentsIndex
PreviousUpNext
vm_wlan_sniffer_on
Example
Syntax
VM_RESULT vm_wlan_sniffer_on(
    const vm_wlan_sniffer_on_config_t* config, 
    vm_wlan_sniffer_on_callback callback, 
    void* user_data
);
Description

The function is used to open the sniffer in WLAN STA mode.

Parameters
Parameters 
Description 
const vm_wlan_sniffer_on_config_t* config 
[IN] The configuration parameter of sniffer status. 
vm_wlan_sniffer_on_callback callback 
[IN] The callback to be invoked by the sniffer. 
void* user_data 
[IN] Addition user data. 
Return Values
Return Values 
Description 
VM_WLAN_ERROR_SUCCESS 
Success.
 
VM_WLAN_ERROR_FAILED 
Failed.
 
VM_WLAN_ERROR_INVALID_INPUT 
Invalid input parameter(s).
 
VM_WLAN_ERROR_PROCESSING 
Waiting for result. 
Example
vm_wlan_sniffer_on(NULL, sniffer_on_cb, NULL);

void sniffer_on_cb(void* user_data, vm_wlan_sniffer_on_result_t* res)
{
    switch (res->cb_type)
    {
        case VM_WLAN_SNIFFER_ON_RES:
        {
            if (res->result == VM_WLAN_SNIFFER_SUCCESS)
            {
                // Opens sniffer successfully.
            }
            break;
        }
        case VM_WLAN_SNIFFER_ON_AP_INFO:
        {
            if (res->result == VM_WLAN_SNIFFER_SUCCESS)
            {
                // Gets AP information successfully. The AP information is
                // stored in res->profile.
            }
            break;
        }
        default:
            break;
    }
}
File

vmwlan.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.