cmd_sniffer.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* cmd_sniffer example — declarations of command registration functions.
  2. This example code is in the Public Domain (or CC0 licensed, at your option.)
  3. Unless required by applicable law or agreed to in writing, this
  4. software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied.
  6. */
  7. #pragma once
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @brief Supported Sniffer Interface
  13. *
  14. */
  15. typedef enum {
  16. SNIFFER_INTF_UNKNOWN = 0,
  17. SNIFFER_INTF_WLAN, /*!< WLAN interface */
  18. SNIFFER_INTF_ETH, /*!< Ethernet interface */
  19. } sniffer_intf_t;
  20. /**
  21. * @brief WLAN Sniffer Filter
  22. *
  23. */
  24. typedef enum {
  25. SNIFFER_WLAN_FILTER_MGMT = 0, /*!< MGMT */
  26. SNIFFER_WLAN_FILTER_CTRL, /*!< CTRL */
  27. SNIFFER_WLAN_FILTER_DATA, /*!< DATA */
  28. SNIFFER_WLAN_FILTER_MISC, /*!< MISC */
  29. SNIFFER_WLAN_FILTER_MPDU, /*!< MPDU */
  30. SNIFFER_WLAN_FILTER_AMPDU, /*!< AMPDU */
  31. SNIFFER_WLAN_FILTER_FCSFAIL, /*!< When this bit is set, the hardware will receive packets for which frame check sequence failed */
  32. SNIFFER_WLAN_FILTER_MAX
  33. } sniffer_wlan_filter_t;
  34. void register_sniffer_cmd(void);
  35. esp_err_t sniffer_reg_eth_intf(esp_eth_handle_t eth_handle);
  36. #ifdef __cplusplus
  37. }
  38. #endif