Home | History | Annotate | Download | only in inc
      1 /*
      2  * wpa_core.h
      3  *
      4  * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
      5  *
      6  * Licensed under the Apache License, Version 2.0 (the "License");
      7  * you may not use this file except in compliance with the License.
      8  * You may obtain a copy of the License at
      9  *
     10  *     http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  * Unless required by applicable law or agreed to in writing, software
     13  * distributed under the License is distributed on an "AS IS" BASIS,
     14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  * See the License for the specific language governing permissions and
     16  * limitations under the License.
     17  */
     18 
     19 /****************************************************************************/
     20 /*																			*/
     21 /*    MODULE:   Wpa_core.h													*/
     22 /*    PURPOSE:																*/
     23 /*																			*/
     24 /****************************************************************************/
     25 #ifndef _WPA_CORE_H_
     26 #define _WPA_CORE_H_
     27 
     28 /* defines */
     29 /***********/
     30 #define WPACORE_MAX_CERT_FILE_NAME_LENGTH 		32
     31 #define WPACORE_MAX_CERT_PASSWORD_LENGTH 		32
     32 #define WPACORE_MAX_CERT_USER_NAME_LENGTH 		32
     33 
     34 #define WPACORE_MAX_PSK_STRING_LENGTH		64
     35 #define WPACORE_MIN_PSK_STRING_LENGTH		8
     36 #define WPACORE_PSK_HEX_LENGTH				64
     37 
     38 /* types */
     39 /*********/
     40 
     41 /* functions */
     42 /*************/
     43 THandle WpaCore_Create(PS32 pRes, PS8 pSupplIfFile);
     44 VOID WpaCore_Destroy(THandle hWpaCore);
     45 
     46 S32 WpaCore_SetAuthMode(THandle hWpaCore, OS_802_11_AUTHENTICATION_MODE AuthMode);
     47 S32 WpaCore_GetAuthMode(THandle hWpaCore, PU32 pAuthMode);
     48 S32 WpaCore_SetEncryptionPairWise(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES EncryptionType);
     49 S32 WpaCore_GetEncryptionPairWise(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES* pEncryptionType);
     50 S32 WpaCore_SetEncryptionGroup(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES EncryptionType);
     51 S32 WpaCore_GetEncryptionGroup(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES* pEncryptionType);
     52 S32 WpaCore_SetPskPassPhrase(THandle hWpaCore, PU8 pPassPhrase);
     53 S32 WpaCore_StopSuppl(THandle hWpaCore);
     54 S32 WpaCore_ChangeSupplDebugLevels(THandle hWpaCore, S32 Level1, S32 Level2, S32 Level3);
     55 S32 WpaCore_AddKey(THandle hWpaCore, OS_802_11_WEP* pKey);
     56 S32 WpaCore_GetDefaultKey(THandle hWpaCore, U32* pDefaultKeyIndex);
     57 S32 WpaCore_SetAnyWpaMode(THandle hWpaCore, U8 anyWpaMode);
     58 S32 WpaCore_GetAnyWpaMode(THandle hWpaCore, PU8 pAnyWpaMode);
     59 S32 WpaCore_SetBssType(THandle hWpaCore, U32 BssType);
     60 S32 WpaCore_GetBssType(THandle hWpaCore, PU32 pBssType);
     61 S32 WpaCore_SetSsid(THandle hWpaCore, OS_802_11_SSID* ssid, TMacAddr bssid);
     62 S32 WpaCore_Disassociate(THandle hWpaCore);
     63 S32 WpaCore_SetPrivacyEap(THandle hWpaCore, OS_802_11_EAP_TYPES EapType);
     64 S32 WpaCore_SetCredentials(THandle hWpaCore, PU8 Identity, PU8 Passward);
     65 S32 WpaCore_SetCertificate(THandle hWpaCore, PU8 Filepath);
     66 S32 WpaCore_SetXCC(THandle hWpaCore, U16 XCCConfig);
     67 
     68 
     69 #ifdef CONFIG_WPS
     70 S32 WpaCore_StartWpsPIN(THandle hWpaCore);
     71 S32 WpaCore_StartWpsPBC(THandle hWpaCore);
     72 S32 WpaCore_StopWps(THandle hWpaCore);
     73 S32 WpaCore_SetPin(THandle hWpaCore, PS8 pPinStr);
     74 #endif /* CONFIG_WPS */
     75 
     76 #endif  /* _WPA_CORE_H_ */
     77 
     78