Jimmy Chen | 0cb0aed | 2019-07-04 14:51:22 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 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 | |
| 17 | package android.hardware.wifi.supplicant@1.3; |
| 18 | |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 19 | import @1.0::ISupplicantStaNetwork; |
Jimmy Chen | 0cb0aed | 2019-07-04 14:51:22 +0800 | [diff] [blame] | 20 | import @1.0::SupplicantStatus; |
| 21 | import @1.2::ISupplicantStaNetwork; |
| 22 | |
| 23 | /** |
| 24 | * Interface exposed by the supplicant for each station mode network |
| 25 | * configuration it controls. |
| 26 | */ |
| 27 | interface ISupplicantStaNetwork extends @1.2::ISupplicantStaNetwork { |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 28 | /** |
Hai Shalom | 08b7022 | 2020-01-06 16:31:18 -0800 | [diff] [blame^] | 29 | * Possible mask of values for Proto param. |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 30 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 31 | enum ProtoMask : @1.0::ISupplicantStaNetwork.ProtoMask { |
| 32 | WAPI = 1 << 2, |
| 33 | }; |
| 34 | |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 35 | /** |
Hai Shalom | 08b7022 | 2020-01-06 16:31:18 -0800 | [diff] [blame^] | 36 | * Possible mask of values for KeyMgmt param. |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 37 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 38 | enum KeyMgmtMask : @1.2::ISupplicantStaNetwork.KeyMgmtMask { |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 39 | /* |
| 40 | * WAPI Psk |
| 41 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 42 | WAPI_PSK = 1 << 12, |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 43 | /** |
| 44 | * WAPI Cert |
| 45 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 46 | WAPI_CERT = 1 << 13, |
| 47 | }; |
| 48 | |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 49 | /** |
Hai Shalom | 08b7022 | 2020-01-06 16:31:18 -0800 | [diff] [blame^] | 50 | * Possible mask of values for PairwiseCipher param. |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 51 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 52 | enum PairwiseCipherMask : @1.2::ISupplicantStaNetwork.PairwiseCipherMask { |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 53 | /** |
| 54 | * SMS4 Pairwise Cipher |
| 55 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 56 | SMS4 = 1 << 7, |
| 57 | }; |
| 58 | |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 59 | /** |
Hai Shalom | 08b7022 | 2020-01-06 16:31:18 -0800 | [diff] [blame^] | 60 | * Possible mask of values for GroupCipher param. |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 61 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 62 | enum GroupCipherMask : @1.2::ISupplicantStaNetwork.GroupCipherMask { |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 63 | /** |
| 64 | * SMS4 Group Cipher |
| 65 | */ |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 66 | SMS4 = 1 << 7, |
| 67 | }; |
| 68 | |
Jimmy Chen | 0cb0aed | 2019-07-04 14:51:22 +0800 | [diff] [blame] | 69 | /** |
Hai Shalom | 08b7022 | 2020-01-06 16:31:18 -0800 | [diff] [blame^] | 70 | * Possible mask of values for AuthAlg param. |
| 71 | */ |
| 72 | enum AuthAlgMask : @1.0::ISupplicantStaNetwork.AuthAlgMask { |
| 73 | SAE = 1 << 4, |
| 74 | }; |
| 75 | |
| 76 | /** |
Jimmy Chen | 0cb0aed | 2019-07-04 14:51:22 +0800 | [diff] [blame] | 77 | * Set OCSP (Online Certificate Status Protocol) type for this network. |
| 78 | * |
| 79 | * @param ocspType value to set. |
| 80 | * @return status Status of the operation. |
| 81 | * Possible status codes: |
| 82 | * |SupplicantStatusCode.SUCCESS|, |
| 83 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 84 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 85 | */ |
| 86 | setOcsp(OcspType ocspType) generates (SupplicantStatus status); |
| 87 | |
| 88 | /** |
| 89 | * Get OCSP (Online Certificate Status Protocol) type for this network. |
| 90 | * |
| 91 | * @return status Status of the operation. |
| 92 | * Possible status codes: |
| 93 | * |SupplicantStatusCode.SUCCESS|, |
| 94 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 95 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 96 | * @return ocspType ocsp type. |
| 97 | */ |
| 98 | getOcsp() generates (SupplicantStatus status, OcspType ocspType); |
Jimmy Chen | 1eb8236 | 2019-08-28 17:54:29 +0800 | [diff] [blame] | 99 | |
| 100 | /** |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 101 | * Set key management mask for the network. |
| 102 | * |
| 103 | * @param keyMgmtMask value to set. |
| 104 | * Combination of |KeyMgmtMask| values. |
| 105 | * @return status Status of the operation. |
| 106 | * Possible status codes: |
| 107 | * |SupplicantStatusCode.SUCCESS|, |
| 108 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 109 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 110 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 111 | */ |
| 112 | setKeyMgmt_1_3(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status); |
| 113 | |
| 114 | /** |
| 115 | * Get the key mgmt mask set for the network. |
| 116 | * |
| 117 | * @return status Status of the operation. |
| 118 | * Possible status codes: |
| 119 | * |SupplicantStatusCode.SUCCESS|, |
| 120 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 121 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 122 | * @return keyMgmtMask Combination of |KeyMgmtMask| values. |
| 123 | */ |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 124 | getKeyMgmt_1_3() generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask); |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 125 | |
| 126 | /** |
| 127 | * Set proto mask for the network. |
| 128 | * |
| 129 | * @param protoMask value to set. |
| 130 | * Combination of |ProtoMask| values. |
| 131 | * @return status Status of the operation. |
| 132 | * Possible status codes: |
| 133 | * |SupplicantStatusCode.SUCCESS|, |
| 134 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 135 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 136 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 137 | */ |
| 138 | setProto_1_3(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status); |
| 139 | |
| 140 | /** |
| 141 | * Get the proto mask set for the network. |
| 142 | * |
| 143 | * @return status Status of the operation. |
| 144 | * Possible status codes: |
| 145 | * |SupplicantStatusCode.SUCCESS|, |
| 146 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 147 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 148 | * @return protoMask Combination of |ProtoMask| values. |
| 149 | */ |
| 150 | getProto_1_3() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask); |
| 151 | |
| 152 | /** |
| 153 | * Set group cipher mask for the network. |
| 154 | * |
| 155 | * @param groupCipherMask value to set. |
| 156 | * Combination of |ProtoMask| values. |
| 157 | * @return status Status of the operation. |
| 158 | * Possible status codes: |
| 159 | * |SupplicantStatusCode.SUCCESS|, |
| 160 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 161 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 162 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 163 | */ |
| 164 | setGroupCipher_1_3(bitfield<GroupCipherMask> groupCipherMask) |
| 165 | generates (SupplicantStatus status); |
| 166 | |
| 167 | /** |
| 168 | * Get the pairwise cipher mask set for the network. |
| 169 | * |
| 170 | * @return status Status of the operation. |
| 171 | * Possible status codes: |
| 172 | * |SupplicantStatusCode.SUCCESS|, |
| 173 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 174 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 175 | * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values. |
| 176 | */ |
| 177 | getPairwiseCipher_1_3() |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 178 | generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask); |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 179 | |
| 180 | /** |
| 181 | * Set pairwise cipher mask for the network. |
| 182 | * |
| 183 | * @param pairwiseCipherMask value to set. |
| 184 | * Combination of |ProtoMask| values. |
| 185 | * @return status Status of the operation. |
| 186 | * Possible status codes: |
| 187 | * |SupplicantStatusCode.SUCCESS|, |
| 188 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 189 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 190 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 191 | */ |
| 192 | setPairwiseCipher_1_3(bitfield<PairwiseCipherMask> pairwiseCipherMask) |
| 193 | generates (SupplicantStatus status); |
| 194 | |
| 195 | /** |
| 196 | * Get the group cipher mask set for the network. |
| 197 | * |
| 198 | * @return status Status of the operation. |
| 199 | * Possible status codes: |
| 200 | * |SupplicantStatusCode.SUCCESS|, |
| 201 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 202 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 203 | * @return groupCipherMask Combination of |GroupCipherMask| values. |
| 204 | */ |
| 205 | getGroupCipher_1_3() |
Sunil Ravi | c6489a5 | 2019-12-06 18:03:24 -0800 | [diff] [blame] | 206 | generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask); |
Jimmy Chen | e374a4a | 2019-09-16 16:09:27 +0800 | [diff] [blame] | 207 | |
| 208 | /** |
| 209 | * Set WAPI certificate suite for this network. |
| 210 | * |
| 211 | * @param suite value to set. |
| 212 | * @return status Status of the operation. |
| 213 | * Possible status codes: |
| 214 | * |SupplicantStatusCode.SUCCESS|, |
| 215 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 216 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 217 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 218 | */ |
| 219 | setWapiCertSuite(string suite) generates (SupplicantStatus status); |
| 220 | |
| 221 | /** |
| 222 | * Get WAPI certificate suite set for this network. |
| 223 | * |
| 224 | * @return status Status of the operation. |
| 225 | * Possible status codes: |
| 226 | * |SupplicantStatusCode.SUCCESS|, |
| 227 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|, |
| 228 | * |SupplicantStatusCode.FAILURE_UNKNOWN| |
| 229 | * @return suite The name of a suite. |
| 230 | */ |
| 231 | getWapiCertSuite() generates (SupplicantStatus status, string suite); |
| 232 | |
| 233 | /** |
Jimmy Chen | 1eb8236 | 2019-08-28 17:54:29 +0800 | [diff] [blame] | 234 | * Add a PMK into supplicant PMK cache. |
| 235 | * |
| 236 | * @param serializedEntry is serialized PMK cache entry, the content is |
| 237 | * opaque for the framework and depends on the native implementation. |
| 238 | * @return status Status of the operation |
| 239 | * Possible status codes: |
| 240 | * |SupplicantStatusCode.SUCCESS|, |
| 241 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 242 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 243 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 244 | */ |
Ahmed ElArabawy | e56767d | 2019-09-30 09:35:03 -0700 | [diff] [blame] | 245 | setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status); |
Hai Shalom | 08b7022 | 2020-01-06 16:31:18 -0800 | [diff] [blame^] | 246 | |
| 247 | /** |
| 248 | * Set auth alg mask for the network. |
| 249 | * |
| 250 | * @param authAlgMask value to set. |
| 251 | * Combination of |ProtoMask| values. |
| 252 | * @return status Status of the operation. |
| 253 | * Possible status codes: |
| 254 | * |SupplicantStatusCode.SUCCESS|, |
| 255 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 256 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 257 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 258 | */ |
| 259 | setAuthAlg_1_3(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status); |
| 260 | |
| 261 | /** |
| 262 | * Get the auth alg mask set for the network. |
| 263 | * |
| 264 | * @return status Status of the operation. |
| 265 | * Possible status codes: |
| 266 | * |SupplicantStatusCode.SUCCESS|, |
| 267 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 268 | * @return authAlgMask Combination of |AuthAlgMask| values. |
| 269 | */ |
| 270 | getAuthAlg_1_3() generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask); |
Jimmy Chen | 0cb0aed | 2019-07-04 14:51:22 +0800 | [diff] [blame] | 271 | }; |