WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hmac_car.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2017-2023. All rights reserved.
3 * 文 件 名 : hmac_car.h
4 * 生成日期 : 2017年03月24日
5 * 功能描述 : 限速CAR(Committed Access Rate)功能
6 */
7
8
9#ifndef __HMAC_CAR_H__
10#define __HMAC_CAR_H__
11
12/*****************************************************************************
13 1 其他头文件包含
14*****************************************************************************/
15#include "oal_ext_if.h"
16#include "frw_ext_if.h"
17#include "hmac_device.h"
18
19#ifdef __cplusplus
20#if __cplusplus
21extern "C" {
22#endif
23#endif
24
25#undef THIS_FILE_ID
26#define THIS_FILE_ID OAM_FILE_ID_HMAC_CAR_H
27/*****************************************************************************
28 2 宏定义
29*****************************************************************************/
30#define HMAC_CAR_CYCLE_MS 100 // CAR默认定时器超时时间ms
31#define HMAC_CAR_WIFI_ETH 20 // 上行需要减20个字节;wifi 34(26+8), eth 14(6+6+2); wifi-eth;用eth统计
32#define HMAC_CAR_MULTICAST_PPS_NUM 0 // CAR组播默认pps的数目:0表示不使用pps限速,>0表示用pps限速的数值
33
34
35/* 遍历VAP/USER操作封装 */
36#define hmac_device_foreach_vap(_hmac_vap, _pst_device, _uc_vap_index) \
37 for ((_uc_vap_index) = 0, \
38 (_hmac_vap) = ((_pst_device)->vap_num > 0)? \
39 ((hmac_vap_stru *)mac_res_get_hmac_vap((_pst_device)->vap_id[0])) : OAL_PTR_NULL; \
40 (_uc_vap_index) < (_pst_device)->vap_num; \
41 (_uc_vap_index) ++, \
42 (_hmac_vap) = ((_uc_vap_index) < (_pst_device)->vap_num)? \
43 ((hmac_vap_stru *)mac_res_get_hmac_vap((_pst_device)->vap_id[_uc_vap_index])) : OAL_PTR_NULL) \
44 if (OAL_PTR_NULL != (_hmac_vap))
45
46#define hmac_vap_foreach_user(_pst_user, _hmac_vap, _pst_list_pos) \
47 for ((_pst_list_pos) = (_hmac_vap)->mac_user_list_head.next, \
48 (_pst_user) = osal_list_entry((_pst_list_pos), hmac_user_stru, user_dlist); \
49 (_pst_list_pos) != &((_hmac_vap)->mac_user_list_head); \
50 (_pst_list_pos) = (_pst_list_pos)->next, \
51 (_pst_user) = osal_list_entry((_pst_list_pos), hmac_user_stru, user_dlist)) \
52 if (OAL_PTR_NULL != (_pst_user))
53
54/*****************************************************************************
55 3 枚举定义
56*****************************************************************************/
57
58
59/*****************************************************************************
60 4 全局变量声明
61*****************************************************************************/
62
63
64/*****************************************************************************
65 5 消息头定义
66*****************************************************************************/
67
68
69/*****************************************************************************
70 6 消息定义
71*****************************************************************************/
72
73
74/*****************************************************************************
75 7 STRUCT定义
76*****************************************************************************/
77
78
79/*****************************************************************************
80 8 UNION定义
81*****************************************************************************/
82
83/*****************************************************************************
84 9 OTHERS定义
85*****************************************************************************/
86
87
88/*****************************************************************************
89 10 函数声明
90*****************************************************************************/
91
92extern osal_u32 hmac_car_device_bw_limit(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param);
93
94extern osal_u32 hmac_car_vap_bw_limit(hmac_vap_stru *hmac_vap, mac_cfg_car_stru *car_cfg_param);
95extern osal_u32 hmac_car_user_bw_limit(hmac_vap_stru *hmac_vap, mac_cfg_car_stru *car_cfg_param);
96extern osal_u32 hmac_car_device_multicast(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param);
98 mac_cfg_car_stru *car_cfg_param);
100 hmac_user_stru *hmac_user, oal_netbuf_stru *buf,
101 hmac_car_up_down_type_enum_uint8 car_type);
103 oal_netbuf_stru *buf, hmac_car_up_down_type_enum_uint8 car_type);
104extern osal_u32 hmac_car_enable_switch(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param);
108 mac_cfg_car_stru *car_cfg_param);
111
112#ifdef __cplusplus
113#if __cplusplus
114}
115#endif
116#endif
117
118#endif
osal_u32 hmac_car_device_multicast(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param)
osal_u32 hmac_car_user_bw_limit(hmac_vap_stru *hmac_vap, mac_cfg_car_stru *car_cfg_param)
osal_u32 hmac_car_device_timer_cycle_limit(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param)
osal_u32 hmac_car_device_multicast_pps_num(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param)
osal_u32 hmac_car_process_uplink(osal_u16 ta_user_idx, hmac_vap_stru *hmac_vap, oal_netbuf_stru *buf, hmac_car_up_down_type_enum_uint8 car_type)
osal_u32 hmac_car_init(hmac_device_stru *hmac_device)
osal_u32 hmac_car_show_info(hmac_device_stru *hmac_device)
osal_u32 hmac_car_process(hmac_device_stru *hmac_device, hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, oal_netbuf_stru *buf, hmac_car_up_down_type_enum_uint8 car_type)
osal_u32 hmac_car_multicast_process(hmac_device_stru *hmac_device, oal_netbuf_stru *buf)
osal_u32 hmac_car_device_bw_limit(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param)
osal_u32 hmac_car_exit(hmac_device_stru *hmac_device)
osal_u32 hmac_car_enable_switch(hmac_device_stru *hmac_device, mac_cfg_car_stru *car_cfg_param)
osal_u32 hmac_car_vap_bw_limit(hmac_vap_stru *hmac_vap, mac_cfg_car_stru *car_cfg_param)
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
Definition mac_device_ext.h:856
Definition mac_user_ext.h:519
Definition mac_vap_ext.h:2019
Definition oal_skbuff.h:82