1/* 2 * Copyright (c) 2023 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 16/** 17 * @file IWlanInterface.idl 18 * 19 * @brief Provides APIs to enable or disable a WLAN hotspot, scan for hotspots, connect to or disconnect from a WLAN hotspot, 20 * set the country code, and manage network devices. 21 * 22 * @since 4.1 23 * @version 1.2 24 */ 25 26package ohos.hdi.wlan.v1_2; 27 28import ohos.hdi.wlan.v1_1.IWlanInterface; 29 30interface IWlanInterface extends ohos.hdi.wlan.v1_1.IWlanInterface { 31 /** 32 * @brief Obtain ap current bandwidth. 33 * 34 * @param ifName Indicates the NIC name. 35 * @param bandwidth ap current bandwidth, 1(20M), 2(40M), 4(80M), 8(160M). 36 * 37 * @return Returns <b>0</b> if the operation is successful. 38 * @return Returns a negative value if the operation fails. 39 * 40 * @since 4.1 41 * @version 1.2 42 */ 43 GetApBandwidth([in] String ifName, [out] unsigned char bandwidth); 44 45 /** 46 * @brief reset to factory mac address(permanent hardware address). 47 * 48 * @param ifName Indicates the NIC name. 49 * 50 * @return Returns <b>0</b> if the operation is successful. 51 * @return Returns a negative value if the operation fails. 52 * 53 * @since 4.1 54 * @version 1.2 55 */ 56 ResetToFactoryMacAddress([in] String ifName); 57 58 /** 59 * @brief send action frame to driver. 60 * 61 * @param ifName Indicates the NIC name. 62 * @param freq Indicates the send channel frequency. 63 * @param ifName Indicates the action frame data. 64 * 65 * @return Returns <b>0</b> if the operation is successful. 66 * @return Returns a negative value if the operation fails. 67 * 68 * @since 4.1 69 * @version 1.2 70 */ 71 SendActionFrame([in] String ifName, [in] unsigned int freq, [in] unsigned char[] frameData); 72 73 /** 74 * @brief register action frame receiver. 75 * 76 * @param ifName Indicates the NIC name. 77 * @param txChannel Indicates the data matching action frame. 78 * 79 * @return Returns <b>0</b> if the operation is successful. 80 * @return Returns a negative value if the operation fails. 81 * 82 * @since 4.1 83 * @version 1.2 84 */ 85 RegisterActionFrameReceiver([in] String ifName, [in] unsigned char[] match); 86 87 /** 88 * @brief set power save manager mode. 89 * 90 * @param ifName Indicates the NIC name. 91 * @param frequency Indicates connected ap frequency. 92 * @param mode Indicates power save mode, 3(enable power save), 4(disable power save). 93 * 94 * @return Returns <b>0</b> if the operation is successful. 95 * @return Returns a negative value if the operation fails. 96 * 97 * @since 4.1 98 * @version 1.2 99 */ 100 SetPowerSaveMode([in] String ifName, [in] int frequency, [in] int mode); 101 102 /** 103 * @brief set data packet identification mark rule. 104 * 105 * @param uid Indicates target app uid. 106 * @param protocol Indicates target protocol type, tcp/udp. 107 * @param enable Indicates enable/disable dpi mark rule. 108 * 109 * @return Returns <b>0</b> if the operation is successful. 110 * @return Returns a negative value if the operation fails. 111 * 112 * @since 4.1 113 * @version 1.2 114 */ 115 SetDpiMarkRule([in] int uid, [in] int protocol, [in] int enable); 116} 117/** @} */ 118