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