📄 rtmp_def.h
字号:
#define BLOCK_ACK 0x60 // b6:5 = 11
#define ASSOC_STATE_MACHINE 1
#define AUTH_STATE_MACHINE 2
#define AUTH_RSP_STATE_MACHINE 3
#define SYNC_STATE_MACHINE 4
#define WPA_STATE_MACHINE 5
#define DLS_STATE_MACHINE 6
#ifdef APCLI_SUPPORT
#define STA_AUTH_STATE_MACHINE 7
#define STA_ASSOC_STATE_MACHINE 8
#define STA_SYNC_STATE_MACHINE 9
#define STA_CTRL_STATE_MACHINE 10
#define STA_WPA_STATE_MACHINE 11
#endif
//
// rtmp_data.c use these definition
//
#define LENGTH_802_11 24
#define LENGTH_802_11_WITH_ADDR4 30
#define LENGTH_802_11_AND_H 30
#define LENGTH_802_11_CRC_H 34
#define LENGTH_802_11_CRC 28
#define LENGTH_802_3 14
#define LENGTH_802_3_TYPE 2
#define LENGTH_802_1_H 8
#define LENGTH_EAPOL_H 4
#define LENGTH_CRC 4
#define MAX_SEQ_NUMBER 0x0fff
#define TX_RESULT_SUCCESS 0
#define TX_RESULT_ZERO_LENGTH 1
#define TX_RESULT_UNDER_RUN 2
#define TX_RESULT_PHY_ERROR 4
#define TX_RESULT_RETRY_FAIL 6
#define RATE_1 0
#define RATE_2 1
#define RATE_5_5 2
#define RATE_11 3
#define RATE_6 4 // OFDM
#define RATE_9 5 // OFDM
#define RATE_12 6 // OFDM
#define RATE_18 7 // OFDM
#define RATE_24 8 // OFDM
#define RATE_36 9 // OFDM
#define RATE_48 10 // OFDM
#define RATE_54 11 // OFDM
#define RATE_FIRST_OFDM_RATE RATE_6
#define RATE_AUTO_SWITCH 255 // for UserCfg.FixedTxRate only
// pTxD->Ifs
#define IFS_BACKOFF 0
#define IFS_SIFS 1
// pTxD->RetryMode
#define LONG_RETRY 1
#define SHORT_RETRY 0
// Country Region definition
#define REGION_0_BG_BAND 0 // 1-11
#define REGION_1_BG_BAND 1 // 1-13
#define REGION_2_BG_BAND 2 // 10-11
#define REGION_3_BG_BAND 3 // 10-13
#define REGION_4_BG_BAND 4 // 14
#define REGION_5_BG_BAND 5 // 1-14
#define REGION_6_BG_BAND 6 // 3-9
#define REGION_0_A_BAND 0 // 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165
#define REGION_1_A_BAND 1 // 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140
#define REGION_2_A_BAND 2 // 36, 40, 44, 48, 52, 56, 60, 64
#define REGION_3_A_BAND 3 // 52, 56, 60, 64, 149, 153, 157, 161
#define REGION_4_A_BAND 4 // 149, 153, 157, 161, 165
#define REGION_5_A_BAND 5 // 149, 153, 157, 161
#define REGION_6_A_BAND 6 // 36, 40, 44, 48
#define REGION_7_A_BAND 7 // 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165
#define REGION_8_A_BAND 8 // 52, 56, 60, 64
#define REGION_9_A_BAND 9 // 34, 38, 42, 46 already not used
#define REGION_10_A_BAND 10 // 36, 40, 44, 48, 52, 56, 60, 64
// pTxD->CipherAlg
#define CIPHER_NONE 0
#define CIPHER_WEP64 1
#define CIPHER_WEP128 2
#define CIPHER_TKIP 3
#define CIPHER_AES 4
#define CIPHER_CKIP64 5
#define CIPHER_CKIP128 6
#define CIPHER_TKIP_NO_MIC 7 // MIC has been appended by driver;
// not a valid value in hardware key table
// Stall execution time for ndisdpracquires[inlock in miniportReset function
#define WAIT_TIME_FOR_SPINLOCK 10 // usec
// value domain of pAdapter->RfIcType
#define RFIC_5225 1 // Support a/b/g mode
#define RFIC_5325 2 // Support a/b/g mode
#define RFIC_2527 3 // Support b/g mode
#define RFIC_2529 4 // Support b/g mode
// LED Status.
#define LED_LINK_DOWN 0
#define LED_LINK_UP 1
#define LED_RADIO_OFF 2
#define LED_RADIO_ON 3
#define LED_HALT 4
// value domain of pAdapter->LedCntl.LedMode and E2PROM
#define LED_MODE_DEFAULT 0
// RC4 init value, used fro WEP & TKIP
#define PPPINITFCS32 0xffffffff /* Initial FCS value */
#define PAIRWISE_KEY_TABLE 1
#define SHARED_KEY_TABLE 0
#define DEFAULT_BBP_TX_POWER 0
#define DEFAULT_RF_TX_POWER 5
#ifdef MBSS_SUPPORT
#define MAX_INI_BUFFER_SIZE (4*2048)
#else
#define MAX_INI_BUFFER_SIZE 4096
#endif /* MBSS_SUPPORT */
#define MAX_PARAM_BUFFER_SIZE (2048) // enough for ACL (18*64)
#define MAX_NUM_OF_ACL_LIST 64
#define MAX_LEN_OF_MAC_TABLE 64
#define HASH_TABLE_SIZE 256
// Event definition
#define MAX_NUM_OF_EVENT 10 // entry # in EVENT table
#define EVENT_MAX_EVENT_TYPE 6
#define EVENT_RESET_ACCESS_POINT 0 // Log = "hh:mm:ss Restart Access Point"
#define EVENT_ASSOCIATED 1 // Log = "hh:mm:ss STA 00:01:02:03:04:05 associated"
#define EVENT_DISASSOCIATED 2 // Log = "hh:mm:ss STA 00:01:02:03:04:05 left this BSS"
#define EVENT_AGED_OUT 3 // Log = "hh:mm:ss STA 00:01:02:03:04:05 was aged-out and removed from this BSS"
#define EVENT_COUNTER_M 4
#define EVENT_INVALID_PSK 5
#define EVENT_MAX_EVENT_TYPE 6
// MBSSID definition
#define ENTRY_NOT_FOUND 0xFF
#ifdef MBSS_SUPPORT
#ifdef APCLI_SUPPORT
#define MAX_MBSSID_NUM 3
#else
#define MAX_MBSSID_NUM 4
#endif /* APCLI_SUPPORT */
#else
#define MAX_MBSSID_NUM 1
#endif /* !MBSS_SUPPORT */
#define MAIN_MBSSID 0
#define FIRST_MBSSID 1
/* After Linux 2.6.9,
* VLAN module use Private (from user) interface flags (netdevice->priv_flags).
* #define IFF_802_1Q_VLAN 0x1 -- 802.1Q VLAN device. in if.h
* ref to ip_sabotage_out() [ out->priv_flags & IFF_802_1Q_VLAN ] in br_netfilter.c
*
* For this reason, we MUST use EVEN value in priv_flags
*/
#define INT_MAIN 0x0100
#define INT_MBSSID 0x0200
#define INT_WDS 0x0300
#define INT_APCLI 0x0400
// APCLI definition
#ifdef APCLI_SUPPORT
#define MAX_APCLI_ENTRY 1
#define APCLI_PAIRWISE_KEY_OFFSET (PAIRWISE_KEY_NO - MAX_APCLI_ENTRY) // Ap Client links uses pairwise key#63 in ASIC pairwise key table when MAX_APCLI_ENTRY is 1
#else
#define MAX_APCLI_ENTRY 0
#endif
// WDS definition
#define MAX_WDS_ENTRY 4
#define WDS_PAIRWISE_KEY_OFFSET (PAIRWISE_KEY_NO - MAX_APCLI_ENTRY - MAX_WDS_ENTRY) // WDS links uses pairwise key#59 ~ 62 in ASIC pairwise key table when MAX_APCLI_ENTRY is 1
#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
// 802.1X controlled port definition
#define WPA_802_1X_PORT_SECURED 1
#define WPA_802_1X_PORT_NOT_SECURED 2
#define PAIRWISE_KEY 1
#define GROUP_KEY 2
#define AUTH_MODE_OPEN 0x00
#define AUTH_MODE_KEY 0x01
#define AUTH_MODE_AUTO_SWITCH 0x03
// wpapsk EAPOL Key descripter frame format related length
#define LEN_KEY_DESC_NONCE 32
#define LEN_KEY_DESC_IV 16
#define LEN_KEY_DESC_RSC 8
#define LEN_KEY_DESC_ID 8
#define LEN_KEY_DESC_REPLAY 8
#define LEN_KEY_DESC_MIC 16
#define LEN_MASTER_KEY 32
// EAPOL EK, MK
#define LEN_EAP_EK 16
#define LEN_EAP_MICK 16
#define LEN_EAP_KEY ((LEN_EAP_EK)+(LEN_EAP_MICK))
#define PMK_LEN 32
// TKIP key related
#define LEN_PMKID 16
#define LEN_TKIP_EK 16
#define LEN_TKIP_RXMICK 8
#define LEN_TKIP_TXMICK 8
#define LEN_AES_EK 16
#define LEN_AES_KEY LEN_AES_EK
#define LEN_TKIP_KEY ((LEN_TKIP_EK)+(LEN_TKIP_RXMICK)+(LEN_TKIP_TXMICK))
#define TKIP_AP_TXMICK_OFFSET ((LEN_EAP_KEY)+(LEN_TKIP_EK))
#define TKIP_AP_RXMICK_OFFSET (TKIP_AP_TXMICK_OFFSET+LEN_TKIP_TXMICK)
#define TKIP_GTK_LENGTH ((LEN_TKIP_EK)+(LEN_TKIP_RXMICK)+(LEN_TKIP_TXMICK))
#define LEN_PTK ((LEN_EAP_KEY)+(LEN_TKIP_KEY))
#define MAX_LEN_OF_RSNIE 80
#define MIN_LEN_OF_RSNIE 8
#define MAX_PACKETS_IN_QUEUE 1600 // to pass WMM A5-WPAPSK
#define MAX_PACKETS_IN_MCAST_PS_QUEUE 32
#define MAX_PACKETS_IN_PS_QUEUE 32
// definition RSSI Number
#define RSSI_NO_1 1
#define RSSI_NO_2 2
// definition of signal
#define SIG_NONE 0
#define SIG_ASSOCIATION 1
#define SIG_REASSOCIATION 2
// definition of radar detection
#define RD_NORMAL_MODE 0 // Not found radar signal
#define RD_SWITCHING_MODE 1 // Found radar signal, and doing channel switch
#define RD_SILENCE_MODE 2 // After channel switch, need to be silence a while to ensure radar not found
#ifdef RALINK_ATE
#define ATE_APSTOP 0 // Stop AP
#define ATE_APSTART 1 // Start AP
#define ATE_TXCONT 2 // Continuous Transmit
#define ATE_TXCARR 3 // Transmit Carrier
#define ATE_TXFRAME 4 // Transmit Frames
#define ATE_RXFRAME 5 // Receive Frames
#endif // RALINK_ATE
#define MAX_CFG_BUFFER_LEN 1536
#ifdef SNMP
// for snmp
// to get manufacturer OUI, kathy
#define ManufacturerOUI_LEN 3
#define ManufacturerNAME ("Ralink Technology Company.")
#define ResourceTypeIdName ("Ralink_ID")
#endif
#endif // __RTMP_DEF_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -