?? dot11lib.c
字號:
This IOCTL is only applicable in ESS mode.\i WIOCSPWRMAN : Set Power Management StatusIn an ESS, this IOCTL turns power management mode on or off. When enabled, the station will go to sleep, waking periodically to check for messages that the AP has queued for it. <data> should contain a boolean value, either TRUEor FALSE. This IOCTL is only applicable in ESS mode.\i WIOCGCARDTYPE : Get Card TypeReturns the detected card type. <data> is a pointer to a UINT32. The following card types are returned. Atheros AR5211 based card : 5211 Atheros AR5212+ based card : 5212\i WIOCGCHANNEL : Get channel used for AP or IBSS Returns the channel used to create new IBSSs and APs. <data> should be a pointer to a UINT32, where the default channel will be placed. This IOCTL isonly applicable in IBSS and AP modes.\i WIOCSCHANNEL : Set channel used for AP or IBSS Sets the channel used to create new IBSSs and APs. Allowed values (for North America) are 1 - 11 for 802.11b and 802.11g modes, and 36, 40, 44,48, 52, 56, 60, 64, 149, 153, 157, 161, 165 for 802.11a mode. If the defaultchannel is set to an invalid channel the card will be placed in an inoperable state.\i WIOCGWEPAVAIL : Get WEP AvailabilityReturns a boolean value indicating whether or not WEP is available on thiscard. <data> should be a pointer to a UINT32\i WIOCSWEPKEY0 : Set value for WEP KEY 0 Sets the value for KEY0. <data> is a DOT11_KEY * containing the encryptionkey (and the associated type of key) to be set. Use the ennumeration type to handle differing key lengths.\i WIOCSWEPKEY1 : Set value for WEP KEY 1 Sets the value for key 1. See EIOCSWEPKEY0 for description\i WIOCSWEPKEY2 : Set value for WEP KEY 2 Sets the value for key 2. See EIOCSWEPKEY0 for description\i WIOCSWEPKEY3 : Set value for WEP KEY 3 Sets the value for key 3. See EIOCSWEPKEY0 for description\i WIOCSWEPDEFAULTKEY : Set WEP default keyChooses which key to use when encryting data for transmission. <data> is an integer between 0 and 3.\i WEIOCSENCRYPTTYPE : Set currently used encryption typeSets the currently used encryption type. This can also be used to turn off encryption completely. <data> is a UINT32 containing one of the following values: DOT11_ENCRYPT_NONE 0 DOT11_ENCRYPT_WEP40 1 DOT11_ENCRYPT_WEP104 2\i WIOCASTA : Adds a Station to the Access Control ListAdds the station to the access control list. The effect this has depends onthe setting of WIOCSACLMODE.\i WIOCDSTA : Deletes a Station from the Access Control ListRemoves a station from the access control list\i WIOCSACLMODE : Set ACL mode Sets the mode of the ACL. <data> contains the mode, one of 0 = DOT11_AP_ACL_DISABLED - ACL does nothing 1 = DOT11_AP_ACL_ALLOW - Only those stations on the ACL may authenticate 2 = DOT11_AP_ACL_DENY - Those stations on the ACL may NOT authenticate. Others may.This IOCTL is only applicable to AP and IBSS modes.\i WIOCGACLMODE : Get ACL modeGets the mode of the ACL. <Data> is a UINT32 * where the current ACL modewill be placed. See the reference entry for WIOCSACLMODE for the values.\i WIOCSEXUNENCRYPT : Set unencrypted packet policyThis command sets the policy for handing unencrypted packets when encryption is enabled. The available policies are: DOT11_EX_UNENCRYPTED: Exclude unencrypted packets. All packets that are received in the clear will be dropped when encryption is enabled. *DEFAULT* DOT11_EX_DOT1X: Excludes all unencrypted packets except EAPOL types which are permitted DOT11_EX_NONE: Allows reception of unencrypted packets when encryption is specified.\i WIOCGEXUNENCRYPT: Get unencrypted packet policyReturns the currently applied policy for handling unencryted packets when WEPis enabled. The values returned are the same as those set in WIOCSEXUNENCRYPT\i WIOCGAUTHTYPE : Get authentication protocol Returns the authentication protocol currently in use. 1 = Open System, 2 = Shared Key, 3 = Both (AP only). This IOCTL is only applicable to ESS and AP mode, since there is no authentication in an IBSS. <data> is a pointer to a UINT32.\i WIOCSAUTHTYPE : Set authentication protocol Sets the currently used authentication protocol. 1=Open System, 2=SharedKey, 3=Both (AP Only) Note : Shared key cannot be enabled unless WEP is enabled.\i WIOCSUSERAUTHCALLBACK : Regerister user authentication callbackRegisters a callback that will be called whenever the device connects or disconnects from a device. <data> is a function pointer to the function, NULLto disable. This IOCTL is supported in AP and ESS modes. The callback shouldhave the following prototype: void userCallback(int unitNum, int event, UINT8 macAddr[6]);<unitNum> is the unit number of the device calling the callback.<event> is DOT11_CALLBACK_CONNECT or DOT11_CALLBACK_DISCONNECT<macAddr> is the MAC address of the device connecting/disconnecting if knownThis IOCTL is supported in AP and ESS modes.\i WIOCSDOT1XPORTSTATUS: Sets the status of an 802.1X portThis IOCTL should only be called by the 802.1X Authenticator and Supplicantmodules to notify the driver of a status change in the specified port.<data> is a pointer to a structure containing a UINT32 with the status (0=uncontrolled, 1=closed, 2=open) of the port followed by the MAC address ofthe other end of the port. \i WIOCSBEACONRATE : Sets the AP beacon rateSets the beacon rate to the specified rate in 802.11 time units (1024 microseconds, or approx 1ms). This only has effect in an IBSS or on a AP. <data> is a UINT32.\i WIOCGBEACONRATE : Gets the AP beacon rateGets the currently set beacon rate and places it in <data>. <data> is aUINT32 *. This IOCTL is only supported in AP or IBSS mode.\i WIOCSCTSRTS : Set CTS/RTSSets the CTS/RTS threshold. If packets larger than this size are sent, thenthey are protected with a CTS/RTS pair. The default setting is 2304, whicheffectively disables this feature (MTU==1500 bytes). <data> is a UINT32.\i WIOCGCTSRTS : Get CTS/RTSReturns the current CTS/RTS threshold. <data> should be a UINT32 *\i WIOCSSHORTRETRY : Set Short Retry LimitSet the Short Retry limit, indicates the maximum number of transmissionattempts of a frame, with a length less than or equal to dot11RTSThreshold,The default value is 7. <data> is a UINT32.\i WIOCGSHORTRETRY : Get Short Retry LimitReturns the Short Retry limit. <data> is a UINT32 * \i WIOCSLONGRETRY : Set Long Retry Limit Set the Long Retry Limit, indicates the maximum number of transmissionattempts of a frame, with a length greater than dot11RTSThreshold, The default value is 4. <data> is a UINT32 \i WIOCGLONGRETRY : Get Long Retry Limit Returns the Long retry limit. <data> is a UINT32 * \i WIOCSFRAGTHRESH : Set Fragmentation thresholdSets the fragmentation threshold. If packets larger than this threshold aresent, then they are fragmented into smaller packets (of this maximum size).Note that this is 802.11 fragmentation and not IP fragmentation - reassemblyis performed by the receiving MAC. The default settings is 2304, which effectively disables this feature. (MTU==1500) <data> is a UINT32\i WIOCGFRAGTHRESH : Get Fragmentation thresholdReturns the current CTS/RTS threshold. <data> should be a UINT32 * \i WIOCSADVSECURITY : Set advanced security optionsEnables two advanced security features - hide SSID and block response to "Unspecified SSID". The hide SSID feature prevents the AP from broadcastingits SSID in beacon frames. The "block response to unspecified SSID" preventsthe AP from responding to a probe request with a null SSID.Bit 0 - Hide SSID name in beacon frameBit 1 - Block response to, "Unspecified SSID"Bit 2-15 Reserved (set to 0)\i WIOCGADVSECURITY : Get advanced security optionsReturns the status of the enhanced security features as specified in the reference entry for WIOCSADVSECURITY. <data> is a UINT32 *.\i WIOCSDTIMRATE : Set DTIM rate Set the number of beacon intervals between transmission ofBeacons frames containing a TIM element whose DTIM Count field is 0. The default value is 1 and the maximum value is 10. <data> is a UINT32. \i WIOCGDTIMRATE : Get DTIM rate Returns the number of beacon intervals that between transmission ofBeacons frames containing a TIM element whose DTIM Count field is 0. <data> isa UINT32 *. \i WIOCGSUPPTXRATE : Get Supported Tx rates Returns supported transmit data rates. <data> is a pointer to a DOT11_RATES structure with the length field containing the number of spaces available.\i WIOCGSUPPRXRATE : Get Supported Rx Rates Returns supported receive data rates. <data> is a pointer to a DOT11_RATES structure with the length field containing the number of spaces available.\i WIOCBSSSCAN : Perform BSS scan and wait for resultsThis IOCTL stops the current SME mode and initiates a BSS Scan. <data> isa pointer to a DOT11_SCAN_REQ structure, which contains the SSID to search forand a pointer to a preallocated array of DOT11_SCAN_RESULTS structures, along with the number of entries in the pre-allocated array. All BSSs (IBSSs or APs)in all channels in the currently set radio modes (see WIOCSRADIOMODE) that match the specified SSID are placed in the pre-allocated array, up to themaximum specified. The number of results actually written to the array is placed in the <numResults> member of the DOT11_SCAN_REQ structure. Use an SSID of "" (empty string) to get all APs/IBSSs. Warning : this is a blocking call that may block for up to twenty seconds depending on the number of channels in the current radio mode and country code.\i WIOCAPAIRWISEKEY : Adds a static pairwise keyThis function is used to set up legacy WEP key mapping. In this mode, staticWEP is used, but each station known to this station is given its own uniquekey. The multicast keys, as configured by WIOCSWEPKEYx will be used for stations that do not have a pairwise key, and for multi/broadcast packets.This IOCTL takes a pointer to a filled in DOT11_KEY structure. The MAC addressof the station must be included, as must the type of the key. Note that TKIPand AES do not work in legacy WEP key mapping mode.\i WIOCDPAIRWISEKEY : Removes a static pairwise keyThis function is used to remove a static WEP key added by WIOCAPAIRWISEKEY. <data> is a pointer to the MAC addresses that was used in the key structure.\i WIOCSSECPOL : Set current WPA/RSN security policiesThis routine sets the current WPA/802.11i security policy, which controls whether WPA and/or 802.11i (WPA2) is allowed, as well as whether legacy WEP stations should be accepted (TSN). <Data> is a UINT32 that contains one or more of the following macros or'd together: DOT11_SECPOL_WPA (2), DOT11_SECPOL_11i (4), DOT11_SECPOL_TSN (1). A TSN may not be used unless oneof the other modes (WPA, 802.11i) is present. Setting the security policy to DOT11_SECPOL_NONE (0) prevents the WPA/802.11i module from activating, but does not preclude the useof WEP or legacy-mode 802.1x.\i WIOCGSECPOL : Get current WPA/RSN security policyThis routine returns the current security policies, placed into <data> which is a pointer to a UINT32. \i WIOCSAUTHPOL : Set current WPA/RSN authentication policyThis routine sets the available authentication policies. <data> is a UINT32 that contains none or more of DOT11_AUTHPOL_PSK(2), DOT11_AUTHPOL_8021X(1). The configuration of both policies is a valid choice on both an AP and a station. If both the AP and the station have both policies set, IEEE 802.11i specifies that 802.1X is the preferred mode. If 802.1X is set as an available policy, it is assumed that the appropriate 802.1X component (802.1X Supplicant for ESS mode, 802.1X Authenticator or AP mode) is properly configured. This routine has no effect on the operation of the system while the security policyis DOT11_SECPOL_NONE, although the setting is changed and will take effect when a security policy is set.\i WIOCGAUTHPOL : Get current WPA/RSN authentication policyThis IOCTL returns the current authentication policies as set by WIOCSAUTHPOL.The results are returned in the UINT32 that <data> points to.\i WIOCSCIPHPOL : Set current WPA/RSN cipher policyThis IOCTL sets the allowed ciphers. These are used when negotiating a connection with another station or AP. <data> is a bitmap consisting of oneor more of the following cipher suites: DOT11_CIPHPOL_WEP40 1 DOT11_CIPHPOL_WEP104 2 DOT11_CIPHPOL_TKIP 4 DOT11_CIPHPOL_AES 8The following restrictions apply to the choice of cipher policies 1. DOT11_CIPHPOL_WEP40 and DOT11_CIPHPOL_WEP104 require that the security policy include DOT11_SECPOL_TSN 2. DOT11_CIPHPOL_AES requires that the security policy include DOT11_SECPOL_11i\i WIOCGCIPHPOL : Get current WPA/RSN cipher policyThis IOCTL returns the bitmap of supported cipher suites as set by WIOCSCIPHPOL. <data> is a pointer to a UINT32 into which the results will be placed.\i WIOCSPASSPHRASE : Set WPA/RSN passphrase for pre-shared key modeThis sets the passphrase that will be used to generate the pre-shared key if the current authentication mode is PreShared Key. <data> is a pointer to a character string containing the passphase, which is 8-63 bytes in length. This setting will be used preferentially to the direct PSK as set by WIOCSPSK.Use a NULL value of <data> to erase a PSK setting.\i WIOCSPSK : Set WPA/RSN pre-shared keyThis IOCTL directly sets the pre-shared key that will be used for pre-shared key authentication. <data> is a pointer to a 64 byte array of binary data.\i WIOCSPMK : <Internal> Set WPA/RSN PMK directlyThis internal IOCTL is used by the 802.1X module to set the PMK and trigger thefour-way key exchange.\i WIOCSAUTHCALLBACK : <Internal> Set association callbackThis internal IOCTL is used by the 802.1X module to registe an association callback to notify the 802.1X module of state changes.\i WIOCSDOT1XPORTSTATUS : <Internal> Set 802.1X status of a port (association)This internal IOCTL operates on a KSL record to change the status of a port from allowed to disallowed depending on 802.1X events.\i WIOCSCOUNTRYCODE : Set country codeThis IOCTL sets the current 802.11d country code. This controls the range of channels and radio modes available to the driver. This is also the country code that is advertised in AP mode if 802.11d is enabled. In ESS mode, thestation will not associate to (or even communicator with) an AP that does not advertise this country code. <data> is a UINT32 that contains the country codeas specified in ISO 3166, or specified in dot11Lib.h by the macros DOT11_COUNTRY_xxx. <data> should be 0to disable 802.11d mode. \i WIOCGCOUNTRYCODE : Get country codeThis returns the current country code used by the hardware, even if 802.11d isdisabled. <data> is a pointer to a UINT32 into which the country code will be placed.\i WIOCS80211D : Sets status of 802.11d modeThis IOCTL enables and disables 802.11d mode. In 802.11d mode, an AP willadvertise it's current country code in beacons and probe responses. A station
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -