mirror of
https://codeberg.org/opentrafficmap/its-g5-receiver-firmware.git
synced 2026-07-30 20:45:39 +00:00
61 lines
1.5 KiB
C
61 lines
1.5 KiB
C
/* 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
|
|
|
|
#include "esp_eth_driver.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
void *payload;
|
|
uint32_t length;
|
|
uint32_t seconds;
|
|
uint32_t microseconds;
|
|
} sniffer_packet_info_t;
|
|
|
|
typedef struct {
|
|
sniffer_packet_info_t info;
|
|
uint8_t payload[];
|
|
} sniffer_combined_info_t;
|
|
|
|
/**
|
|
* @brief Supported Sniffer Interface
|
|
*
|
|
*/
|
|
typedef enum {
|
|
SNIFFER_INTF_UNKNOWN = 0,
|
|
SNIFFER_INTF_WLAN, /*!< WLAN interface */
|
|
SNIFFER_INTF_ETH, /*!< Ethernet interface */
|
|
} sniffer_intf_t;
|
|
|
|
/**
|
|
* @brief WLAN Sniffer Filter
|
|
*
|
|
*/
|
|
typedef enum {
|
|
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 */
|
|
SNIFFER_WLAN_FILTER_FCSFAIL, /*!< When this bit is set, the hardware will receive packets for which frame check sequence failed */
|
|
SNIFFER_WLAN_FILTER_MAX
|
|
} sniffer_wlan_filter_t;
|
|
|
|
void register_sniffer_cmd(void);
|
|
esp_err_t sniffer_reg_eth_intf(esp_eth_handle_t eth_handle);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|