1*4d7e907cSAndroid Build Coastguard Worker/* 2*4d7e907cSAndroid Build Coastguard Worker * Copyright 2018 The Android Open Source Project 3*4d7e907cSAndroid Build Coastguard Worker * 4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*4d7e907cSAndroid Build Coastguard Worker * 8*4d7e907cSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*4d7e907cSAndroid Build Coastguard Worker * 10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License. 15*4d7e907cSAndroid Build Coastguard Worker */ 16*4d7e907cSAndroid Build Coastguard Worker 17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected]; 18*4d7e907cSAndroid Build Coastguard Worker 19*4d7e907cSAndroid Build Coastguard Workerimport @1.0::WifiStatus; 20*4d7e907cSAndroid Build Coastguard Workerimport @1.0::MacAddress; 21*4d7e907cSAndroid Build Coastguard Workerimport @1.0::IWifiStaIface; 22*4d7e907cSAndroid Build Coastguard Worker 23*4d7e907cSAndroid Build Coastguard Worker/** 24*4d7e907cSAndroid Build Coastguard Worker * Interface used to represent a single STA iface. 25*4d7e907cSAndroid Build Coastguard Worker * 26*4d7e907cSAndroid Build Coastguard Worker * IWifiChip.createStaIface() must return a @1.2::IWifiStaIface when supported. 27*4d7e907cSAndroid Build Coastguard Worker */ 28*4d7e907cSAndroid Build Coastguard Workerinterface IWifiStaIface extends @1.0::IWifiStaIface { 29*4d7e907cSAndroid Build Coastguard Worker /** 30*4d7e907cSAndroid Build Coastguard Worker * Fetches a consistent snapshot of the entire APF program and working 31*4d7e907cSAndroid Build Coastguard Worker * memory buffer and returns it to the host. The returned buffer contains 32*4d7e907cSAndroid Build Coastguard Worker * both code and data. Its length must match the most recently returned 33*4d7e907cSAndroid Build Coastguard Worker * |StaApfPacketFilterCapabilities.maxLength|. 34*4d7e907cSAndroid Build Coastguard Worker * 35*4d7e907cSAndroid Build Coastguard Worker * While the snapshot is being fetched, the APF intepreter must not execute 36*4d7e907cSAndroid Build Coastguard Worker * and all incoming packets must be passed to the host as if there was no 37*4d7e907cSAndroid Build Coastguard Worker * APF program installed. 38*4d7e907cSAndroid Build Coastguard Worker * 39*4d7e907cSAndroid Build Coastguard Worker * Must fail with |WifiStatusCode.ERROR_NOT_SUPPORTED| if 40*4d7e907cSAndroid Build Coastguard Worker * |StaIfaceCapabilityMask.APF| is not set. 41*4d7e907cSAndroid Build Coastguard Worker * 42*4d7e907cSAndroid Build Coastguard Worker * @return status WifiStatus of the operation. 43*4d7e907cSAndroid Build Coastguard Worker * Possible status codes: 44*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.SUCCESS|, 45*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, 46*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 47*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 48*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.ERROR_UNKNOWN| 49*4d7e907cSAndroid Build Coastguard Worker * @return data The entire APF working memory buffer when status is 50*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.SUCCESS|, empty otherwise. 51*4d7e907cSAndroid Build Coastguard Worker * @see getApfPacketFilterCapabilities() 52*4d7e907cSAndroid Build Coastguard Worker * @see installApfPacketFilter() 53*4d7e907cSAndroid Build Coastguard Worker */ 54*4d7e907cSAndroid Build Coastguard Worker readApfPacketFilterData() generates (WifiStatus status, vec<uint8_t> data); 55*4d7e907cSAndroid Build Coastguard Worker 56*4d7e907cSAndroid Build Coastguard Worker /** 57*4d7e907cSAndroid Build Coastguard Worker * Changes the MAC address of the Sta Interface to the given 58*4d7e907cSAndroid Build Coastguard Worker * MAC address. 59*4d7e907cSAndroid Build Coastguard Worker * 60*4d7e907cSAndroid Build Coastguard Worker * @param mac MAC address to change into. 61*4d7e907cSAndroid Build Coastguard Worker * @return status WifiStatus of the operation. 62*4d7e907cSAndroid Build Coastguard Worker * Possible status codes: 63*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.SUCCESS|, 64*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, 65*4d7e907cSAndroid Build Coastguard Worker * |WifiStatusCode.ERROR_UNKNOWN| 66*4d7e907cSAndroid Build Coastguard Worker */ 67*4d7e907cSAndroid Build Coastguard Worker setMacAddress(MacAddress mac) generates (WifiStatus status); 68*4d7e907cSAndroid Build Coastguard Worker}; 69