WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hmac_promisc.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2023. All rights reserved.
3 * Description: hook function for wifi promiscuous.
4 * Create: 2021-8-14
5 */
6
7#ifndef __HMAC_PROMISC_H__
8#define __HMAC_PROMISC_H__
9
10#include "osal_adapt.h"
11#include "mac_frame.h"
12#include "mac_vap_ext.h"
13#ifdef __cplusplus
14#if __cplusplus
15extern "C" {
16#endif
17#endif
18
19/*****************************************************************************
20 1 其他头文件包含
21*****************************************************************************/
22
23#undef THIS_FILE_ID
24#define THIS_FILE_ID OAM_FILE_ID_OAM_PROMISC_H
25
26#define IEEE80211_MAC_HDR_LEN 26
27#define TRIM_DATA_PAYLOAD_LEN 2000
28#define IEEE80211_FRAME_TYPE_DATA 0x02
29#define IEEE80211_FRAME_TYPE_MGMT 0x00
30#define IEEE80211_FRAME_SUBTYPE_QOS 0x08
31#define IEEE80211_FRAME_SUBTYPE_DISASSOC 0x0a
32
33#define MAC_ADDR_LEN 6
34
35#define DIRECTION_TX 0
36#define DIRECTION_RX 1
37
38/* WLAN 混杂模式状态结构体 */
39typedef struct {
40 osal_u32 promis_count[3][16][2]; /* 3 for frame type, 15 for frame subtype, 2 for frame mode */
41} wlan_promisc_mode_stru; /* splited from proc_file_config_struct */
42
49
50#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
51typedef osal_void (*hmac_promis_send_custom_frame_cb)(hmac_vap_stru *hmac_vap, const oal_netbuf_stru *netbuf);
52#endif
56
57static osal_u32 hmac_promis_init_weakref(osal_void) __attribute__ ((weakref("hmac_promis_init"), used));
58static osal_void hmac_promis_deinit_weakref(osal_void) __attribute__ ((weakref("hmac_promis_deinit"), used));
59
60#ifdef __cplusplus
61#if __cplusplus
62}
63#endif
64#endif
65
66#endif
osal_u8(* hmac_promisc_get_switch_cb)(void)
Definition hmac_promisc.h:55
osal_void(* hmac_rx_frame_promis_proc_cb)(hmac_vap_stru *hmac_vap, const oal_netbuf_stru *netbuf)
Definition hmac_promisc.h:53
osal_u32(* hmac_sta_rx_deauth_req_proc_for_promisc_cb)(hmac_vap_stru *hmac_vap, const osal_u8 *mac_hdr)
Definition hmac_promisc.h:54
static osal_u32 used
Definition hmac_promisc.h:57
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
Log message information header.
Definition log_oam_logger.h:564
Definition mac_vap_ext.h:2019
Definition oal_skbuff.h:82
Definition hmac_promisc.h:39
Definition hmac_promisc.h:43
osal_u8 frame_type
Definition hmac_promisc.h:45
osal_u8 bit_num
Definition hmac_promisc.h:44
osal_u8 subtype_num
Definition hmac_promisc.h:46
osal_u8 frame_mode
Definition hmac_promisc.h:47