1/* 2 * Copyright 2020 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.supplicant@1.4; 18 19import @1.0::SupplicantStatus; 20import @1.0::ISupplicantStaIface; 21import @1.0::MacAddress; 22import ISupplicantStaIfaceCallback; 23import @1.3::ISupplicantStaIface; 24 25/** 26 * Interface exposed by the supplicant for each station mode network 27 * interface (e.g wlan0) it controls. 28 */ 29interface ISupplicantStaIface extends @1.3::ISupplicantStaIface { 30 /** 31 * Get Connection capabilities 32 * 33 * @return status Status of the operation, and connection capabilities. 34 * Possible status codes: 35 * |SupplicantStatusCode.SUCCESS|, 36 * |SupplicantStatusCode.FAILURE_UNKNOWN|, 37 */ 38 getConnectionCapabilities_1_4() 39 generates (SupplicantStatus status, ConnectionCapabilities capabilities); 40 41 /** 42 * Register for callbacks from this interface. 43 * 44 * These callbacks are invoked for events that are specific to this interface. 45 * Registration of multiple callback objects is supported. These objects must 46 * be automatically deleted when the corresponding client process is dead or 47 * if this interface is removed. 48 * 49 * @param callback An instance of the |ISupplicantStaIfaceCallback| HIDL 50 * interface object. 51 * @return status Status of the operation. 52 * Possible status codes: 53 * |SupplicantStatusCode.SUCCESS|, 54 * |SupplicantStatusCode.FAILURE_UNKNOWN|, 55 * |SupplicantStatusCode.FAILURE_IFACE_INVALID| 56 */ 57 registerCallback_1_4(ISupplicantStaIfaceCallback callback) 58 generates (SupplicantStatus status); 59 60 /** 61 * Initiate Venue URL ANQP (for IEEE 802.11u Interworking/Hotspot 2.0) query with the 62 * specified access point. This specific query can be used only post connection, once security 63 * is established and PMF is enabled, to avoid spoofing preassociation ANQP responses. 64 * The ANQP data fetched must be returned in the 65 * |ISupplicantStaIfaceCallback.onAnqpQueryDone| callback. 66 * 67 * @param macAddress MAC address of the access point. 68 * @return status Status of the operation. 69 * Possible status codes: 70 * |SupplicantStatusCode.SUCCESS|, 71 * |SupplicantStatusCode.FAILURE_UNKNOWN|, 72 * |SupplicantStatusCode.FAILURE_IFACE_INVALID| 73 */ 74 initiateVenueUrlAnqpQuery(MacAddress macAddress) generates (SupplicantStatus status); 75 76 /** 77 * Get wpa driver capabilities. 78 * 79 * @return status Status of the operation, and a bitmap of wpa driver features. 80 * Possible status codes: 81 * |SupplicantStatusCode.SUCCESS|, 82 * |SupplicantStatusCode.FAILURE_UNKNOWN|, 83 */ 84 getWpaDriverCapabilities_1_4() generates (SupplicantStatus status, 85 bitfield<WpaDriverCapabilitiesMask> driverCapabilitiesMask); 86 87 /** 88 * Generates DPP bootstrap information: Bootstrap ID, DPP URI and listen 89 * channel for responder mode. 90 * 91 * @param MacAddress MAC address of the interface for the DPP operation. 92 * @param deviceInfo Device specific information. 93 * As per DPP Specification V1.0 section 5.2, 94 * allowed Range of ASCII characters in deviceInfo - %x20-7E 95 * semicolon is not allowed. 96 * @param DppCurve Elliptic curve cryptography type used to generate DPP 97 * public/private key pair. 98 * @return status of operation and bootstrap info. 99 * Possible status codes: 100 * |SupplicantStatusCode.SUCCESS|, 101 * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, 102 * |SupplicantStatusCode.FAILURE_UNKNOWN| 103 * |SupplicantStatusCode.FAILURE_UNSUPPORTED| 104 */ 105 generateDppBootstrapInfoForResponder(MacAddress macAddress, string deviceInfo, DppCurve curve) 106 generates (SupplicantStatus status, DppResponderBootstrapInfo bootstrapInfo); 107 108 /** 109 * Start DPP in Enrollee-Responder mode. 110 * Framework must first call |generateDppBootstrapInfoForResponder| to generate 111 * the bootstrapping information: Bootstrap ID, DPP URI and the listen channel. 112 * Then call this API with derived listen channel to start listening for 113 * authentication request from Peer initiator. 114 * 115 * @param listenChannel DPP listen channel. 116 * @return status Status of the operation. 117 * Possible status codes: 118 * |SupplicantStatusCode.SUCCESS|, 119 * |SupplicantStatusCode.FAILURE_UNKNOWN|, 120 * |SupplicantStatusCode.FAILURE_IFACE_INVALID| 121 * |SupplicantStatusCode.FAILURE_UNSUPPORTED| 122 */ 123 startDppEnrolleeResponder(uint32_t listenChannel) generates (SupplicantStatus status); 124 125 /** 126 * Stop DPP Responder operation - Remove the bootstrap code and stop listening. 127 * 128 * @param ownBootstrapId Local device's URI ID obtained through 129 * |generateDppBootstrapInfoForResponder| call. 130 * @return status Status of the operation. 131 * Possible status codes: 132 * |SupplicantStatusCode.SUCCESS|, 133 * |SupplicantStatusCode.FAILURE_IFACE_INVALID| 134 * |SupplicantStatusCode.FAILURE_UNSUPPORTED| 135 */ 136 stopDppResponder(uint32_t ownBootstrapId) generates (SupplicantStatus status); 137}; 138