⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 80211_api.h

📁 A ping test tool. Use to check ping speed and write a log over time. You can test your wlan connecti
💻 H
📖 第 1 页 / 共 4 页
字号:
///////////////////////////////////////////////////////////////////////////////
//  API_Calls.h Header file for 802.11 API's
//	This file is used for both Win32 and WinCE version(s) of the 802.11 API
//  
//  Copyright 2002-2003, Intermec Technologies Corp
//  Version 3.0 of API Header File
//  Last revision: 1/27/2004
//
//  Change Notes:
//		Added API for Zero Config Enable/Disable
//      Depreciated some functions from API.  Still present, but will reutrn
//		Better Documentation of Functions - Added Typedefs for dynamic loading
///////////////////////////////////////////////////////////////////////////////

#ifndef _API_CALLS_
#define _API_CALLS_

///////////////////////////////////////////////////////////////////////////////
// Usage Method
//
// Uncomment the line below to use dynamic loading of the API.  You will need
// the LIBRARY FILE from the toolkit if you plan on using static linking of the
// API.  
//
// Generally, it is better to dynamicly load the API with LoadLibrary and 
// GetProcAddress.  You can then trap errors on application launch.
//
///////////////////////////////////////////////////////////////////////////////
// #define DYNAMIC_LOADING	

///////////////////////////////////////////////////////////////////////////////
// API Functions
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
//
// Function: 
//
// Parameters: None.
//
// Description: 
//
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT RadioConnect();
//
// Parameters: None.
//
// Description: Call this function before you call any other function found
//              within this API.  It will hunt out and connect to the 802.11b/g
//              radio available on the system.  If successful, it will return 
//              ERROR_SUCCESS.  Check extended error codes if it returns 
//              anything else for more information.
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_RadioConnect)();
#else
UINT RadioConnect();
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT RadioDisconnect();
//
// Parameters: None.
//
// Description: Call this function when you are done using the 802.11 API.  If
//              you forget to do this, you may leave memory allocated.
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_RadioDisconnect)();
#else
UINT RadioDisconnect();
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT RadioDisassociate();
//
// Parameters: None.
//
// Description: Calling this function will cause the 802.11b/g radio to 
//              disassociate from the current service set.  The radio will
//              enter an 'off' mode until it is woken again by setting the 
//              ssid.  Also, the NDIS driver shall generate an NDIS media 
//              disconnect event.
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_RadioDisassociate)();
#else
UINT RadioDisassociate();
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetAssociationStatus(ULONG &);
//
// Parameters: ULONG Reference.
//
// Description: Call this function to obtain the radio's current association
//              status with a service set.  Your ULONG reference will be
//              populated with either NDIS_RADIO_ASSOCIATED or 
//              NDIS_RADIO_SCANNING.  Data is only valid if the function 
//              returns ERROR_SUCCESS.
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetAssociationStatus)(ULONG &);
#else
UINT GetAssociationStatus(ULONG &);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetAuthenticationMode(ULONG &);
//
// Parameters: ULONG Reference.
//
// Description: Call this function to obtain the radio's current authentication
//              mode.  Your ULONG reference will be populated with one of the 
//              following values:
//
//              NDIS_RADIO_AUTH_MODE_OPEN
//				NDIS_RADIO_AUTH_MODE_SHARED
//				NDIS_RADIO_AUTH_MODE_AUTO
//				NDIS_RADIO_AUTH_MODE_ERROR
//				NDIS_RADIO_AUTH_MODE_WPA
//				NDIS_RADIO_AUTH_MODE_WPA_PSK
//				NDIS_RADIO_AUTH_MODE_WPA_NONE
// 
//              Data is only valid if the function returns ERROR_SUCCESS.
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetAuthenticationMode)(ULONG &);
#else
UINT GetAuthenticationMode(ULONG &);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetBSSID(TCHAR *);
//
// Parameters: Pointer to a TCHAR array.
//
// Description: Call this function to get the current BSSID of the service set.
//              In ESS mode this is the MAC address of the access point the 
//              radio is associated with.  In IBSS mode, this is a randomly
//              generated MAC address, and serves as the ID for the IBSS.
//              If this function returns ERROR_SUCCESS, your TCHAR array will 
//              be populated with the BSSID of the current service set:
//
//              xx-xx-xx-xx-xx-xx
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetBSSID)(TCHAR *);
#else
UINT GetBSSID(TCHAR *);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetDiversity(USHORT *);
//
// Parameters: USHORT pointer.
//
// Description: Call this function to get the current diversity setting of your
//              802.11b radio.  This function uses an optional NDIS5.1 OID to
//              query the radio, which a large number of 802.11b devices do not
//              support.  Do not be suprised if this function is inaccurate.
//      
//              If this function returns ERROR_SUCCESS, your USHORT will be
//              populated with one of the following values:
//
//				ANT_PRIMARY
//				ANT_SECONDARY
//				ANT_DIVERSITY
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetDiversity)(USHORT *);
#else
UINT GetDiversity(USHORT *);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetLinkSpeed(int &);
//
// Parameters: int Reference.
//
// Description: Call this function to get the current link speed of the 802.11b
//              radio.  This function accepts an int reference, and your int
//              will be populated with the current link speed, in Mbps, rounded
//              to the nearest whole integer (eg, 1, 2, 5, 11, ...).  Data
//              returned is only valid if the function returns ERROR_SUCCESS.
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetLinkSpeed)(int &);
#else
UINT GetLinkSpeed(int &);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetMac(TCHAR *);
//
// Parameters: Pointer to a TCHAR array.
//
// Description: Call this function to get the MAC address of the 802.11b radio.
//
//              **NOTE**:  In order for this function to operate correctly, you 
//                         MUST call RadioConnect() _BEFORE_ calling GetMAC!
//
//				This function will return ERROR_SUCCESS when successful, and
//              your TCHAR array will be populated with the formatted MAC
//              address of the adapter, as follows:
//
//              xx-xx-xx-xx-xx-xx
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetMac)(TCHAR *);
#else
UINT GetMac(TCHAR *);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetNetworkMode(ULONG &);
//
// Parameters: ULONG Reference.
//
// Description: Call this function to get the current Network Mode for the 
//              802.11b radio.  If the function returns ERROR_SUCCESS, your
//              ULONG reference will be populated with one of the following
//              values:
//
//				NDIS_NET_MODE_IBSS		= 802.11b Ad-Hoc
//				NDIS_NET_MODE_ESS		= Infrastructure
//				NDIS_NET_AUTO_UNKNOWN	= Auto Switch (use not reccommended)
//				NDIS_NET_MODE_UNKNOWN	= Anything Else/Unknown Error
//				NDIS_NET_TYPE_OFDM_5G   = 5 Gigahertz 54 Mbps
//				NDIS_NET_TYPE_OFDM_2_4G = 802.11g 2.4 Gigahertz
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetNetworkMode)(ULONG &);
#else
UINT GetNetworkMode(ULONG &);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetNetworkType(ULONG &);
//
// Parameters: ULONG Reference.
//
// Description: Call this function to get the current network type of the 
//              radio.  If the function returns ERROR_SUCCESS, your ULONG
//              reference will be populated with one of the following values:
//
//				NDIS_NET_TYPE_FH		= Frequency Hopping
//				NDIS_NET_TYPE_DS		= Direct Sequence
//				NDIS_NET_TYPE_UNDEFINED	= Error / Unknown
//
//              NOTE:  This function is a good canidate for being depreciated
//                     in the future.  Use at your own risk!
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetNetworkType)(ULONG &);
#else
UINT GetNetworkType(ULONG &);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetSSID(TCHAR *);
//
// Parameters: Pointer to a TCHAR array.
//
// Description: Call this function to get the desired SSID of the 802.11b 
//              radio.
//
//              **NOTE**:  In order for this function to operate correctly, you 
//                         MUST call RadioConnect() _BEFORE_ calling GetSSID!
//
//				This function will return ERROR_SUCCESS when successful, and
//              your TCHAR array will be populated with the desired SSID.
//
///////////////////////////////////////////////////////////////////////////////
#ifdef DYNAMIC_LOADING
typedef UINT (*PFN_GetSSID)(TCHAR *);
#else
UINT GetSSID(TCHAR *);
#endif

///////////////////////////////////////////////////////////////////////////////
//
// Function: UINT GetPowerMode(ULONG &);
//
// Parameters: ULONG Reference.
//
// Description: Call this function to get the current power savings mode of the
//              radio.  If this function returns ERROR_SUCCESS, your ULONG 
//              reference will be populated with one of the following values:
// 
//				NDIS_RADIO_POWER_MODE_CAM	   = Continious Access Mode
//				NDIS_RADIO_POWER_MODE_PSP	   = Power Saving Mode
//				NDIS_RADIO_POWER_UNKNOWN	   = Unknown State
//				NDIS_RADIO_POWER_AUTO		   = Automatic Switching (see note)
//				NDIS_RADIO_POWER_MODE_FAST_PSP = Fast PSP, good savings, fast
//
//              NOTE:  It is not reccommended that Automatic Switching mode be
//                     used at this time.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -