6#ifndef __HMAC_SNIFFER_H
7#define __HMAC_SNIFFER_H
9#if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) \
10 && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
11#include "oal_schedule.h"
23#if defined(_PRE_WLAN_FEATURE_SNIFFER)
25#define PCAP_FILE_NUM 5
26#define PCAP_FILE_NUM_MAX 5
27#define PCAP_FILE_NUM_MIN 1
28#define PCAP_FILE_LEN (30 * 1024 * 1024)
29#define PCAP_FILE_LEN_MIN (1 * 1024 * 1024)
30#define PCAP_FILE_LEN_MAX (50 * 1024 * 1024)
32#define PCAP_PKT_MIN_LEN 24
33#define PCAP_PKT_MAX_LEN 5000
35#define PCAP_PKT_HDR_MAGIC 0xa1b2c3d4
36#define PCAP_PKT_HDR_VER_MAJ 0x2
37#define PCAP_PKT_HDR_VER_MIN 0x4
38#define PCAP_PKT_HDR_THISZONE 0x0
39#define PCAP_PKT_HDR_SIGFIGS 0x0
40#define PCAP_PKT_HDR_SNAPLEN 0xffff
41#define PCAP_PKT_HDR_LINKTYPE_802_11 0x69
42#define PCAP_PKT_HDR_LINKTYPE_802_11_RADIOTAP 127
44#define IEEE80211_MAC_HDR_LEN 26
45#define TRIM_DATA_PAYLOAD_LEN 2000
46#define IEEE80211_FRAME_TYPE_DATA 0x02
47#define IEEE80211_FRAME_TYPE_MGMT 0x00
48#define IEEE80211_FRAME_SUBTYPE_QOS 0x08
49#define IEEE80211_FRAME_SUBTYPE_DISASSOC 0x0a
56#define PCAP_QOS_DATA_PKT_HDR_LEN 26
69 bit_protected_frame : 1,
71} mac_header_control_stru;
75 mac_header_control_stru st_frame_control;
77 bit_duration_flag : 1;
85 bit_qc_ack_polocy : 2,
89 osal_u8 bit_qc_ps_buf_state_resv : 1,
90 bit_qc_ps_buf_state_inducated : 1,
91 bit_qc_high_priority_buf_ac : 2,
92 bit_qc_qosap_buf_load : 4;
94} mac_ieee80211_qos_stru;
105 osal_s8 *buffer[PCAP_FILE_NUM];
109 osal_u32 packetcount[PCAP_FILE_NUM];
112} proc_file_config_struct;
114extern proc_file_config_struct g_sniffer_st;
125} wal_pcap_filehdr_stru;
137 wal_pcap_time_stru time;
140} wal_pcap_pkthdr_stru;
151} wal_msg_header_stru;
165 wal_msg_header_stru oam_header;
166 wal_ota_hdr_stru st_ota_hdr;
172 return (g_sniffer_st.curpos[g_sniffer_st.cur_file] + (packet_len)) <= g_sniffer_st.max_file_len;
177 return g_sniffer_st.curpos[i];
182 return sniffer_file_pos(g_sniffer_st.cur_file);
187 return sniffer_cur_file_pos() == 0;
192 return g_sniffer_st.buffer[i];
197 return sniffer_file_buffer(g_sniffer_st.cur_file);
201osal_s32 hmac_sniffer_get_switch(
void);
202void proc_handle_command_save_file(
void);
osal_u8 oam_ota_frame_direction_type_enum_uint8
Definition common_dft_rom.h:162
#define MAC_ADDR_LEN
Definition hmac_promisc.h:33
#define INLINE__
Definition osal_list.h:25
int osal_s32
Definition osal_types.h:19
unsigned char osal_u8
Definition osal_types.h:11
osal_u8 osal_bool
Definition osal_types.h:27
signed char osal_s8
Definition osal_types.h:17
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
Log message information header.
Definition log_oam_logger.h:564
Definition osal_semaphore.h:20