Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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.0; |
| 18 | |
| 19 | import ISupplicantNetwork; |
| 20 | import ISupplicantStaNetworkCallback; |
| 21 | |
| 22 | /** |
Roshan Pius | 8c6a877 | 2016-11-03 09:37:57 -0700 | [diff] [blame] | 23 | * Interface exposed by the supplicant for each station mode network |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 24 | * configuration it controls. |
| 25 | */ |
| 26 | interface ISupplicantStaNetwork extends ISupplicantNetwork { |
| 27 | /** |
| 28 | * Size limits for some of the params used in this interface. |
| 29 | */ |
| 30 | enum ParamSizeLimits : uint32_t { |
| 31 | /** Max length of SSID param. */ |
| 32 | SSID_MAX_LEN_IN_BYTES = 32, |
| 33 | |
| 34 | /** Min length of PSK passphrase param. */ |
| 35 | PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8, |
| 36 | |
| 37 | /** Max length of PSK passphrase param. */ |
| 38 | PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63, |
| 39 | |
| 40 | /** Max number of WEP keys param. */ |
| 41 | WEP_KEYS_MAX_NUM = 4, |
| 42 | |
| 43 | /** Length of each WEP40 keys param. */ |
| 44 | WEP40_KEY_LEN_IN_BYTES = 5, |
| 45 | /** Length of each WEP104 keys param. */ |
| 46 | WEP104_KEY_LEN_IN_BYTES = 13, |
| 47 | }; |
| 48 | |
| 49 | /** Possble mask of values for KeyMgmt param. */ |
| 50 | enum KeyMgmtMask : uint32_t { |
| 51 | WPA_EAP = 1 << 0, |
| 52 | WPA_PSK = 1 << 1, |
| 53 | NONE = 1 << 2, |
| 54 | IEEE8021X = 1 << 3 |
| 55 | }; |
| 56 | |
| 57 | /** Possble mask of values for Proto param. */ |
| 58 | enum ProtoMask : uint32_t { |
| 59 | WPA = 1 << 0, |
| 60 | RSN = 1 << 1, |
| 61 | /** Unused 1 << 2 */ |
| 62 | OSEN = 1 << 3 |
| 63 | }; |
| 64 | |
| 65 | /** Possble mask of values for AuthAlg param. */ |
| 66 | enum AuthAlgMask : uint32_t { |
| 67 | OPEN = 1 << 0, |
| 68 | SHARED = 1 << 1, |
| 69 | LEAP = 1 << 2 |
| 70 | }; |
| 71 | |
| 72 | /** Possble mask of values for GroupCipher param. */ |
| 73 | enum GroupCipherMask : uint32_t { |
| 74 | WEP40 = 1 << 1, |
| 75 | WEP104 = 1 << 2, |
| 76 | TKIP = 1 << 3, |
| 77 | CCMP = 1 << 4 |
| 78 | }; |
| 79 | |
| 80 | /** Possble mask of values for PairwiseCipher param. */ |
| 81 | enum PairwiseCipherMask : uint32_t { |
| 82 | NONE = 1 << 0, |
| 83 | TKIP = 1 << 3, |
| 84 | CCMP = 1 << 4 |
| 85 | }; |
| 86 | |
| 87 | /** Possble values for EapMethod param. */ |
| 88 | enum EapMethod : uint32_t { |
| 89 | PEAP = 0, |
| 90 | TLS = 1, |
| 91 | TTLS = 2, |
| 92 | PWD = 3, |
| 93 | SIM = 4, |
| 94 | AKA = 5, |
| 95 | AKA_PRIME = 6, |
| 96 | WFA_UNAUTH_TLS = 7 |
| 97 | }; |
| 98 | |
| 99 | /** Possble values for Phase2Method param. */ |
| 100 | enum EapPhase2Method : uint32_t { |
| 101 | NONE = 0, |
| 102 | PAP = 1, |
| 103 | MSPAP = 2, |
| 104 | MSPAPV2 = 3, |
| 105 | GTC = 4 |
| 106 | }; |
| 107 | |
| 108 | /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */ |
| 109 | struct NetworkResponseEapSimGsmAuthParams { |
| 110 | uint8_t[8] kc; |
| 111 | uint8_t[4] sres; |
| 112 | }; |
| 113 | |
| 114 | /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */ |
| 115 | struct NetworkResponseEapSimUmtsAuthParams { |
| 116 | vec<uint8_t> res; |
| 117 | uint8_t[16] ik; |
| 118 | uint8_t[16] ck; |
| 119 | }; |
| 120 | |
| 121 | /** |
| 122 | * Register for callbacks from this network. |
| 123 | * |
| 124 | * These callbacks are invoked for events that are specific to this network. |
| 125 | * Registration of multiple callback objects is supported. These objects must |
| 126 | * be automatically deleted when the corresponding client process is dead or |
| 127 | * if this network is removed. |
| 128 | * |
| 129 | * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL |
| 130 | * interface object. |
| 131 | * @return status Status of the operation. |
| 132 | * Possible status codes: |
| 133 | * |SupplicantStatusCode.SUCCESS|, |
| 134 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 135 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 136 | */ |
| 137 | registerCallback(ISupplicantStaNetworkCallback callback) |
| 138 | generates (SupplicantStatus status); |
| 139 | |
| 140 | /** |
| 141 | * Setters for the various network params. |
| 142 | * These correspond to elements of |wpa_sssid| struct used internally by |
Roshan Pius | 8c6a877 | 2016-11-03 09:37:57 -0700 | [diff] [blame] | 143 | * the supplicant to represent each network. |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 144 | */ |
| 145 | /** |
| 146 | * Set SSID for this network. |
| 147 | * |
| 148 | * @param ssid value to set. |
| 149 | * Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|. |
| 150 | * @return status Status of the operation. |
| 151 | * Possible status codes: |
| 152 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 153 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 154 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 155 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 156 | */ |
| 157 | setSsid(Ssid ssid) generates (SupplicantStatus status); |
| 158 | |
| 159 | /** |
| 160 | * Set the network to only connect to an AP with provided BSSID. |
| 161 | * |
| 162 | * @param bssid value to set. |
| 163 | * @return status Status of the operation. |
| 164 | * Possible status codes: |
| 165 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 166 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 167 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 168 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 169 | */ |
| 170 | setBssid(Bssid bssid) generates (SupplicantStatus status); |
| 171 | |
| 172 | /** |
| 173 | * Set whether to send probe requests for this network (hidden). |
| 174 | * |
| 175 | * @param enable true to set, false otherwise. |
| 176 | * @return status Status of the operation. |
| 177 | * Possible status codes: |
| 178 | * |SupplicantStatusCode.SUCCESS|, |
| 179 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 180 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 181 | */ |
| 182 | setScanSsid(bool enable) generates (SupplicantStatus status); |
| 183 | |
| 184 | /** |
| 185 | * Set key management mask for the network. |
| 186 | * |
| 187 | * @param keyMgmtMask value to set. |
| 188 | * Combination of |KeyMgmtMask| values. |
| 189 | * @return status Status of the operation. |
| 190 | * Possible status codes: |
| 191 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 192 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 193 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 194 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 195 | */ |
| 196 | setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status); |
| 197 | |
| 198 | /** |
| 199 | * Set proto mask for the network. |
| 200 | * |
| 201 | * @param protoMask value to set. |
| 202 | * Combination of |ProtoMask| values. |
| 203 | * @return status Status of the operation. |
| 204 | * Possible status codes: |
| 205 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 206 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 207 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 208 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 209 | */ |
| 210 | setProto(uint32_t protoMask) generates (SupplicantStatus status); |
| 211 | |
| 212 | /** |
| 213 | * Set auth alg mask for the network. |
| 214 | * |
| 215 | * @param authAlgMask value to set. |
| 216 | * Combination of |ProtoMask| values. |
| 217 | * @return status Status of the operation. |
| 218 | * Possible status codes: |
| 219 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 220 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 221 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 222 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 223 | */ |
| 224 | setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status); |
| 225 | |
| 226 | /** |
| 227 | * Set group cipher mask for the network. |
| 228 | * |
| 229 | * @param groupCipherMask value to set. |
| 230 | * Combination of |ProtoMask| values. |
| 231 | * @return status Status of the operation. |
| 232 | * Possible status codes: |
| 233 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 234 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 235 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 236 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 237 | */ |
| 238 | setGroupCipher(uint32_t groupCipherMask) |
| 239 | generates (SupplicantStatus status); |
| 240 | |
| 241 | /** |
| 242 | * Set pairwise cipher mask for the network. |
| 243 | * |
| 244 | * @param pairwiseCipherMask value to set. |
| 245 | * Combination of |ProtoMask| values. |
| 246 | * @return status Status of the operation. |
| 247 | * Possible status codes: |
| 248 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 249 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 250 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 251 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 252 | */ |
| 253 | setPairwiseCipher(uint32_t pairwiseCipherMask) |
| 254 | generates (SupplicantStatus status); |
| 255 | |
| 256 | /** |
| 257 | * Set passphrase for WPA_PSK network. |
| 258 | * |
| 259 | * @param psk value to set. |
| 260 | * Length of value must be between |
| 261 | * |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and |
| 262 | * |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|. |
| 263 | * @return status Status of the operation. |
| 264 | * Possible status codes: |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 265 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 266 | * |SupplicantStatusCode.SUCCESS|, |
| 267 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 268 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 269 | */ |
| 270 | setPskPassphrase(string psk) generates (SupplicantStatus status); |
| 271 | |
| 272 | /** |
| 273 | * Set WEP key for WEP network. |
| 274 | * |
| 275 | * @param keyIdx Index of wep key to set. |
| 276 | * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|. |
| 277 | * @param wepKey value to set. |
| 278 | * Length of each key must be either |
| 279 | * |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or |
| 280 | * |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|. |
| 281 | * @return status Status of the operation. |
| 282 | * Possible status codes: |
| 283 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 284 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 285 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 286 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 287 | */ |
| 288 | setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey) |
| 289 | generates (SupplicantStatus status); |
| 290 | |
| 291 | /** |
| 292 | * Set default Tx key index for WEP network. |
| 293 | * |
| 294 | * @param KeyIdx value to set. |
| 295 | * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|. |
| 296 | * @return status Status of the operation. |
| 297 | * Possible status codes: |
| 298 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 299 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 300 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 301 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 302 | */ |
| 303 | setWepTxKeyIdx(uint32_t keyIdx) |
| 304 | generates (SupplicantStatus status); |
| 305 | |
| 306 | /** |
| 307 | * Set whether RequirePmf is enabled for this network. |
| 308 | * |
| 309 | * @param enable true to set, false otherwise. |
| 310 | * @return status Status of the operation. |
| 311 | * Possible status codes: |
| 312 | * |SupplicantStatusCode.SUCCESS|, |
| 313 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 314 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 315 | */ |
| 316 | setRequirePmf(bool enable) generates (SupplicantStatus status); |
| 317 | |
| 318 | /** |
| 319 | * Set EAP Method for this network. |
| 320 | * |
| 321 | * @param method value to be set. |
| 322 | * Must be one of |EapMethod| values. |
| 323 | * @return status Status of the operation. |
| 324 | * Possible status codes: |
| 325 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 326 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 327 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 328 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 329 | */ |
| 330 | setEapMethod(EapMethod method) |
| 331 | generates (SupplicantStatus status); |
| 332 | |
| 333 | /** |
| 334 | * Set EAP Phase2 Method for this network. |
| 335 | * |
| 336 | * @param method value to set. |
| 337 | * Must be one of |EapPhase2Method| values. |
| 338 | * @return status Status of the operation. |
| 339 | * Possible status codes: |
| 340 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 341 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 342 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 343 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 344 | */ |
| 345 | setEapPhase2Method(EapPhase2Method method) |
| 346 | generates (SupplicantStatus status); |
| 347 | |
| 348 | /** |
| 349 | * Set EAP Identity for this network. |
| 350 | * |
| 351 | * @param identity value to set. |
| 352 | * @return status Status of the operation. |
| 353 | * Possible status codes: |
| 354 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 355 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 356 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 357 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 358 | */ |
| 359 | setEapIdentity(vec<uint8_t> identity) |
| 360 | generates (SupplicantStatus status); |
| 361 | |
| 362 | /** |
| 363 | * Set EAP Anonymous Identity for this network. |
| 364 | * |
| 365 | * @param identity value to set. |
| 366 | * @return status Status of the operation. |
| 367 | * Possible status codes: |
| 368 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 369 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 370 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 371 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 372 | */ |
| 373 | setEapAnonymousIdentity(vec<uint8_t> identity) |
| 374 | generates (SupplicantStatus status); |
| 375 | |
| 376 | /** |
| 377 | * Set EAP Password for this network. |
| 378 | * |
| 379 | * @param password value to set. |
| 380 | * @return status Status of the operation. |
| 381 | * Possible status codes: |
| 382 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 383 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 384 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 385 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 386 | */ |
| 387 | setEapPassword(vec<uint8_t> password) |
| 388 | generates (SupplicantStatus status); |
| 389 | |
| 390 | /** |
| 391 | * Set EAP CA certificate file path for this network. |
| 392 | * |
| 393 | * @param path value to set. |
| 394 | * @return status Status of the operation. |
| 395 | * Possible status codes: |
| 396 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 397 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 398 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 399 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 400 | */ |
| 401 | setEapCACert(string path) generates (SupplicantStatus status); |
| 402 | |
| 403 | /** |
| 404 | * Set EAP CA certificate directory path for this network. |
| 405 | * |
| 406 | * @param path value to set. |
| 407 | * @return status Status of the operation. |
| 408 | * Possible status codes: |
| 409 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 410 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 411 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 412 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 413 | */ |
| 414 | setEapCAPath(string path) generates (SupplicantStatus status); |
| 415 | |
| 416 | /** |
| 417 | * Set EAP Client certificate file path for this network. |
| 418 | * |
| 419 | * @param path value to set. |
| 420 | * @return status Status of the operation. |
| 421 | * Possible status codes: |
| 422 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 423 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 424 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 425 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 426 | */ |
| 427 | setEapClientCert(string path) generates (SupplicantStatus status); |
| 428 | |
| 429 | /** |
| 430 | * Set EAP private key file path for this network. |
| 431 | * |
| 432 | * @param path value to set. |
| 433 | * @return status Status of the operation. |
| 434 | * Possible status codes: |
| 435 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 436 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 437 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 438 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 439 | */ |
| 440 | setEapPrivateKey(string path) generates (SupplicantStatus status); |
| 441 | |
| 442 | /** |
| 443 | * Set EAP subject match for this network. |
| 444 | * |
| 445 | * @param match value to set. |
| 446 | * @return status Status of the operation. |
| 447 | * Possible status codes: |
| 448 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 449 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 450 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 451 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 452 | */ |
| 453 | setEapSubjectMatch(string match) generates (SupplicantStatus status); |
| 454 | |
| 455 | /** |
| 456 | * Set EAP Altsubject match for this network. |
| 457 | * |
| 458 | * @param match value to set. |
| 459 | * @return status Status of the operation. |
| 460 | * Possible status codes: |
| 461 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 462 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 463 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 464 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 465 | */ |
| 466 | setEapAltSubjectMatch(string match) |
| 467 | generates (SupplicantStatus status); |
| 468 | |
| 469 | /** |
| 470 | * Enable EAP Open SSL Engine for this network. |
| 471 | * |
| 472 | * @param enable true to set, false otherwise. |
| 473 | * @return status Status of the operation. |
| 474 | * Possible status codes: |
| 475 | * |SupplicantStatusCode.SUCCESS|, |
| 476 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 477 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 478 | */ |
| 479 | setEapEngine(bool enable) generates (SupplicantStatus status); |
| 480 | |
| 481 | /** |
| 482 | * Set EAP Open SSL Engine ID for this network. |
| 483 | * |
| 484 | * @param id value to set. |
| 485 | * @return status Status of the operation. |
| 486 | * Possible status codes: |
| 487 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 488 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 489 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 490 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 491 | */ |
| 492 | setEapEngineID(string id) generates (SupplicantStatus status); |
| 493 | |
| 494 | /** |
| 495 | * Set EAP Domain suffix match for this network. |
| 496 | * |
| 497 | * @param match value to set. |
| 498 | * @return status Status of the operation. |
| 499 | * Possible status codes: |
| 500 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 501 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 502 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 503 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 504 | */ |
| 505 | setEapDomainSuffixMatch(string match) |
| 506 | generates (SupplicantStatus status); |
| 507 | |
| 508 | /** |
| 509 | * Getters for the various network params. |
| 510 | */ |
| 511 | /** |
| 512 | * Get SSID for this network. |
| 513 | * |
| 514 | * @return status Status of the operation. |
| 515 | * Possible status codes: |
| 516 | * |SupplicantStatusCode.SUCCESS|, |
| 517 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 518 | * @return ssid value set. |
| 519 | */ |
| 520 | getSsid() generates (SupplicantStatus status, Ssid ssid); |
| 521 | |
| 522 | /** |
| 523 | * Get the BSSID set for this network. |
| 524 | * |
| 525 | * @return status Status of the operation. |
| 526 | * Possible status codes: |
| 527 | * |SupplicantStatusCode.SUCCESS|, |
| 528 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 529 | * @return bssid value set. |
| 530 | */ |
| 531 | getBssid() generates (SupplicantStatus status, Bssid bssid); |
| 532 | |
| 533 | /** |
| 534 | * Get whether Probe Requests are being sent for this network (hidden). |
| 535 | * |
| 536 | * @return status Status of the operation. |
| 537 | * Possible status codes: |
| 538 | * |SupplicantStatusCode.SUCCESS|, |
| 539 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 540 | * @return enabled true if set, false otherwise. |
| 541 | */ |
| 542 | getScanSsid() generates (SupplicantStatus status, bool enabled); |
| 543 | |
| 544 | /** |
| 545 | * Get the key mgmt mask set for the network. |
| 546 | * |
| 547 | * @return status Status of the operation. |
| 548 | * Possible status codes: |
| 549 | * |SupplicantStatusCode.SUCCESS|, |
| 550 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 551 | * @return keyMgmtMask Combination of |KeyMgmtMask| values. |
| 552 | */ |
| 553 | getKeyMgmt() |
| 554 | generates (SupplicantStatus status, uint32_t keyMgmtMask); |
| 555 | |
| 556 | /** |
| 557 | * Get the proto mask set for the network. |
| 558 | * |
| 559 | * @return status Status of the operation. |
| 560 | * Possible status codes: |
| 561 | * |SupplicantStatusCode.SUCCESS|, |
| 562 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 563 | * @return protoMask Combination of |ProtoMask| values. |
| 564 | */ |
| 565 | getProto() generates (SupplicantStatus status, uint32_t protoMask); |
| 566 | |
| 567 | /** |
| 568 | * Get the auth alg mask set for the network. |
| 569 | * |
| 570 | * @return status Status of the operation. |
| 571 | * Possible status codes: |
| 572 | * |SupplicantStatusCode.SUCCESS|, |
| 573 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 574 | * @return authAlgMask Combination of |AuthAlgMask| values. |
| 575 | */ |
| 576 | getAuthAlg() |
| 577 | generates (SupplicantStatus status, uint32_t authAlgMask); |
| 578 | |
| 579 | /** |
| 580 | * Get the group cipher mask set for the network. |
| 581 | * |
| 582 | * @return status Status of the operation. |
| 583 | * Possible status codes: |
| 584 | * |SupplicantStatusCode.SUCCESS|, |
| 585 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 586 | * @return groupCipherMask Combination of |GroupCipherMask| values. |
| 587 | */ |
| 588 | getGroupCipher() |
| 589 | generates (SupplicantStatus status, uint32_t groupCipherMask); |
| 590 | |
| 591 | /** |
| 592 | * Get the pairwise cipher mask set for the network. |
| 593 | * |
| 594 | * @return status Status of the operation. |
| 595 | * Possible status codes: |
| 596 | * |SupplicantStatusCode.SUCCESS|, |
| 597 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 598 | * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values. |
| 599 | */ |
| 600 | getPairwiseCipher() |
| 601 | generates (SupplicantStatus status, uint32_t pairwiseCipherMask); |
| 602 | |
| 603 | /** |
| 604 | * Get passphrase for WPA_PSK network. |
| 605 | * |
| 606 | * @return status Status of the operation. |
| 607 | * Possible status codes: |
| 608 | * |SupplicantStatusCode.SUCCESS|, |
| 609 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 610 | * @return psk value set. |
| 611 | */ |
| 612 | getPskPassphrase() generates (SupplicantStatus status, string psk); |
| 613 | |
| 614 | /** |
| 615 | * Get WEP key for WEP network. |
| 616 | * |
| 617 | * @param keyIdx Index of wep key to be fetched. |
| 618 | * Max of |WEP_KEYS_MAX_NUM|. |
| 619 | * @return status Status of the operation. |
| 620 | * Possible status codes: |
| 621 | * |SupplicantStatusCode.SUCCESS|, |
| 622 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 623 | * @return wepKey value set. |
| 624 | */ |
| 625 | getWepKey(uint32_t keyIdx) |
| 626 | generates (SupplicantStatus status, vec<uint8_t> wepKey); |
| 627 | |
| 628 | /** |
| 629 | * Get default Tx key index for WEP network. |
| 630 | * |
| 631 | * @return status Status of the operation. |
| 632 | * Possible status codes: |
| 633 | * |SupplicantStatusCode.SUCCESS|, |
| 634 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 635 | * @return keyIdx value set. |
| 636 | */ |
| 637 | getWepTxKeyIdx() |
| 638 | generates (SupplicantStatus status, uint32_t keyIdx); |
| 639 | |
| 640 | /** |
| 641 | * Get whether RequirePmf is enabled for this network. |
| 642 | * |
| 643 | * @return status Status of the operation. |
| 644 | * Possible status codes: |
| 645 | * |SupplicantStatusCode.SUCCESS|, |
| 646 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 647 | * @return enabled true if set, false otherwise. |
| 648 | */ |
| 649 | getRequirePmf() generates (SupplicantStatus status, bool enabled); |
| 650 | |
| 651 | /** |
| 652 | * Enable the network for connection purposes. |
| 653 | * |
| 654 | * This must trigger a connection to the network if: |
| 655 | * a) |noConnect| is false, and |
| 656 | * b) This is the only network configured, and |
| 657 | * c) Is visible in the current scan results. |
| 658 | * |
| 659 | * @param noConnect Only enable the network, dont trigger a connect. |
| 660 | * @return status Status of the operation. |
| 661 | * Possible status codes: |
| 662 | * |SupplicantStatusCode.SUCCESS|, |
| 663 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 664 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 665 | */ |
| 666 | enable(bool noConnect) generates (SupplicantStatus status); |
| 667 | |
| 668 | /** |
| 669 | * Disable the network for connection purposes. |
| 670 | * |
| 671 | * This must trigger a disconnection from the network, if currently |
| 672 | * connected to this one. |
| 673 | * |
| 674 | * @return status Status of the operation. |
| 675 | * Possible status codes: |
| 676 | * |SupplicantStatusCode.SUCCESS|, |
| 677 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 678 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 679 | */ |
| 680 | disable() generates (SupplicantStatus status); |
| 681 | |
| 682 | /** |
| 683 | * Initiate connection to this network. |
| 684 | * |
| 685 | * @return status Status of the operation. |
| 686 | * Possible status codes: |
| 687 | * |SupplicantStatusCode.SUCCESS|, |
| 688 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 689 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 690 | */ |
| 691 | select() generates (SupplicantStatus status); |
| 692 | |
| 693 | /** |
| 694 | * Used to send a response to the |
| 695 | * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request. |
| 696 | * |
| 697 | * @param params Params to be used for EAP GSM authentication. |
| 698 | * @return status Status of the operation. |
| 699 | * Possible status codes: |
| 700 | * |SupplicantStatusCode.SUCCESS|, |
| 701 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 702 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 703 | */ |
| 704 | sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params) |
| 705 | generates (SupplicantStatus status); |
| 706 | |
| 707 | /** |
| 708 | * Used to send a response to the |
| 709 | * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request. |
| 710 | * |
| 711 | * @param params Params to be used for EAP UMTS authentication. |
| 712 | * @return status Status of the operation. |
| 713 | * Possible status codes: |
| 714 | * |SupplicantStatusCode.SUCCESS|, |
| 715 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 716 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 717 | */ |
| 718 | sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params) |
| 719 | generates (SupplicantStatus status); |
| 720 | |
| 721 | /** |
| 722 | * Used to send a response to the |
| 723 | * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request. |
| 724 | * |
| 725 | * @param identity Identity to be used for the network. |
| 726 | * @return status Status of the operation. |
| 727 | * Possible status codes: |
| 728 | * |SupplicantStatusCode.SUCCESS|, |
| 729 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 730 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 731 | */ |
| 732 | sendNetworkEapIdentityResponse(vec<uint8_t> identity) |
| 733 | generates (SupplicantStatus status); |
| 734 | }; |