-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsniffer.h
45 lines (38 loc) · 911 Bytes
/
sniffer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* @file sniffer.h
* @author risinek ([email protected])
* @date 2021-04-05
* @copyright Copyright (c) 2021
*
* @brief Provides an interface for sniffer functionality.
*/
#ifndef SNIFFER_H
#define SNIFFER_H
#include <stdbool.h>
#include "esp_event.h"
ESP_EVENT_DECLARE_BASE(SNIFFER_EVENTS);
enum {
SNIFFER_EVENT_CAPTURED_DATA,
SNIFFER_EVENT_CAPTURED_MGMT,
SNIFFER_EVENT_CAPTURED_CTRL
};
/**
* @brief Sets sniffer filter for specific frame types.
*
* @param data sniff data frames
* @param mgmt sniff management frames
* @param ctrl sniff control frames
*/
void wifictl_sniffer_filter_frame_types(bool data, bool mgmt, bool ctrl);
/**
* @brief Start promiscuous mode on given channel
*
* @param channel channel on which sniffer should operate
*/
void wifictl_sniffer_start(uint8_t channel);
/**
* @brief Stop promisuous mode
*
*/
void wifictl_sniffer_stop();
#endif