📄 rtmp_def.h
字号:
// ACK policy of QOS Control field bit 6:5
#define NORMAL_ACK 0x00 // b6:5 = 00
#define NO_ACK 0x20 // b6:5 = 01
#define NO_EXPLICIT_ACK 0x40 // b6:5 = 10
#define BLOCK_ACK 0x60 // b6:5 = 11
//
// 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
#define CCK_RATE 1
#define OFDM_RATE 2
#define CCKOFDM_RATE 3
// 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_7_BG_BAND 7 // 1, 6, 11 (for Test purpose)
#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
// 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
// value domain for pAd->RfIcType
#define RFIC_5226 1 //A/B/G
#define RFIC_2528 2 //B/G
#define RFIC_5225 3 //A/B/G
#define RFIC_2527 4 //B/G
// 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
#define LED_MODE_TWO_LED 1
#define LED_MODE_SIGNAL_STREGTH 2
// 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
#define MAX_INI_BUFFER_SIZE (4*1024) // 4K bytes
#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
// 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
// definition RSSI Number
#define RSSI_NO_1 1
#define RSSI_NO_2 2
////////////////////////////////////////////////////////////////////////////
// RT73 internal usage
////////////////////////////////////////////////////////////////////////////
#define CMD_RESET_BULKOUT 0
#define CMD_RESET_BULKIN 1
#define CMD_RESET_FROM_ERROR 2
#define CMD_LINK_DOWN 3
#define CMD_UPDATE_TX_RATE 4
#define CMD_SET_PSM_SAVE 5
#define CMD_RESET_FROM_NDIS 6
#define CMD_PERIODIC_EXECUT 7
#define CMD_ASICLED_EXECUT 8
#define CMD_CHECK_GPIO 9
#define CMD_Remove_AllKeys 10
#define CMD_SOFT_DIVERSITY 11
#define CMD_FORCE_WAKEUP 12
#define CMD_SET_PSM_ACTIVE 13
#define COMMAND_QUEUE_SIZE 14
#define USB_DEVICE_MAX_CONFIG_DESCRIPTOR_SIZE 1024
#define UNLINK_TIMEOUT_MS 3
//-------------------
// Frame Sizes
//-------------------
#define MAC_ADDRESS_LENGTH 6
#define HEADER_SIZE 14
#define MAXIMUM_PACKET_SIZE 1500
#define USB_DEVICE_MAX_CONFIG_DESCRIPTOR_SIZE 1024
#define MAX_QUEUE_SIZE 100
#define USB_TX_HEADER_SIZE 8//WLength+TxRate+PaddingBytes+Reserved
#define USB_RX_HEADER_SIZE 12
#define WIRELESS_HEADER_OVERHEAD 18
#define MAX_TX_PADDING_BYTES 50
#define MAX_RX_PADDING_BYTES 66
#define CRC32_BYTES 4
#define MAX_WIRELESS_SIZE WIRELESS_HEADER_OVERHEAD + HEADER_SIZE + MAXIMUM_PACKET_SIZE + CRC32_BYTES
//--------------------
// REQUEST SUPPORT
//--------------------
#define DEVICE_VENDOR_REQUEST_OUT (USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE) // 0x40
#define DEVICE_VENDOR_REQUEST_IN (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE ) // 0xc0
#define INTERFACE_VENDOR_REQUEST_OUT 0x41
#define INTERFACE_VENDOR_REQUEST_IN 0xc1
#define RETRY_LIMIT 3
typedef UCHAR ADDRESS[MAC_ADDRESS_LENGTH];
//-------------------
// VENDOR ID
//-------------------
#define RTVID1 0x148f //ralink
#define RTPID1 0x2573
#define RTPID2 0x2671
#define RTVID3 0x050d
#define RTPID3 0x7050
#define QCOMVID 0x18e8 // Qcom
#define QCOMPID 0x6196
#define GIGABYTEVID 0x1044 // Gigabyte
#define GIGABYTEPID 0x8008
#define CONCEPTRONICVID 0x14b2 // Conceptronic
#define CONCEPTRONICPID 0x3c22
#define MSIVID 0x0db0 // MSI
#define MSIPID1 0x6877
#define MSIPID2 0xa874
#define RT73_USB_DEVICES { \
{USB_DEVICE(RTVID1,RTPID1)}, \
{USB_DEVICE(RTVID1,RTPID2)}, \
{USB_DEVICE(RTVID3,RTPID3)}, \
{USB_DEVICE(QCOMVID,QCOMPID)}, \
{USB_DEVICE(GIGABYTEVID,GIGABYTEPID)}, \
{USB_DEVICE(CONCEPTRONICVID,CONCEPTRONICPID)}, \
{USB_DEVICE(MSIVID,MSIPID1)}, \
{USB_DEVICE(MSIVID,MSIPID2)}, \
{USB_DEVICE(0x07d1,0x3c03)}, \
{USB_DEVICE(0x07d1,0x3c04)}, \
{USB_DEVICE(0,0)}} /* end marker */
#endif // __RTMP_DEF_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -