📄 mp_rid.h
字号:
/*++
Copyright (c) 2000-2002 Zydas Corporation
Module Name:
mp_rid.h
Abstract:
This header contains Record Information ID code and
their related structures.
Revision History:
Who When What
-------- -------- ----------------------------------------------
JXiao 08-20-02 created
Notes:
--*/
#ifndef _MPRID_
#define _MPRID_
// The type of INFO frame
#define INFO_COMM_TALLIES 0xF100
#define INFO_SCAN_RESULTS 0xF101
#define INFO_LINK_STATUS 0xF200
//
// INFO_LINK_STATUS (0xF200)
//
typedef enum _MP_LINK_STATUS_TYPE {
LINK_STATUS_CONNECTED = 1,
LINK_STATUS_AP_OUT_OF_RANGE = 4,
LINK_STATUS_AP_IN_RANGE = 5,
} MP_LINK_STATUS_TYPE;
//
// Configuration Records
// The following lists the Rid type used to set the operational
// parameters of the NIC.
//
#define RID_CFG_PORT_TYPE 0xFC00
#define RID_CFG_OWN_MAC_ADDRESS 0xFC01
#define RID_CFG_SSID 0xFC02
#define RID_CFG_CHANNEL 0xFC03
#define RID_CFG_OWN_SSID 0xFC04 // SSID of AP
#define RID_CFG_OWN_ATIM 0xFC05
#define RID_CFG_PM_ENABLE 0xFC09
#define RID_CFG_PM_EPS 0xFC0A
#define RID_CFG_MAX_SLEEP_TIME 0xFC0C
#define RID_CFG_OWN_DTIM_PERIOD 0xFC10 // AP
#define RID_CFG_WDS_ADDR_1 0xFC11 // AP
#define RID_CFG_WDS_ADDR_2 0xFC12 // AP
#define RID_CFG_WDS_ADDR_3 0xFC13 // AP
#define RID_CFG_WDS_ADDR_4 0xFC14 // AP
#define RID_CFG_WDS_ADDR_5 0xFC15 // AP
#define RID_CFG_WDS_ADDR_6 0xFC16 // AP
#define RID_CFG_DEFAULT_KEY_ID 0xFC23 // default key id
#define RID_CFG_DEFAULT_KEY_1 0xFC24 // default key 1
#define RID_CFG_DEFAULT_KEY_2 0xFC25 // default key 2
#define RID_CFG_DEFAULT_KEY_3 0xFC26 // default key 3
#define RID_CFG_DEFAULT_KEY_4 0xFC27 // default key 4
#define RID_CFG_WEP_FLAGS 0xFC28 // wep function flag
#define RID_CFG_WEP_KEY_MAP 0xFC29 // Key Mapping Table
#define RID_CFG_AUTHENTICATION 0xFC2A // Preferred authentication mode
#define RID_CFG_MAX_STATION 0xFC2B // Max # of STAs allowed to be associated
#define RID_CFG_OWN_BEACON_INTERVAL 0xFC33 // Used for creating an IBSS
#define RID_GROUP_ADDR 0xFC80 // Multicast MAC address for reception
#define RID_FRAG_THRESHOLD 0xFC82 // MPDU fragment threshold /dot11FragmentationThreshold
#define RID_RTS_THRESHOLD 0xFC83 // MAC frame data length threshold used for RTS/CTS control /dot11RTSThreshold
#define RID_TX_RATE 0xFC84 // Transmission rate control/dot11OperationalRateSet
#define RID_PROMISCUOUS_MODE 0xFC85 // Switch for Promiscuous mode reception / dot11Address1-32
#define RID_FRAG_THRESHOLD_0 0xFC90 // For AP Port 0
#define RID_FRAG_THRESHOLD_1 0xFC91 // for AP Port 1
#define RID_FRAG_THRESHOLD_2 0xFC92 // for AP Port 2
#define RID_FRAG_THRESHOLD_3 0xFC93 // for AP Port 3
#define RID_FRAG_THRESHOLD_4 0xFC94 // for AP Port 4
#define RID_FRAG_THRESHOLD_5 0xFC95 // for AP Port 5
#define RID_FRAG_THRESHOLD_6 0xFC96 // for AP Port 6
#define RID_RTS_THRESHOLD_0 0xFC97 // for AP port 0
#define RID_RTS_THRESHOLD_1 0xFC98 // for AP port 1
#define RID_RTS_THRESHOLD_2 0xFC99 // for AP port 2
#define RID_RTS_THRESHOLD_3 0xFC9A // for AP port 3
#define RID_RTS_THRESHOLD_4 0xFC9B // for AP port 4
#define RID_RTS_THRESHOLD_5 0xFC9C // for AP port 5
#define RID_RTS_THRESHOLD_6 0xFC9D // for AP port 6
#define RID_TX_RATE_CTL_0 0xFC9E // for AP port 0
#define RID_TX_RATE_CTL_1 0xFC9F // for AP port 1
#define RID_TX_RATE_CTL_2 0xFCA0 // for AP port 2
#define RID_TX_RATE_CTL_3 0xFCA1 // for AP port 3
#define RID_TX_RATE_CTL_4 0xFCA2 // for AP port 4
#define RID_TX_RATE_CTL_5 0xFCA3 // for AP port 5
#define RID_TX_RATE_CTL_6 0xFCA4 // for AP port 6
#define RID_CFG_PREAMBLE 0xFCB0 // Switch for applying 802.11b short preamble
#define RID_CFG_BASIC_RATES 0xFCB3 // Basic rates of the BSS that the station is connected or to connect to
#define RID_CFG_AUTHENT_STA 0xFCE3 // Request to authenticate with a particular station
//
// Information Records
//
// NIC Information Records
//
#define RID_MAX_DOWNLOAD_TIME 0xFD00 // PRI: Maximum response time for download command
#define RID_DOWNLOAD_BUFFER 0xFD01 // PRI: Download buffer information
#define RID_PRI_IDENTITY 0xFD02 // PRI: Primary functions firmware ID
#define RID_PRI_SUP_RANGE 0xFD03 // PRI: Primary functions interface; supplier compatibility ranges
#define RID_PRI_CFI_ACT_RANGE 0xFD04 // PRI: Controller interface; Actor compatibility ranges
#define RID_NIC_SERIAL_NUM 0xFD0A // PRI: The S/N of Network interface card.
#define RID_NIC_IDENTITY 0xFD0B // PRI: The ID of Network interface card.
#define RID_MFI_SUP_RANGE 0xFD0C // PRI: Modem interface; supplier compatibility ranges.
#define RID_CFI_SUP_RANGE 0xFD0D // PRI: Controller interface; supplier compatibility ranges.
#define RID_CHANNEL_LIST 0xFD10 // Allowed RF channel
#define RID_REGULATORY_DOMAINS 0xFD11 // List of intended regulatory domains.
#define RID_TEMP_TYPE 0xFD12 // Hardware temperature range code / dot11 Temp Type
#define RID_CIS 0xFD13 // PC Card standard card information structure
#define RID_STA_IDENTITY 0xFD20 // STA: The ID of the station function firmware
#define RID_STA_SUP_RANGE 0xFD21 // STA: station interface; supplier compatibility range
#define RID_STA_MFI_ACTOR_RANGE 0xFD22 // STA: modem interface; Actor compatibility range
#define RID_STA_CFI_ACTOR_RANGE 0xFD23 // STA: controller interface; Actor compatibility range
#define RID_FW_VERSION 0xFD3F
// MAC Information Records
#define RID_PORT_STATUS 0xFD40 // STA: MAC port connection status
#define RID_CURRENT_SSID 0xFD41 // STA: Current SSID
#define RID_CURRENT_BSSID 0xFD42 // STA: Current BSSID
#define RID_COMMS_QUALITY 0xFD43 // STA: Communication quality of the BSS connection
#define RID_CURR_TX_RATE 0xFD44 // STA: Transmission rate for management frames
#define RID_MAX_RX_LIFE 0xFD4B // Lifetime for a frame in reception process / dot11MaxReceiveLifetime
#define RID_CURR_TX_RATE_1 0xFD80 // AP: Port 1
#define RID_CURR_TX_RATE_2 0xFD81 // AP: Port 2
#define RID_CURR_TX_RATE_3 0xFD82 // AP: Port 3
#define RID_CURR_TX_RATE_4 0xFD83 // AP: Port 4
#define RID_CURR_TX_RATE_5 0xFD84 // AP: Port 5
#define RID_CURR_TX_RATE_6 0xFD85 // AP: Port 6
#define RID_AP_OWN_MAC_ADDR 0xFD86 // AP: dot11MACAddress
#define RID_SCAN_RESULTS 0xFD88 // Scan results in response to the Host scan request
#define RID_CURR_CHANNEL 0xFDC1 // RF channel currently used for transmission / dot11CurrentChannel
#define RID_SUPPORTED_DATA_RATES 0xFDC6 // Data rates capability information
#include <pshpack1.h>
//
// RID_CFG_PORT_TYPE (0xFC00)
//
typedef enum _MP_PORT_TYPE {
PORT_TYPE_IBSS = 0,
PORT_TYPE_BSS = 1,
PORT_TYPE_PSIBSS = 3,
} MP_PORT_TYPE;
//
// RID_CFG_WEP_FLAGS (0xFC28)
//
#define PRIVACY_INVOKED_BIT 0x0001
#define EXCLUDE_UNENCRYPTED_BIT 0x0002
#define DISABLE_TX_ENCRYPT_BIT 0x0010
#define RANDOM_IV 0x0020
#define DISABLE_RX_DECRYPT_BIT 0x0080
#define ENABLE_128BIT_WEP 0x0100
//
// RID_DOWNLOAD_BUFFER (0xFD01)
//
typedef struct _DOWNLOAD_BUFFER_STRUCT {
USHORT page;
USHORT offset;
USHORT length;
} DOWNLOAD_BUFFER_STRUCT, *PDOWNLOAD_BUFFER_STRUCT;
//
// RID_PORT_STATUS (0xFD40)
//
typedef enum _MP_PORT_STATUS {
PORT_DISABLED = 1,
PORT_SEARCHING = 2,
PORT_IBSS = 3,
PORT_ESS = 4,
PORT_OUT_OF_RANGE = 5,
PORT_WDS = 6,
PORT_AP = 7,
PORT_PSIBSS = 8
} MP_PORT_STATUS;
//
// RID_COMMS_QUALITY (0xFD43)
//
typedef struct _COMMS_QUALITY_STRUCT {
USHORT snr; // Signal quality
USHORT SignalLevel; // Signal Level
USHORT NoiseLevel; // TBD
} COMMS_QUALITY_STRUCT, *PCOMMS_QUALITY_STRUCT;
//
// For INFO_SCAN_RESULTS (0xF101)
//
typedef struct _MP_BSS_INFO_STRUCT {
USHORT channelId; // Channel # of Probe Response
USHORT noiseLevel; // Average Noise Level of Probe Response
USHORT signalLevel; // Signal Level of Probe Response
UCHAR bssid[6];
USHORT beaconInterval;
USHORT capability;
USHORT ssidLength;
UCHAR ssid[32];
UCHAR supRates[8];
USHORT supRatesZeroStamp;
USHORT rxRate;
} MP_BSS_INFO_STRUCT, *PMP_BSS_INFO_STRUCT;
typedef struct _SCAN_RESULTS_STRUCT {
USHORT reserved;
USHORT reason;
MP_BSS_INFO_STRUCT MPBssInfo[1];
} SCAN_RESULTS_STRUCT, *PSCAN_RESULTS_STRUCT;
// The constant definition of each member in Capability information field
#define CF_ESS_BIT 0x0001
#define CF_IBSS_BIT 0x0002
#define CF_POLLABLE_BIT 0x0004
#define CF_POLL_REQ_BIT 0x0008
#define CF_PRIVACY_BIT 0x0010
//
// RID_INFO_COMM_TALLIES (0xF100)
//
// Communication Tallies Internal struct
//
typedef struct _LOCAL_TALLY_STRUCT {
ULONGLONG txUnicastFrames;
ULONGLONG txMulticastFrames;
ULONGLONG reserved1;
ULONGLONG txUniOctets;
ULONGLONG txMultiOctets;
ULONGLONG reserved2;
ULONGLONG reserved3;
ULONGLONG txMultipleRetriesFrames;
ULONGLONG txRetryLimitExceeded;
ULONGLONG reserved4;
ULONGLONG rxUnicastFrames;
ULONGLONG rxMulticastFrames;
ULONGLONG rxPLCPCRCErrCnt;
ULONGLONG rxUniOctets;
ULONGLONG rxMultiOctets;
ULONGLONG rxCRC32ErrCnt;
ULONGLONG rxDiscardedCnt;
ULONGLONG rxTotalCnt;
ULONGLONG rxDecrypFailCnt;
ULONGLONG reserved7;
ULONGLONG reserved8;
} LOCAL_TALLY_STRUCT, *PLOCAL_TALLY_STRUCT;
typedef struct _BYTE_STRING {
USHORT StringLen;
UCHAR Str[1];
} BYTE_STRING, *PBYTE_STRING;
typedef struct _RID_STRUCT {
USHORT length;
USHORT rid;
union {
USHORT data[500];
USHORT ushort;
USHORT linkStatus;
BYTE_STRING byteString;
LOCAL_TALLY_STRUCT tally;
SCAN_RESULTS_STRUCT scan;
COMMS_QUALITY_STRUCT commsQ;
DOWNLOAD_BUFFER_STRUCT download;
} u;
} RID_STRUCT, *PRID_STRUCT;
#include <poppack.h>
#endif // _MPRID_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -