• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * 文 件 名   : hmac_isolation.h
15  * 生成日期   : 2014年3月26日
16  * 功能描述   : hmac_isolation.c的头文件,从hmac_custom_security.h分离而来
17  */
18 
19 #ifndef __HMAC_ISOLATION_H__
20 #define __HMAC_ISOLATION_H__
21 
22 #ifdef _PRE_WLAN_FEATURE_ISOLATION
23 
24 /*****************************************************************************
25   1 其他头文件包含
26 *****************************************************************************/
27 #include "oal_ext_if.h"
28 #include "mac_vap_ext.h"
29 
30 #ifdef __cplusplus
31 #if __cplusplus
32 extern "C" {
33 #endif
34 #endif
35 
36 /*****************************************************************************
37   2 宏定义
38 *****************************************************************************/
39 
40 /*****************************************************************************
41   3 枚举定义
42 *****************************************************************************/
43 
44 /* 隔离模式 mode */
45 typedef enum {
46     CS_ISOLATION_MODE_BROADCAST = 0x01,      /* 广播     */
47     CS_ISOLATION_MODE_MULTICAST = 0x02,      /* 组播     */
48     CS_ISOLATION_MODE_UNICAST = 0x04        /* 单播     */
49 } cs_isolation_mode_enum;
50 
51 /* 隔离类型 */
52 typedef enum {
53     CS_ISOLATION_TYPE_NONE,             /* 关闭隔离        */
54     CS_ISOLATION_TYPE_MULTI_BSS,        /* 多BSS隔离       */
55     CS_ISOLATION_TYPE_SINGLE_BSS,       /* 单BSS隔离       */
56 
57     CS_ISOLATION_TYPE_BUTT
58 } cs_isolation_type_enum;
59 typedef osal_u8 cs_isolation_type_enum_uint8;
60 
61 /* 隔离forwording方式 */
62 typedef enum {
63     CS_ISOLATION_FORWORD_NONE,         /* 隔离forword为不丢弃       */
64     CS_ISOLATION_FORWORD_TOLAN,        /* 隔离forword为发送到lan  */
65     CS_ISOLATION_FORWORD_DROP,         /* 隔离forword为丢弃       */
66 
67     CS_ISOLATION_FORWORD_BUTT
68 } cs_isolation_forward_enum;
69 typedef osal_u8 cs_isolation_forward_enum_uint8;
70 
71 /*****************************************************************************
72   4 全局变量声明
73 *****************************************************************************/
74 
75 
76 /*****************************************************************************
77   5 消息头定义
78 *****************************************************************************/
79 
80 
81 /*****************************************************************************
82   6 消息定义
83 *****************************************************************************/
84 
85 
86 /*****************************************************************************
87   7 STRUCT定义
88 *****************************************************************************/
89 /*****************************************************************************
90   8 UNION定义
91 *****************************************************************************/
92 
93 
94 /*****************************************************************************
95   9 OTHERS定义
96 *****************************************************************************/
97 
98 
99 /*****************************************************************************
100   10 函数声明
101 *****************************************************************************/
102 extern osal_u32 hmac_isolation_set_mode(hmac_vap_stru *hmac_vap, osal_u8 mode);
103 extern osal_u32 hmac_isolation_set_type(hmac_vap_stru *hmac_vap, osal_u8 bss_type,
104     osal_u8 isolation_type);
105 extern osal_u32 hmac_isolation_set_forward(hmac_vap_stru *hmac_vap, osal_u8 forward);
106 extern cs_isolation_forward_enum hmac_isolation_filter(hmac_vap_stru *hmac_vap, osal_u8 *mac_addr);
107 osal_bool hmac_isolation_filter_drop(hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf);
108 extern osal_u32 hmac_isolation_clear_counter(hmac_vap_stru *hmac_vap);
109 extern osal_void hmac_show_isolation_info(hmac_vap_stru *hmac_vap);
110 
111 #ifdef __cplusplus
112 #if __cplusplus
113 }
114 #endif
115 #endif
116 
117 #endif  /* #ifdef _PRE_WLAN_FEATURE_ISOLATION */
118 
119 #endif /* end of hmac_isolation.h */
120 
121