2018-09-26 23:24:12 -04:00
|
|
|
/* cmd_sniffer example — declarations of command registration functions.
|
|
|
|
|
|
|
|
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, this
|
|
|
|
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
|
|
CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2022-05-27 03:06:42 -04:00
|
|
|
#include "esp_eth_driver.h"
|
2022-05-02 09:47:05 -04:00
|
|
|
|
2018-09-26 23:24:12 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-01-25 04:03:01 -05:00
|
|
|
/**
|
|
|
|
* @brief Supported Sniffer Interface
|
|
|
|
*
|
|
|
|
*/
|
2018-09-26 23:24:12 -04:00
|
|
|
typedef enum {
|
2021-05-12 13:52:28 -04:00
|
|
|
SNIFFER_INTF_UNKNOWN = 0,
|
|
|
|
SNIFFER_INTF_WLAN, /*!< WLAN interface */
|
|
|
|
SNIFFER_INTF_ETH, /*!< Ethernet interface */
|
2018-09-26 23:24:12 -04:00
|
|
|
} sniffer_intf_t;
|
|
|
|
|
2019-01-25 04:03:01 -05:00
|
|
|
/**
|
|
|
|
* @brief WLAN Sniffer Filter
|
|
|
|
*
|
|
|
|
*/
|
2018-09-26 23:24:12 -04:00
|
|
|
typedef enum {
|
2019-01-25 04:03:01 -05:00
|
|
|
SNIFFER_WLAN_FILTER_MGMT = 0, /*!< MGMT */
|
|
|
|
SNIFFER_WLAN_FILTER_CTRL, /*!< CTRL */
|
|
|
|
SNIFFER_WLAN_FILTER_DATA, /*!< DATA */
|
|
|
|
SNIFFER_WLAN_FILTER_MISC, /*!< MISC */
|
|
|
|
SNIFFER_WLAN_FILTER_MPDU, /*!< MPDU */
|
|
|
|
SNIFFER_WLAN_FILTER_AMPDU, /*!< AMPDU */
|
2021-02-03 04:10:10 -05:00
|
|
|
SNIFFER_WLAN_FILTER_FCSFAIL, /*!< When this bit is set, the hardware will receive packets for which frame check sequence failed */
|
2018-09-26 23:24:12 -04:00
|
|
|
SNIFFER_WLAN_FILTER_MAX
|
|
|
|
} sniffer_wlan_filter_t;
|
|
|
|
|
2021-05-13 03:59:03 -04:00
|
|
|
void register_sniffer_cmd(void);
|
2021-05-12 13:52:28 -04:00
|
|
|
esp_err_t sniffer_reg_eth_intf(esp_eth_handle_t eth_handle);
|
2018-09-26 23:24:12 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|