📄 80211_api.h
字号:
// NDIS_SUPP_LOGGING_ON = Supplicant Logging Enabled
// NDIS_SUPP_LOGGING_OFF = Supplicant Logging Disabled
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_EnableSuppLogging)(ULONG);
#else
UINT EnableSuppLogging(ULONG);
#endif
///////////////////////////////////////////////////////////////////////////////
//
// Function: SwitchPacketDriver(USHORT)
//
// Parameters: USHORT
//
// Description: Call this function with one of the following values to switch
// between available packet drivers on the system. If successful,
// this function will return ERROR_SUCCESS.
//
// NOTE: After switching to a new packet driver, a warm boot is
// required for changes to take effect.
//
// INTERMEC_PACKET_DRIVER = Intermec Packet Driver (ZNICZIO)
// NDISUIO_PACKET_DRIVER = Microsoft Packet Driver (NDISUIO)
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_SwitchPacketDriver)(USHORT);
#else
UINT SwitchPacketDriver(USHORT);
#endif
///////////////////////////////////////////////////////////////////////////////
// Basic Sizes and Defines and Errors
///////////////////////////////////////////////////////////////////////////////
#define MAC_ADDR_LEN 6 // Standard length of UNFORMATTED mac address
#define SSID_LEN 32 // Standard length of SSID without NULL terminator
#define MAX_NDIS_DEVICE_NAME_LEN 256 // Maximum length of the NDIS Device Name
#define ERR_ON_CREATE_FILE 0xC0000001 // Failure when trying to create file to packet driver
#define ERR_ON_OPEN_DEVICE 0xC0000002 // Failure when trying to locate NIC
#define ERR_CONNECT_FAILED 0xC0000003 // Failure when trying to connect to the NIC
#define ERR_QUERY_FAILED 0xC0000004 // Generic Query Failure
#define ERR_FUNCTION_DEPRECIATED 0xC0000005 // Function is no longer supported
#define ERR_ZERO_CONFIG_ENABLED 0xC0000006 // Microsoft's Zero Config is enabled,
// programatically setting of this parameter
// is prohibited, use ZeroConfig API instead
#define ERR_ZERO_CONFIG_CHANGE_FAILED 0xC0000007 // Changing the state of ZeroConfig failed
#define ERR_CANT_SET_WHILE_ZERO_CONFIG_ENABLED 0xC0000008 // ZeroConfig is enabled on the system, most
// SET calls will not allow sets while ZeroConfig
// is enabled
#define ERR_NOT_IMPLEMENTED 0xC0000009 // The function is not implemented
#define ERR_CANT_SET_WHILE_ZERO_CONFIG_DISABLED 0xC0000010 // ZeroConfig is disabled on the system, can't
// set when ZeroConfig is disabled. Most commonly
// encountered when trying to turn of ZC when it is off
#define ERR_SCANLIST_EXHAUSTED 0xC0000011 // End of scanlist was reached without connection.
#define ERR_SUPPLICANT 0xC0000012 // Generic Supplicant Error
#define ERR_SERVICE_MANAGER_FAILURE 0xC0000013 // Failure using Service Manager
#define ERR_SERVICE_OPEN_FAILURE 0xC0000014 // Failure opening Service
#define ERR_SERVICE_CONTROL_FAILURE 0xC0000015 // Failure trying to control Service
#define ERR_CANNOT_LOCATE_802_PM 0xC0000016 // 80211PM.DLL was not found on the system
#define ERR_CANNOT_FIND_802_PM_EXPORTS 0xC0000017 // Possibly early or wrong version of 80211PM.DLL
#define ERR_COULD_NOT_SET_ACTIVE_PROFILE 0xC0000018 // Failure when setting active profile in 80211PM.DLL
#define ERR_DATA_ACQ_FAILED 0xC0000019 // Failure obtaining data from 80211PM.DLL
#define ERR_ERROR_SUCCESS_INVALID_DATA 0xC0000020 // Call completed, but invalid data was returned
#define ERR_FAILED_NDIS_BIND_WAIT 0xC0000021 // Failure waiting for NDIS BIND
#define ERR_DEVICE_ENUM_TERM_ABNORMAL 0xC0000022 // Device Enumeration Terminated Abnormally
#define ERR_SERVICE_CTL_FAILURE 0xC0000023 // Service Control Failure
///////////////////////////////////////////////////////////////////////////////
// Additional Response Defines
///////////////////////////////////////////////////////////////////////////////
// Network Types - NO NOT CONFUSE WITH INFRASTRUCTURE TYPE
#define NDIS_NET_TYPE_FH 0 // Frequency Hopping
#define NDIS_NET_TYPE_DS 1 // Direct Sequence
#define NDIS_NET_TYPE_UNDEFINED 2 // not a real type, defined as an upper bound
// TX Power level
// These really only apply to Intel Adapters
#define NDIS_POWER_LEVEL_63 0 // 63 mW
#define NDIS_POWER_LEVEL_30 1 // 30 mW
#define NDIS_POWER_LEVEL_15 2 // 15 mW
#define NDIS_POWER_LEVEL_5 3 // 5 mW
#define NDIS_POWER_LEVEL_1 4 // 1 mW
#define NDIS_POWER_LEVEL_UNKNOWN 5 // Unknown!
// antenna modes
#define ANT_PRIMARY 1 // Primary Antenna
#define ANT_SECONDARY 2 // Secondary Antenna
#define ANT_DIVERSITY 0 // Diversity
// Network type
#define NDIS_NET_MODE_IBSS 0 // Ad-Hoc (802.11)
#define NDIS_NET_MODE_ESS 1 // Infrastructure
#define NDIS_NET_AUTO_UNKNOWN 2 // Auto
#define NDIS_NET_MODE_UNKNOWN 3 // Anything Else/Unknown Error
#define NDIS_NET_TYPE_OFDM_5G 4 // 5 Gigahertz 54 Mbps
#define NDIS_NET_TYPE_OFDM_2_4G 5 // 802.11g 2.4 Gigahertz
// association
#define NDIS_RADIO_ASSOCIATED 0 // the radio is associated with a network
#define NDIS_RADIO_SCANNING 1 // the radio is looking for a network to associate with
// Wep Status
#define NDIS_RADIO_WEP_ENABLED 0 // Wep is currently enabled
#define NDIS_RADIO_WEP_DISABLED 1 // Wep is currently disabled
#define NDIS_RADIO_WEP_NOT_SUPPORTED 2 // wep is not supported
#define NDIS_RADIO_WEP_ABSENT 3 // wep key is absent
// Encryption Modes (an extension of Wep Status)
#define NDIS_ENCRYPTION_1_ENABLED 0 // Indicates that WEP is enabled; TKIP and AES are not
// enabled, and a transmit key may or may not be available.
// (same as NDIS_RADIO_WEP_ENABLED)
#define NDIS_ENCRYPTION_DISABLED 1 // Indicates that AES, TKIP, and WEP are disabled, and a
// transmit key is available. (Same as NDIS_RADIO_WEP_DISABLED)
#define NDIS_ENCRYPTION_NOT_SUPPORTED 2 // Indicates that encryption (WEP, TKIP, and AES) is not
// supported. (Same as NDIS_RADIO_WEP_NOT_SUPPORTED)
#define NDIS_ENCRYPTION_1_KEY_ABSENT 3 // Indicates that AES, TKIP, and WEP are disabled, and a
// transmit key is not available. (Same as NDIS_RADIO_WEP_ABSENT)
#define NDIS_ENCRYPTION_2_ENABLED 4 // Indicates that TKIP and WEP are enabled; AES is not enabled,
// and a transmit key is available.
#define NDIS_ENCRYPTION_2_KEY_ABSENT 5 // Indicates that there are no transmit keys available for
// use by TKIP or WEP, and TKIP and WEP are enabled;
// AES is not enabled.
#define NDIS_ENCRYPTION_3_ENABLED 6 // Indicates that AES, TKIP, and WEP are enabled, and a
// transmit key is available.
#define NDIS_ENCRYPTION_3_KEY_ABSENT 7 // Indicates that there are no transmit keys available for
// use by AES, TKIP, or WEP, and AES, TKIP, and WEP are enabled.
// Authentication Mode
#define NDIS_RADIO_AUTH_MODE_OPEN 0 // Open Mode Authentication
#define NDIS_RADIO_AUTH_MODE_SHARED 1 // Shared Mode Authentication
#define NDIS_RADIO_AUTH_MODE_AUTO 2 // Automatic Mode Selection (Not Recommended!)
#define NDIS_RADIO_AUTH_MODE_ERROR 3 // Error defined for GET calls
#define NDIS_RADIO_AUTH_MODE_WPA 4 // WPA Authentication
#define NDIS_RADIO_AUTH_MODE_WPA_PSK 5 // WPA Preshared Key Authentication
#define NDIS_RADIO_AUTH_MODE_WPA_NONE 6 // WPA None
// power mode
#define NDIS_RADIO_POWER_MODE_CAM 0 // Continious Access Mode (eg, Always On)
#define NDIS_RADIO_POWER_MODE_PSP 1 // Power Saving Mode
#define NDIS_RADIO_POWER_UNKNOWN 2 // Unknown Defined for GET calls.
#define NDIS_RADIO_POWER_AUTO 3 // Automatic Switching
#define NDIS_RADIO_POWER_MODE_FAST_PSP 4 // Fast Power Savings Profile
// network EAP (CCX)
#define NDIS_NETWORK_EAP_MODE_OFF 0 // EAP/CCX Off
#define NDIS_NETWORK_EAP_MODE_ON 1 // EAP/CCX On
// mixed mode
#define NDIS_MIXED_CELL_OFF 0 // Mixed Mode Off
#define NDIS_MIXED_CELL_ON 1 // Mixed Mode On
// supplicant logging
#define NDIS_SUPP_LOGGING_ON 4 // Supplicant Logging On
#define NDIS_SUPP_LOGGING_OFF 5 // Supplicant Logging Off
// switch packet driver
#define INTERMEC_PACKET_DRIVER 0 // Intermec Packet Driver (ZNICZIO)
#define NDISUIO_PACKET_DRIVER 1 // Microsoft Packet Driver (NDISUIO)
///////////////////////////////////////////////////////////////////////////////
//
// Functions that are depreciated, yet available for legacy use.
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetRTSThreshold(USHORT &);
//
// Parameters: USHORT &
//
// Description: This function is depreciated.
//
///////////////////////////////////////////////////////////////////////////////
// UINT GetRTSThreshold(USHORT &);
///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetMedia(ULONG &);
//
// Parameters: ULONG &
//
// Description: This function is depreciated.
//
///////////////////////////////////////////////////////////////////////////////
// UINT GetMedia(ULONG &);
///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetMedium(ULONG &);
//
// Parameters: ULONG &
//
// Description: This function is depreciated.
//
///////////////////////////////////////////////////////////////////////////////
// UINT GetMedium(ULONG &);
///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetNicStats(NDIS_802_11_STATISTICS &);
//
// Parameters: NDIS_802_11_STATISTICS &
//
// Description: This function is depreciated.
//
///////////////////////////////////////////////////////////////////////////////
// UINT GetNicStats(NDIS_802_11_STATISTICS &);
///////////////////////////////////////////////////////////////////////////////
//
// Function: SetRTSThreshold(USHORT &);
//
// Parameters: USHORT &
//
// Description: This function is depreciated.
//
///////////////////////////////////////////////////////////////////////////////
//UINT SetRTSThreshold(USHORT &);
///////////////////////////////////////////////////////////////////////////////
//
// Function: SetTXRate(UCHAR);
//
// Parameters: UCHAR
//
// Description: This function is depreciated.
//
///////////////////////////////////////////////////////////////////////////////
//UINT SetTXRate(UCHAR);
///////////////////////////////////////////////////////////////////////////////
//
// TX Rates
//
// Functions no longer supported, data types left behind for legacy support.
//
///////////////////////////////////////////////////////////////////////////////
//
#define _1_MEGABIT 1
#define _2_MEGABIT 2
#define _AUTO_1_2 3
#define _5_5_MEGABIT 4
#define _11_MEGABIT 5
#define _FULLY_AUTO 6
///////////////////////////////////////////////////////////////////////////////
//
// Function: EncryptWepKeyForRegistry(TCHAR * szDest, TCHAR * szSource)
//
// Parameters: TCHAR *, TCHAR *
//
// Description: This function is depreciated and is no longer used. Use the
// profile management system to store WEP keys.
//
///////////////////////////////////////////////////////////////////////////////
//UINT EncryptWepKeyForRegistry(TCHAR * szDest, TCHAR * szSource);
///////////////////////////////////////////////////////////////////////////////
//
// Function: SetDiversity(USHORT)
//
// Parameters: USHORT
//
// Description: This function is depreciated. It is left defined only for
// legacy support. Diversity optimization is set in the factory
// and should not be changed.
//
///////////////////////////////////////////////////////////////////////////////
//UINT SetDiversity(USHORT);
///////////////////////////////////////////////////////////////////////////////
//
// Depreciated Data Types
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// Network Physical Medium Types - Returned from
// GetPhysicalMedium or GetMediaSupported
//
// Functions no longer supported, data types left behind for legacy support.
//
///////////////////////////////////////////////////////////////////////////////
#define NDIS_PHYSICAL_MEDIUM_WLAN 0 // NdisPhysicalMediumWirelessLan
#define NDIS_PHYSICAL_MEDIUM_CABLE_MODEM 1 // NdisPhysicalMediumCableModem
#define NDIS_PHYSICAL_MEDIUM_PHONE_LINE 2 // NdisPhysicalMediumPhoneLine
#define NDIS_PHYSICAL_MEDIUM_POWER_LINE 3 // NdisPhysicalMediumPowerLine
#define NDIS_PHYSICAL_MEDIUM_DSL 4 // NdisPhysicalMediumDSL
#define NDIS_PHYSICAL_MEDIUM_802_3 5 // NdisMedium802_3
#define NDIS_PHYSICAL_MEDIUM_802_5 6 // NdisMedium802_5
#define NDIS_PHYSICAL_MEDIUM_WAN 7 // NdisMediumWan
#define NDIS_PHYSICAL_MEDIUM_WWAN 8 // NdisMediumWirelessWan
#define NDIS_PHYSICAL_MEDIUM_IRDA 9 // NdisMediumIrda
#define NDIS_PHYSICAL_MEDIUM_UNKNOWN 10 // Unknown Medium Type for this API
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -