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