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 | /** |
| 23 | * Interface exposed by wpa_supplicant for each station mode network |
| 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 |
| 143 | * wpa_supplicant to represent each network. |
| 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|, |
| 153 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 154 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 155 | */ |
| 156 | setSsid(Ssid ssid) generates (SupplicantStatus status); |
| 157 | |
| 158 | /** |
| 159 | * Set the network to only connect to an AP with provided BSSID. |
| 160 | * |
| 161 | * @param bssid value to set. |
| 162 | * @return status Status of the operation. |
| 163 | * Possible status codes: |
| 164 | * |SupplicantStatusCode.SUCCESS|, |
| 165 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 166 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 167 | */ |
| 168 | setBssid(Bssid bssid) generates (SupplicantStatus status); |
| 169 | |
| 170 | /** |
| 171 | * Set whether to send probe requests for this network (hidden). |
| 172 | * |
| 173 | * @param enable true to set, false otherwise. |
| 174 | * @return status Status of the operation. |
| 175 | * Possible status codes: |
| 176 | * |SupplicantStatusCode.SUCCESS|, |
| 177 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 178 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 179 | */ |
| 180 | setScanSsid(bool enable) generates (SupplicantStatus status); |
| 181 | |
| 182 | /** |
| 183 | * Set key management mask for the network. |
| 184 | * |
| 185 | * @param keyMgmtMask value to set. |
| 186 | * Combination of |KeyMgmtMask| values. |
| 187 | * @return status Status of the operation. |
| 188 | * Possible status codes: |
| 189 | * |SupplicantStatusCode.SUCCESS|, |
| 190 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 191 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 192 | */ |
| 193 | setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status); |
| 194 | |
| 195 | /** |
| 196 | * Set proto mask for the network. |
| 197 | * |
| 198 | * @param protoMask value to set. |
| 199 | * Combination of |ProtoMask| values. |
| 200 | * @return status Status of the operation. |
| 201 | * Possible status codes: |
| 202 | * |SupplicantStatusCode.SUCCESS|, |
| 203 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 204 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 205 | */ |
| 206 | setProto(uint32_t protoMask) generates (SupplicantStatus status); |
| 207 | |
| 208 | /** |
| 209 | * Set auth alg mask for the network. |
| 210 | * |
| 211 | * @param authAlgMask value to set. |
| 212 | * Combination of |ProtoMask| values. |
| 213 | * @return status Status of the operation. |
| 214 | * Possible status codes: |
| 215 | * |SupplicantStatusCode.SUCCESS|, |
| 216 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 217 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 218 | */ |
| 219 | setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status); |
| 220 | |
| 221 | /** |
| 222 | * Set group cipher mask for the network. |
| 223 | * |
| 224 | * @param groupCipherMask value to set. |
| 225 | * Combination of |ProtoMask| values. |
| 226 | * @return status Status of the operation. |
| 227 | * Possible status codes: |
| 228 | * |SupplicantStatusCode.SUCCESS|, |
| 229 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 230 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 231 | */ |
| 232 | setGroupCipher(uint32_t groupCipherMask) |
| 233 | generates (SupplicantStatus status); |
| 234 | |
| 235 | /** |
| 236 | * Set pairwise cipher mask for the network. |
| 237 | * |
| 238 | * @param pairwiseCipherMask value to set. |
| 239 | * Combination of |ProtoMask| values. |
| 240 | * @return status Status of the operation. |
| 241 | * Possible status codes: |
| 242 | * |SupplicantStatusCode.SUCCESS|, |
| 243 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 244 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 245 | */ |
| 246 | setPairwiseCipher(uint32_t pairwiseCipherMask) |
| 247 | generates (SupplicantStatus status); |
| 248 | |
| 249 | /** |
| 250 | * Set passphrase for WPA_PSK network. |
| 251 | * |
| 252 | * @param psk value to set. |
| 253 | * Length of value must be between |
| 254 | * |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and |
| 255 | * |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|. |
| 256 | * @return status Status of the operation. |
| 257 | * Possible status codes: |
| 258 | * |SupplicantStatusCode.SUCCESS|, |
| 259 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 260 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 261 | */ |
| 262 | setPskPassphrase(string psk) generates (SupplicantStatus status); |
| 263 | |
| 264 | /** |
| 265 | * Set WEP key for WEP network. |
| 266 | * |
| 267 | * @param keyIdx Index of wep key to set. |
| 268 | * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|. |
| 269 | * @param wepKey value to set. |
| 270 | * Length of each key must be either |
| 271 | * |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or |
| 272 | * |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|. |
| 273 | * @return status Status of the operation. |
| 274 | * Possible status codes: |
| 275 | * |SupplicantStatusCode.SUCCESS|, |
| 276 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 277 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 278 | */ |
| 279 | setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey) |
| 280 | generates (SupplicantStatus status); |
| 281 | |
| 282 | /** |
| 283 | * Set default Tx key index for WEP network. |
| 284 | * |
| 285 | * @param KeyIdx value to set. |
| 286 | * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|. |
| 287 | * @return status Status of the operation. |
| 288 | * Possible status codes: |
| 289 | * |SupplicantStatusCode.SUCCESS|, |
| 290 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 291 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 292 | */ |
| 293 | setWepTxKeyIdx(uint32_t keyIdx) |
| 294 | generates (SupplicantStatus status); |
| 295 | |
| 296 | /** |
| 297 | * Set whether RequirePmf is enabled for this network. |
| 298 | * |
| 299 | * @param enable true to set, false otherwise. |
| 300 | * @return status Status of the operation. |
| 301 | * Possible status codes: |
| 302 | * |SupplicantStatusCode.SUCCESS|, |
| 303 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 304 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 305 | */ |
| 306 | setRequirePmf(bool enable) generates (SupplicantStatus status); |
| 307 | |
| 308 | /** |
| 309 | * Set EAP Method for this network. |
| 310 | * |
| 311 | * @param method value to be set. |
| 312 | * Must be one of |EapMethod| values. |
| 313 | * @return status Status of the operation. |
| 314 | * Possible status codes: |
| 315 | * |SupplicantStatusCode.SUCCESS|, |
| 316 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 317 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 318 | */ |
| 319 | setEapMethod(EapMethod method) |
| 320 | generates (SupplicantStatus status); |
| 321 | |
| 322 | /** |
| 323 | * Set EAP Phase2 Method for this network. |
| 324 | * |
| 325 | * @param method value to set. |
| 326 | * Must be one of |EapPhase2Method| values. |
| 327 | * @return status Status of the operation. |
| 328 | * Possible status codes: |
| 329 | * |SupplicantStatusCode.SUCCESS|, |
| 330 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 331 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 332 | */ |
| 333 | setEapPhase2Method(EapPhase2Method method) |
| 334 | generates (SupplicantStatus status); |
| 335 | |
| 336 | /** |
| 337 | * Set EAP Identity for this network. |
| 338 | * |
| 339 | * @param identity value to set. |
| 340 | * @return status Status of the operation. |
| 341 | * Possible status codes: |
| 342 | * |SupplicantStatusCode.SUCCESS|, |
| 343 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 344 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 345 | */ |
| 346 | setEapIdentity(vec<uint8_t> identity) |
| 347 | generates (SupplicantStatus status); |
| 348 | |
| 349 | /** |
| 350 | * Set EAP Anonymous Identity for this network. |
| 351 | * |
| 352 | * @param identity value to set. |
| 353 | * @return status Status of the operation. |
| 354 | * Possible status codes: |
| 355 | * |SupplicantStatusCode.SUCCESS|, |
| 356 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 357 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 358 | */ |
| 359 | setEapAnonymousIdentity(vec<uint8_t> identity) |
| 360 | generates (SupplicantStatus status); |
| 361 | |
| 362 | /** |
| 363 | * Set EAP Password for this network. |
| 364 | * |
| 365 | * @param password value to set. |
| 366 | * @return status Status of the operation. |
| 367 | * Possible status codes: |
| 368 | * |SupplicantStatusCode.SUCCESS|, |
| 369 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 370 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 371 | */ |
| 372 | setEapPassword(vec<uint8_t> password) |
| 373 | generates (SupplicantStatus status); |
| 374 | |
| 375 | /** |
| 376 | * Set EAP CA certificate file path for this network. |
| 377 | * |
| 378 | * @param path value to set. |
| 379 | * @return status Status of the operation. |
| 380 | * Possible status codes: |
| 381 | * |SupplicantStatusCode.SUCCESS|, |
| 382 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 383 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 384 | */ |
| 385 | setEapCACert(string path) generates (SupplicantStatus status); |
| 386 | |
| 387 | /** |
| 388 | * Set EAP CA certificate directory path for this network. |
| 389 | * |
| 390 | * @param path value to set. |
| 391 | * @return status Status of the operation. |
| 392 | * Possible status codes: |
| 393 | * |SupplicantStatusCode.SUCCESS|, |
| 394 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 395 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 396 | */ |
| 397 | setEapCAPath(string path) generates (SupplicantStatus status); |
| 398 | |
| 399 | /** |
| 400 | * Set EAP Client certificate file path for this network. |
| 401 | * |
| 402 | * @param path value to set. |
| 403 | * @return status Status of the operation. |
| 404 | * Possible status codes: |
| 405 | * |SupplicantStatusCode.SUCCESS|, |
| 406 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 407 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 408 | */ |
| 409 | setEapClientCert(string path) generates (SupplicantStatus status); |
| 410 | |
| 411 | /** |
| 412 | * Set EAP private key file path for this network. |
| 413 | * |
| 414 | * @param path value to set. |
| 415 | * @return status Status of the operation. |
| 416 | * Possible status codes: |
| 417 | * |SupplicantStatusCode.SUCCESS|, |
| 418 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 419 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 420 | */ |
| 421 | setEapPrivateKey(string path) generates (SupplicantStatus status); |
| 422 | |
| 423 | /** |
| 424 | * Set EAP subject match for this network. |
| 425 | * |
| 426 | * @param match value to set. |
| 427 | * @return status Status of the operation. |
| 428 | * Possible status codes: |
| 429 | * |SupplicantStatusCode.SUCCESS|, |
| 430 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 431 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 432 | */ |
| 433 | setEapSubjectMatch(string match) generates (SupplicantStatus status); |
| 434 | |
| 435 | /** |
| 436 | * Set EAP Altsubject match for this network. |
| 437 | * |
| 438 | * @param match value to set. |
| 439 | * @return status Status of the operation. |
| 440 | * Possible status codes: |
| 441 | * |SupplicantStatusCode.SUCCESS|, |
| 442 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 443 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 444 | */ |
| 445 | setEapAltSubjectMatch(string match) |
| 446 | generates (SupplicantStatus status); |
| 447 | |
| 448 | /** |
| 449 | * Enable EAP Open SSL Engine for this network. |
| 450 | * |
| 451 | * @param enable true to set, false otherwise. |
| 452 | * @return status Status of the operation. |
| 453 | * Possible status codes: |
| 454 | * |SupplicantStatusCode.SUCCESS|, |
| 455 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 456 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 457 | */ |
| 458 | setEapEngine(bool enable) generates (SupplicantStatus status); |
| 459 | |
| 460 | /** |
| 461 | * Set EAP Open SSL Engine ID for this network. |
| 462 | * |
| 463 | * @param id value to set. |
| 464 | * @return status Status of the operation. |
| 465 | * Possible status codes: |
| 466 | * |SupplicantStatusCode.SUCCESS|, |
| 467 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 468 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 469 | */ |
| 470 | setEapEngineID(string id) generates (SupplicantStatus status); |
| 471 | |
| 472 | /** |
| 473 | * Set EAP Domain suffix match for this network. |
| 474 | * |
| 475 | * @param match value to set. |
| 476 | * @return status Status of the operation. |
| 477 | * Possible status codes: |
| 478 | * |SupplicantStatusCode.SUCCESS|, |
| 479 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 480 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 481 | */ |
| 482 | setEapDomainSuffixMatch(string match) |
| 483 | generates (SupplicantStatus status); |
| 484 | |
| 485 | /** |
| 486 | * Getters for the various network params. |
| 487 | */ |
| 488 | /** |
| 489 | * Get SSID for this network. |
| 490 | * |
| 491 | * @return status Status of the operation. |
| 492 | * Possible status codes: |
| 493 | * |SupplicantStatusCode.SUCCESS|, |
| 494 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 495 | * @return ssid value set. |
| 496 | */ |
| 497 | getSsid() generates (SupplicantStatus status, Ssid ssid); |
| 498 | |
| 499 | /** |
| 500 | * Get the BSSID set for this network. |
| 501 | * |
| 502 | * @return status Status of the operation. |
| 503 | * Possible status codes: |
| 504 | * |SupplicantStatusCode.SUCCESS|, |
| 505 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 506 | * @return bssid value set. |
| 507 | */ |
| 508 | getBssid() generates (SupplicantStatus status, Bssid bssid); |
| 509 | |
| 510 | /** |
| 511 | * Get whether Probe Requests are being sent for this network (hidden). |
| 512 | * |
| 513 | * @return status Status of the operation. |
| 514 | * Possible status codes: |
| 515 | * |SupplicantStatusCode.SUCCESS|, |
| 516 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 517 | * @return enabled true if set, false otherwise. |
| 518 | */ |
| 519 | getScanSsid() generates (SupplicantStatus status, bool enabled); |
| 520 | |
| 521 | /** |
| 522 | * Get the key mgmt mask set for the network. |
| 523 | * |
| 524 | * @return status Status of the operation. |
| 525 | * Possible status codes: |
| 526 | * |SupplicantStatusCode.SUCCESS|, |
| 527 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 528 | * @return keyMgmtMask Combination of |KeyMgmtMask| values. |
| 529 | */ |
| 530 | getKeyMgmt() |
| 531 | generates (SupplicantStatus status, uint32_t keyMgmtMask); |
| 532 | |
| 533 | /** |
| 534 | * Get the proto mask set for the network. |
| 535 | * |
| 536 | * @return status Status of the operation. |
| 537 | * Possible status codes: |
| 538 | * |SupplicantStatusCode.SUCCESS|, |
| 539 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 540 | * @return protoMask Combination of |ProtoMask| values. |
| 541 | */ |
| 542 | getProto() generates (SupplicantStatus status, uint32_t protoMask); |
| 543 | |
| 544 | /** |
| 545 | * Get the auth alg 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 authAlgMask Combination of |AuthAlgMask| values. |
| 552 | */ |
| 553 | getAuthAlg() |
| 554 | generates (SupplicantStatus status, uint32_t authAlgMask); |
| 555 | |
| 556 | /** |
| 557 | * Get the group cipher 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 groupCipherMask Combination of |GroupCipherMask| values. |
| 564 | */ |
| 565 | getGroupCipher() |
| 566 | generates (SupplicantStatus status, uint32_t groupCipherMask); |
| 567 | |
| 568 | /** |
| 569 | * Get the pairwise cipher mask set for the network. |
| 570 | * |
| 571 | * @return status Status of the operation. |
| 572 | * Possible status codes: |
| 573 | * |SupplicantStatusCode.SUCCESS|, |
| 574 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 575 | * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values. |
| 576 | */ |
| 577 | getPairwiseCipher() |
| 578 | generates (SupplicantStatus status, uint32_t pairwiseCipherMask); |
| 579 | |
| 580 | /** |
| 581 | * Get passphrase for WPA_PSK network. |
| 582 | * |
| 583 | * @return status Status of the operation. |
| 584 | * Possible status codes: |
| 585 | * |SupplicantStatusCode.SUCCESS|, |
| 586 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 587 | * @return psk value set. |
| 588 | */ |
| 589 | getPskPassphrase() generates (SupplicantStatus status, string psk); |
| 590 | |
| 591 | /** |
| 592 | * Get WEP key for WEP network. |
| 593 | * |
| 594 | * @param keyIdx Index of wep key to be fetched. |
| 595 | * Max of |WEP_KEYS_MAX_NUM|. |
| 596 | * @return status Status of the operation. |
| 597 | * Possible status codes: |
| 598 | * |SupplicantStatusCode.SUCCESS|, |
| 599 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 600 | * @return wepKey value set. |
| 601 | */ |
| 602 | getWepKey(uint32_t keyIdx) |
| 603 | generates (SupplicantStatus status, vec<uint8_t> wepKey); |
| 604 | |
| 605 | /** |
| 606 | * Get default Tx key index for WEP network. |
| 607 | * |
| 608 | * @return status Status of the operation. |
| 609 | * Possible status codes: |
| 610 | * |SupplicantStatusCode.SUCCESS|, |
| 611 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 612 | * @return keyIdx value set. |
| 613 | */ |
| 614 | getWepTxKeyIdx() |
| 615 | generates (SupplicantStatus status, uint32_t keyIdx); |
| 616 | |
| 617 | /** |
| 618 | * Get whether RequirePmf is enabled for this network. |
| 619 | * |
| 620 | * @return status Status of the operation. |
| 621 | * Possible status codes: |
| 622 | * |SupplicantStatusCode.SUCCESS|, |
| 623 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 624 | * @return enabled true if set, false otherwise. |
| 625 | */ |
| 626 | getRequirePmf() generates (SupplicantStatus status, bool enabled); |
| 627 | |
| 628 | /** |
| 629 | * Enable the network for connection purposes. |
| 630 | * |
| 631 | * This must trigger a connection to the network if: |
| 632 | * a) |noConnect| is false, and |
| 633 | * b) This is the only network configured, and |
| 634 | * c) Is visible in the current scan results. |
| 635 | * |
| 636 | * @param noConnect Only enable the network, dont trigger a connect. |
| 637 | * @return status Status of the operation. |
| 638 | * Possible status codes: |
| 639 | * |SupplicantStatusCode.SUCCESS|, |
| 640 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 641 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 642 | */ |
| 643 | enable(bool noConnect) generates (SupplicantStatus status); |
| 644 | |
| 645 | /** |
| 646 | * Disable the network for connection purposes. |
| 647 | * |
| 648 | * This must trigger a disconnection from the network, if currently |
| 649 | * connected to this one. |
| 650 | * |
| 651 | * @return status Status of the operation. |
| 652 | * Possible status codes: |
| 653 | * |SupplicantStatusCode.SUCCESS|, |
| 654 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 655 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 656 | */ |
| 657 | disable() generates (SupplicantStatus status); |
| 658 | |
| 659 | /** |
| 660 | * Initiate connection to this network. |
| 661 | * |
| 662 | * @return status Status of the operation. |
| 663 | * Possible status codes: |
| 664 | * |SupplicantStatusCode.SUCCESS|, |
| 665 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 666 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 667 | */ |
| 668 | select() generates (SupplicantStatus status); |
| 669 | |
| 670 | /** |
| 671 | * Used to send a response to the |
| 672 | * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request. |
| 673 | * |
| 674 | * @param params Params to be used for EAP GSM authentication. |
| 675 | * @return status Status of the operation. |
| 676 | * Possible status codes: |
| 677 | * |SupplicantStatusCode.SUCCESS|, |
| 678 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 679 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 680 | */ |
| 681 | sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params) |
| 682 | generates (SupplicantStatus status); |
| 683 | |
| 684 | /** |
| 685 | * Used to send a response to the |
| 686 | * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request. |
| 687 | * |
| 688 | * @param params Params to be used for EAP UMTS authentication. |
| 689 | * @return status Status of the operation. |
| 690 | * Possible status codes: |
| 691 | * |SupplicantStatusCode.SUCCESS|, |
| 692 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 693 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 694 | */ |
| 695 | sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params) |
| 696 | generates (SupplicantStatus status); |
| 697 | |
| 698 | /** |
| 699 | * Used to send a response to the |
| 700 | * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request. |
| 701 | * |
| 702 | * @param identity Identity to be used for the network. |
| 703 | * @return status Status of the operation. |
| 704 | * Possible status codes: |
| 705 | * |SupplicantStatusCode.SUCCESS|, |
| 706 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 707 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 708 | */ |
| 709 | sendNetworkEapIdentityResponse(vec<uint8_t> identity) |
| 710 | generates (SupplicantStatus status); |
| 711 | }; |