📄 rtmp_def.h
字号:
#define WDS_DISABLE_MODE 0#define WDS_RESTRICT_MODE 1#define WDS_BRIDGE_MODE 2#define WDS_REPEATER_MODE 3#define WDS_LAZY_MODE 4#define MAX_MESH_NUM 0#define MAX_APCLI_NUM 0#ifdef APCLI_SUPPORT#undef MAX_APCLI_NUM#define MAX_APCLI_NUM 1#endif // APCLI_SUPPORT //#define MAX_MBSSID_NUM 1#ifdef MBSS_SUPPORT#undef MAX_MBSSID_NUM#define MAX_MBSSID_NUM (8 - MAX_MESH_NUM - MAX_APCLI_NUM)#endif // MBSS_SUPPORT ///* sanity check for apidx */#define MBSS_MR_APIDX_SANITY_CHECK(apidx) \ { if (apidx > MAX_MBSSID_NUM) { \ DBGPRINT(RT_DEBUG_ERROR, ("%s> Error! apidx = %d > MAX_MBSSID_NUM!\n", __FUNCTION__, apidx)); \ apidx = MAIN_MBSSID; } }#define VALID_WCID(_wcid) ((_wcid) > 0 && (_wcid) < MAX_LEN_OF_MAC_TABLE )#define MAIN_MBSSID 0#define FIRST_MBSSID 1#define MAX_BEACON_SIZE 512// If the MAX_MBSSID_NUM is larger than 6, // it shall reserve some WCID space(wcid 222~253) for beacon frames. // - these wcid 238~253 are reserved for beacon#6(ra6).// - these wcid 222~237 are reserved for beacon#7(ra7).#if defined(MAX_MBSSID_NUM) && (MAX_MBSSID_NUM == 8)#define HW_RESERVED_WCID 222#elif defined(MAX_MBSSID_NUM) && (MAX_MBSSID_NUM == 7)#define HW_RESERVED_WCID 238#else#define HW_RESERVED_WCID 255#endif// Then dedicate wcid of DFS and Carrier-Sense.#define DFS_CTS_WCID (HW_RESERVED_WCID - 1)#define CS_CTS_WCID (HW_RESERVED_WCID - 2)#define LAST_SPECIFIC_WCID (HW_RESERVED_WCID - 2)// If MAX_MBSSID_NUM is 8, the maximum available wcid for the associated STA is 211. // If MAX_MBSSID_NUM is 7, the maximum available wcid for the associated STA is 228.#define MAX_AVAILABLE_CLIENT_WCID (LAST_SPECIFIC_WCID - MAX_MBSSID_NUM - 1) // TX need WCID to find Cipher Key// these wcid 212 ~ 219 are reserved for bc/mc packets if MAX_MBSSID_NUM is 8.#define GET_GroupKey_WCID(__wcid, __bssidx) \ { \ __wcid = LAST_SPECIFIC_WCID - (MAX_MBSSID_NUM) + __bssidx; \ }#define IsGroupKeyWCID(__wcid) (((__wcid) < LAST_SPECIFIC_WCID) && ((__wcid) >= (LAST_SPECIFIC_WCID - (MAX_MBSSID_NUM))))// definition to support multiple BSSID#define BSS0 0#define BSS1 1#define BSS2 2#define BSS3 3#define BSS4 4#define BSS5 5#define BSS6 6#define BSS7 7//============================================================// Length definitions#define PEER_KEY_NO 2#define MAC_ADDR_LEN 6#define TIMESTAMP_LEN 8#define MAX_LEN_OF_SUPPORTED_RATES MAX_LENGTH_OF_SUPPORT_RATES // 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54#define MAX_LEN_OF_KEY 32 // 32 octets == 256 bits, Redefine for WPA#define MAX_NUM_OF_CHANNELS MAX_NUM_OF_CHS // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL termination#define MAX_NUM_OF_11JCHANNELS 20 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL termination#define MAX_LEN_OF_SSID 32#define CIPHER_TEXT_LEN 128#define HASH_TABLE_SIZE 256#define MAX_VIE_LEN 1024 // New for WPA cipher suite variable IE sizes.#define MAX_SUPPORT_MCS 32 //============================================================// ASIC WCID Table definition.//============================================================#define BSSID_WCID 1 // in infra mode, always put bssid with this WCID #define MCAST_WCID 0x0 #define BSS0Mcast_WCID 0x0 #define BSS1Mcast_WCID 0xf8 #define BSS2Mcast_WCID 0xf9#define BSS3Mcast_WCID 0xfa#define BSS4Mcast_WCID 0xfb#define BSS5Mcast_WCID 0xfc#define BSS6Mcast_WCID 0xfd#define BSS7Mcast_WCID 0xfe#define RESERVED_WCID 0xff #define MAX_NUM_OF_ACL_LIST MAX_NUMBER_OF_ACL#define MAX_LEN_OF_MAC_TABLE MAX_NUMBER_OF_MAC // if MAX_MBSSID_NUM is 8, this value can't be larger than 211#if MAX_LEN_OF_MAC_TABLE>MAX_AVAILABLE_CLIENT_WCID#error MAX_LEN_OF_MAC_TABLE can not be larger than MAX_AVAILABLE_CLIENT_WCID!!!!#endif#define MAX_NUM_OF_WDS_LINK_PERBSSID 3#define MAX_NUM_OF_WDS_LINK (MAX_NUM_OF_WDS_LINK_PERBSSID*MAX_MBSSID_NUM)#define MAX_NUM_OF_EVENT MAX_NUMBER_OF_EVENT#define WDS_LINK_START_WCID (MAX_LEN_OF_MAC_TABLE-1) #define NUM_OF_TID 8#define MAX_AID_BA 4#define MAX_LEN_OF_BA_REC_TABLE ((NUM_OF_TID * MAX_LEN_OF_MAC_TABLE)/2)// (NUM_OF_TID*MAX_AID_BA + 32) //Block ACK recipient #define MAX_LEN_OF_BA_ORI_TABLE ((NUM_OF_TID * MAX_LEN_OF_MAC_TABLE)/2)// (NUM_OF_TID*MAX_AID_BA + 32) // Block ACK originator#define MAX_LEN_OF_BSS_TABLE 64#define MAX_REORDERING_MPDU_NUM 512// key related definitions#define SHARE_KEY_NUM 4#define MAX_LEN_OF_SHARE_KEY 16 // byte count#define MAX_LEN_OF_PEER_KEY 16 // byte count#define PAIRWISE_KEY_NUM 64 // in MAC ASIC pairwise key table#define GROUP_KEY_NUM 4#define PMK_LEN 32#define WDS_PAIRWISE_KEY_OFFSET 60 // WDS links uses pairwise key#60 ~ 63 in ASIC pairwise key table#define PMKID_NO 4 // Number of PMKID saved supported#define MAX_LEN_OF_MLME_BUFFER 2048// power status related definitions#define PWR_ACTIVE 0#define PWR_SAVE 1#define PWR_MMPS 2 //MIMO power save//#define PWR_UNKNOWN 2// Auth and Assoc mode related definitions#define AUTH_MODE_OPEN 0x00#define AUTH_MODE_KEY 0x01//#define AUTH_MODE_AUTO_SWITCH 0x03//#define AUTH_MODE_DEAUTH 0x04//#define AUTH_MODE_UPLAYER 0x05 // reserved for 802.11i use// BSS Type definitions#define BSS_ADHOC 0 // = Ndis802_11IBSS#define BSS_INFRA 1 // = Ndis802_11Infrastructure#define BSS_ANY 2 // = Ndis802_11AutoUnknown#define BSS_MONITOR 3 // = Ndis802_11Monitor// Reason code definitions#define REASON_RESERVED 0#define REASON_UNSPECIFY 1#define REASON_NO_LONGER_VALID 2#define REASON_DEAUTH_STA_LEAVING 3#define REASON_DISASSOC_INACTIVE 4#define REASON_DISASSPC_AP_UNABLE 5#define REASON_CLS2ERR 6#define REASON_CLS3ERR 7#define REASON_DISASSOC_STA_LEAVING 8#define REASON_STA_REQ_ASSOC_NOT_AUTH 9#define REASON_INVALID_IE 13#define REASON_MIC_FAILURE 14#define REASON_4_WAY_TIMEOUT 15#define REASON_GROUP_KEY_HS_TIMEOUT 16#define REASON_IE_DIFFERENT 17#define REASON_MCIPHER_NOT_VALID 18#define REASON_UCIPHER_NOT_VALID 19#define REASON_AKMP_NOT_VALID 20#define REASON_UNSUPPORT_RSNE_VER 21#define REASON_INVALID_RSNE_CAP 22#define REASON_8021X_AUTH_FAIL 23#define REASON_CIPHER_SUITE_REJECTED 24#define REASON_DECLINED 37#define REASON_QOS_UNSPECIFY 32 #define REASON_QOS_LACK_BANDWIDTH 33 #define REASON_POOR_CHANNEL_CONDITION 34#define REASON_QOS_OUTSIDE_TXOP_LIMITION 35#define REASON_QOS_QSTA_LEAVING_QBSS 36#define REASON_QOS_UNWANTED_MECHANISM 37#define REASON_QOS_MECH_SETUP_REQUIRED 38#define REASON_QOS_REQUEST_TIMEOUT 39#define REASON_QOS_CIPHER_NOT_SUPPORT 45// Status code definitions#define MLME_SUCCESS 0#define MLME_UNSPECIFY_FAIL 1#define MLME_CANNOT_SUPPORT_CAP 10#define MLME_REASSOC_DENY_ASSOC_EXIST 11 #define MLME_ASSOC_DENY_OUT_SCOPE 12#define MLME_ALG_NOT_SUPPORT 13#define MLME_SEQ_NR_OUT_OF_SEQUENCE 14#define MLME_REJ_CHALLENGE_FAILURE 15#define MLME_REJ_TIMEOUT 16#define MLME_ASSOC_REJ_UNABLE_HANDLE_STA 17#define MLME_ASSOC_REJ_DATA_RATE 18#define MLME_ASSOC_REJ_NO_EXT_RATE 22#define MLME_ASSOC_REJ_NO_EXT_RATE_PBCC 23#define MLME_ASSOC_REJ_NO_CCK_OFDM 24#define MLME_QOS_UNSPECIFY 32#define MLME_REQUEST_DECLINED 37#define MLME_REQUEST_WITH_INVALID_PARAM 38#define MLME_INVALID_GROUP_CIPHER 41#define MLME_INVALID_PAIRWISE_CIPHER 42#define MLME_INVALID_AKMP 43#define MLME_DLS_NOT_ALLOW_IN_QBSS 48#define MLME_DEST_STA_NOT_IN_QBSS 49#define MLME_DEST_STA_IS_NOT_A_QSTA 50#define MLME_INVALID_FORMAT 0x51#define MLME_FAIL_NO_RESOURCE 0x52#define MLME_STATE_MACHINE_REJECT 0x53#define MLME_MAC_TABLE_FAIL 0x54// IE code#define IE_SSID 0#define IE_SUPP_RATES 1#define IE_FH_PARM 2#define IE_DS_PARM 3#define IE_CF_PARM 4#define IE_TIM 5#define IE_IBSS_PARM 6#define IE_COUNTRY 7 // 802.11d#define IE_802_11D_REQUEST 10 // 802.11d#define IE_QBSS_LOAD 11 // 802.11e d9#define IE_EDCA_PARAMETER 12 // 802.11e d9#define IE_TSPEC 13 // 802.11e d9 #define IE_TCLAS 14 // 802.11e d9#define IE_SCHEDULE 15 // 802.11e d9#define IE_CHALLENGE_TEXT 16#define IE_POWER_CONSTRAINT 32 // 802.11h d3.3#define IE_POWER_CAPABILITY 33 // 802.11h d3.3#define IE_TPC_REQUEST 34 // 802.11h d3.3#define IE_TPC_REPORT 35 // 802.11h d3.3#define IE_SUPP_CHANNELS 36 // 802.11h d3.3#define IE_CHANNEL_SWITCH_ANNOUNCEMENT 37 // 802.11h d3.3#define IE_MEASUREMENT_REQUEST 38 // 802.11h d3.3#define IE_MEASUREMENT_REPORT 39 // 802.11h d3.3#define IE_QUIET 40 // 802.11h d3.3#define IE_IBSS_DFS 41 // 802.11h d3.3#define IE_ERP 42 // 802.11g#define IE_TS_DELAY 43 // 802.11e d9#define IE_TCLAS_PROCESSING 44 // 802.11e d9#define IE_QOS_CAPABILITY 46 // 802.11e d6#define IE_HT_CAP 45 // 802.11n d1. HT CAPABILITY. ELEMENT ID TBD#define IE_AP_CHANNEL_REPORT 51 // 802.11k d6#define IE_HT_CAP2 52 // 802.11n d1. HT CAPABILITY. ELEMENT ID TBD#define IE_RSN 48 // 802.11i d3.0#define IE_WPA2 48 // WPA2#define IE_EXT_SUPP_RATES 50 // 802.11g#define IE_SUPP_REG_CLASS 59 // 802.11y. Supported regulatory classes.#define IE_EXT_CHANNEL_SWITCH_ANNOUNCEMENT 60 // 802.11n #define IE_ADD_HT 61 // 802.11n d1. ADDITIONAL HT CAPABILITY. ELEMENT ID TBD#define IE_ADD_HT2 53 // 802.11n d1. ADDITIONAL HT CAPABILITY. ELEMENT ID TBD// For 802.11n D3.03//#define IE_NEW_EXT_CHA_OFFSET 62 // 802.11n d1. New extension channel offset elemet#define IE_SECONDARY_CH_OFFSET 62 // 802.11n D3.03 Secondary Channel Offset element#define IE_WAPI 68 // WAPI information element#define IE_2040_BSS_COEXIST 72 // 802.11n D3.0.3#define IE_2040_BSS_INTOLERANT_REPORT 73 // 802.11n D3.03#define IE_OVERLAPBSS_SCAN_PARM 74 // 802.11n D3.03#define IE_EXT_CAPABILITY 127 // 802.11n D3.03 #define IE_WPA 221 // WPA#define IE_VENDOR_SPECIFIC 221 // Wifi WMM (WME)#define OUI_BROADCOM_HT 51 // #define OUI_BROADCOM_HTADD 52 // #define OUI_PREN_HT_CAP 51 // #define OUI_PREN_ADD_HT 52 // // CCX information#define IE_AIRONET_CKIP 133 // CCX1.0 ID 85H for CKIP #define IE_AP_TX_POWER 150 // CCX 2.0 for AP transmit power#define IE_MEASUREMENT_CAPABILITY 221 // CCX 2.0#define IE_CCX_V2 221#define IE_AIRONET_IPADDRESS 149 // CCX ID 95H for IP Address#define IE_AIRONET_CCKMREASSOC 156 // CCX ID 9CH for CCKM Reassociation Request element#define CKIP_NEGOTIATION_LENGTH 30#define AIRONET_IPADDRESS_LENGTH 10#define AIRONET_CCKMREASSOC_LENGTH 24// ========================================================// MLME state machine definition// ========================================================// STA MLME state mahcines#define ASSOC_STATE_MACHINE 1#define AUTH_STATE_MACHINE 2#define AUTH_RSP_STATE_MACHINE 3#define SYNC_STATE_MACHINE 4#define MLME_CNTL_STATE_MACHINE 5#define WPA_PSK_STATE_MACHINE 6//#define LEAP_STATE_MACHINE 7#define AIRONET_STATE_MACHINE 8#define ACTION_STATE_MACHINE 9// AP MLME state machines#define AP_ASSOC_STATE_MACHINE 11#define AP_AUTH_STATE_MACHINE 12#define AP_SYNC_STATE_MACHINE 14#define AP_CNTL_STATE_MACHINE 15#define WSC_STATE_MACHINE 17#define WSC_UPNP_STATE_MACHINE 18#define WPA_STATE_MACHINE 23#ifdef QOS_DLS_SUPPORT#define DLS_STATE_MACHINE 26#endif // QOS_DLS_SUPPORT //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -