1 /* 2 * Copyright (C) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef OHOS_WIFI_WPA_HAL_TEST_H 16 #define OHOS_WIFI_WPA_HAL_TEST_H 17 18 #include "wifi_hal_module_manage.h" 19 #include "wifi_wpa_hal.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 struct wpa_ctrl { 26 int s; 27 }; 28 29 void DealP2pFindInfo(char *buf); 30 void DealP2pGoNegRequest(const char *buf); 31 void DealGroupStartInfo(char *buf); 32 void DealServiceDiscRespEvent(char *buf); 33 void DealP2pGroupRemove(const char *buf); 34 void DealP2pConnectChanged(const char *buf, int type); 35 void DealDeviceLostEvent(const char *buf); 36 void DealInvitationReceived(char *buf, int type); 37 void DealInvitationResultEvent(const char *buf); 38 void DealP2pGoNegotiationFailure(const char *buf); 39 void DealP2pConnectFailed(const char *buf); 40 void DealP2pChannelSwitch(const char *buf); 41 void DealGroupFormationFailureEvent(const char *buf); 42 void DealProvDiscPbcReqEvent(const char *buf, unsigned long length); 43 void DealProDiscPbcRespEvent(const char *buf, unsigned long length); 44 void DealProDiscEnterPinEvent(const char *buf, unsigned long length); 45 void DealProvDiscShowPinEvent(const char *buf, unsigned long length); 46 void DealP2pServDiscReqEvent(char *buf); 47 void DealP2pInterfaceCreated(const char *buf); 48 int DealWpaP2pCallBackSubFun(char *p); 49 int WpaP2pCallBackFunc(char *p); 50 void ParseAuthReject(const char *p); 51 void ParseAssocReject(const char *p); 52 void WpaCallBackFuncTwo(const char *p); 53 void WpaCallBackFunc(const char *p); 54 int MyWpaCtrlPending(struct wpa_ctrl *ctrl); 55 void StopWpaSuppilicant(ModuleInfo *p); 56 void StopWpaSoftAp(ModuleInfo *p); 57 void *RecoverWifiProcess(void *arg); 58 void RecoverWifiThread(void); 59 void *WpaReceiveCallback(void *arg); 60 int WpaCliConnect(WifiWpaInterface *p); 61 void WpaCliClose(WifiWpaInterface *p); 62 int WpaCliAddIface(WifiWpaInterface *p, const AddInterfaceArgv *argv, bool isWpaAdd); 63 int WpaCliRemoveIface(WifiWpaInterface *p, const char *name); 64 int WpaCliWpaTerminate(void); 65 66 #ifdef __cplusplus 67 } 68 #endif 69 70 #endif