/* * Copyright 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.wifi@1.2; import @1.0::WifiStatus; import @1.0::MacAddress; import @1.0::IWifiStaIface; /** * Interface used to represent a single STA iface. * * IWifiChip.createStaIface() may return a @1.2::IWifiStaIface when supported. */ interface IWifiStaIface extends @1.0::IWifiStaIface { /** * Fetches a consistent snapshot of the entire APF program and working * memory buffer and returns it to the host. The returned buffer contains * both code and data. Its length must match the most recently returned * |StaApfPacketFilterCapabilities.maxLength|. * * While the snapshot is being fetched, the APF intepreter must not execute * and all incoming packets must be passed to the host as if there was no * APF program installed. * * Must fail with |WifiStatusCode.ERROR_NOT_SUPPORTED| if * |StaIfaceCapabilityMask.APF| is not set. * * @return status WifiStatus of the operation. * Possible status codes: * |WifiStatusCode.SUCCESS|, * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, * |WifiStatusCode.ERROR_NOT_SUPPORTED|, * |WifiStatusCode.ERROR_NOT_AVAILABLE|, * |WifiStatusCode.ERROR_UNKNOWN| * @return data The entire APF working memory buffer when status is * |WifiStatusCode.SUCCESS|, empty otherwise. * @see getApfPacketFilterCapabilities() * @see installApfPacketFilter() */ readApfPacketFilterData() generates (WifiStatus status, vec<uint8_t> data); /** * Changes the MAC address of the Sta Interface to the given * MAC address. * * @param mac MAC address to change into. * @return status WifiStatus of the operation. * Possible status codes: * |WifiStatusCode.SUCCESS|, * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, * |WifiStatusCode.ERROR_UNKNOWN| */ setMacAddress(MacAddress mac) generates (WifiStatus status); };