Hai Shalom | fcc8fa0 | 2018-10-15 15:36:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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.2; |
| 18 | |
| 19 | import @1.0::ISupplicantStaNetworkCallback; |
| 20 | import @1.0::ISupplicantStaNetwork; |
| 21 | import @1.0::SupplicantStatus; |
| 22 | import @1.1::ISupplicantStaNetwork; |
| 23 | |
| 24 | /** |
| 25 | * Interface exposed by the supplicant for each station mode network |
| 26 | * configuration it controls. |
| 27 | */ |
| 28 | interface ISupplicantStaNetwork extends @1.1::ISupplicantStaNetwork { |
| 29 | /** Possble mask of values for KeyMgmt param. */ |
| 30 | enum KeyMgmtMask : @1.0::ISupplicantStaNetwork.KeyMgmtMask { |
| 31 | /** WPA3-Personal SAE Key management */ |
| 32 | SAE = 1 << 10, |
| 33 | |
| 34 | /** WPA3-Enterprise Suite-B Key management */ |
| 35 | SUITE_B_192 = 1 << 17, |
| 36 | |
| 37 | /** Enhacned Open (OWE) Key management */ |
| 38 | OWE = 1 << 22, |
| 39 | }; |
| 40 | |
| 41 | /** Possble mask of values for PairwiseCipher param. */ |
| 42 | enum PairwiseCipherMask : @1.0::ISupplicantStaNetwork.PairwiseCipherMask { |
| 43 | /** GCMP-256 Pairwise Cipher */ |
| 44 | GCMP_256 = 1 << 8, |
| 45 | }; |
| 46 | |
| 47 | /** Possble mask of values for GroupCipher param. */ |
| 48 | enum GroupCipherMask : @1.0::ISupplicantStaNetwork.GroupCipherMask { |
| 49 | /** GCMP-256 Group Cipher */ |
| 50 | GCMP_256 = 1 << 8, |
| 51 | }; |
| 52 | |
Hai Shalom | dbcb2c6 | 2018-10-30 15:23:01 -0700 | [diff] [blame] | 53 | /** Possble mask of values for GroupMgmtCipher param. */ |
| 54 | enum GroupMgmtCipherMask : uint32_t { |
| 55 | /** BIP_GMAC-128 Group Management Cipher */ |
| 56 | BIP_GMAC_128 = 1 << 11, |
| 57 | |
| 58 | /** BIP_GMAC-256 Group Management Cipher */ |
| 59 | BIP_GMAC_256 = 1 << 12, |
| 60 | |
| 61 | /** BIP_CMAC-256 Group Management Cipher */ |
| 62 | BIP_CMAC_256 = 1 << 13, |
| 63 | }; |
| 64 | |
Hai Shalom | fcc8fa0 | 2018-10-15 15:36:04 -0700 | [diff] [blame] | 65 | /** |
| 66 | * Set key management mask for the network. |
| 67 | * |
| 68 | * @param keyMgmtMask value to set. |
| 69 | * Combination of |KeyMgmtMask| values. |
| 70 | * @return status Status of the operation. |
| 71 | * Possible status codes: |
| 72 | * |SupplicantStatusCode.SUCCESS|, |
| 73 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 74 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 75 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 76 | */ |
| 77 | setKeyMgmt_1_2(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status); |
| 78 | |
| 79 | /** |
| 80 | * Get the key mgmt mask set for the network. |
| 81 | * |
| 82 | * @return status Status of the operation. |
| 83 | * Possible status codes: |
| 84 | * |SupplicantStatusCode.SUCCESS|, |
| 85 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 86 | * @return keyMgmtMask Combination of |KeyMgmtMask| values. |
| 87 | */ |
| 88 | getKeyMgmt_1_2() |
| 89 | generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask); |
| 90 | |
| 91 | /** |
| 92 | * Set pairwise cipher mask for the network. |
| 93 | * |
| 94 | * @param pairwiseCipherMask value to set. |
| 95 | * Combination of |PairwiseCipherMask| values. |
| 96 | * @return status Status of the operation. |
| 97 | * Possible status codes: |
| 98 | * |SupplicantStatusCode.SUCCESS|, |
| 99 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 100 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 101 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 102 | */ |
| 103 | setPairwiseCipher_1_2(bitfield<PairwiseCipherMask> pairwiseCipherMask) |
| 104 | generates (SupplicantStatus status); |
| 105 | |
| 106 | /** |
| 107 | * Get the pairwise cipher mask set for the network. |
| 108 | * |
| 109 | * @return status Status of the operation. |
| 110 | * Possible status codes: |
| 111 | * |SupplicantStatusCode.SUCCESS|, |
| 112 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 113 | * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values. |
| 114 | */ |
| 115 | getPairwiseCipher_1_2() |
| 116 | generates (SupplicantStatus status, |
| 117 | bitfield<PairwiseCipherMask> pairwiseCipherMask); |
| 118 | |
| 119 | /** |
| 120 | * Set group cipher mask for the network. |
| 121 | * |
| 122 | * @param groupCipherMask value to set. |
| 123 | * Combination of |GroupCipherMask| values. |
| 124 | * @return status Status of the operation. |
| 125 | * Possible status codes: |
| 126 | * |SupplicantStatusCode.SUCCESS|, |
| 127 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 128 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 129 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 130 | */ |
| 131 | setGroupCipher_1_2(bitfield<GroupCipherMask> groupCipherMask) |
| 132 | generates (SupplicantStatus status); |
| 133 | |
| 134 | /** |
| 135 | * Get the group cipher mask set for the network. |
| 136 | * |
| 137 | * @return status Status of the operation. |
| 138 | * Possible status codes: |
| 139 | * |SupplicantStatusCode.SUCCESS|, |
| 140 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 141 | * @return groupCipherMask Combination of |GroupCipherMask| values. |
| 142 | */ |
| 143 | getGroupCipher_1_2() |
| 144 | generates (SupplicantStatus status, |
| 145 | bitfield<GroupCipherMask> groupCipherMask); |
| 146 | |
| 147 | /** |
Hai Shalom | dbcb2c6 | 2018-10-30 15:23:01 -0700 | [diff] [blame] | 148 | * Set group management cipher mask for the network. |
| 149 | * |
| 150 | * @param groupMgmtCipherMask value to set. |
| 151 | * Combination of |GroupMgmtCipherMask| values. |
| 152 | * @return status Status of the operation. |
| 153 | * Possible status codes: |
| 154 | * |SupplicantStatusCode.SUCCESS|, |
| 155 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 156 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 157 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 158 | */ |
| 159 | setGroupMgmtCipher(bitfield<GroupMgmtCipherMask> groupMgmtCipherMask) |
| 160 | generates (SupplicantStatus status); |
| 161 | |
| 162 | /** |
| 163 | * Get the group management cipher mask set for the network. |
| 164 | * |
| 165 | * @return status Status of the operation. |
| 166 | * Possible status codes: |
| 167 | * |SupplicantStatusCode.SUCCESS|, |
| 168 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 169 | * @return groupMgmtCipherMask Combination of |GroupMgmtCipherMask| values. |
| 170 | */ |
| 171 | getGroupMgmtCipher() |
| 172 | generates (SupplicantStatus status, |
| 173 | bitfield<GroupMgmtCipherMask> groupMgmtCipherMask); |
| 174 | |
| 175 | /** |
Hai Shalom | fcc8fa0 | 2018-10-15 15:36:04 -0700 | [diff] [blame] | 176 | * Enable TLS Suite-B in EAP Phase1 |
| 177 | * |
| 178 | * @param enable Set to true to enable TLS Suite-B in EAP phase1 |
| 179 | * |
| 180 | * @return status Status of the operation. |
| 181 | * Possible status codes: |
| 182 | * |SupplicantStatusCode.SUCCESS|, |
| 183 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 184 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 185 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 186 | */ |
| 187 | enableTlsSuiteBEapPhase1Param(bool enable) |
| 188 | generates (SupplicantStatus status); |
| 189 | |
| 190 | /** |
| 191 | * Set EAP OpenSSL Suite-B-192 ciphers for WPA3-Enterprise |
| 192 | * Supported option: |
| 193 | * |
| 194 | * @return status Status of the operation. |
| 195 | * Possible status codes: |
| 196 | * |SupplicantStatusCode.SUCCESS|, |
| 197 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 198 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 199 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 200 | */ |
| 201 | enableSuiteBEapOpenSslCiphers() |
| 202 | generates (SupplicantStatus status); |
| 203 | |
| 204 | /** |
| 205 | * Get SAE password for WPA3-Personal |
| 206 | * |
| 207 | * @return status Status of the operation, and a string. |
| 208 | * Possible status codes: |
| 209 | * |SupplicantStatusCode.SUCCESS|, |
| 210 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 211 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 212 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 213 | */ |
| 214 | getSaePassword() |
| 215 | generates (SupplicantStatus status, string saePassword); |
| 216 | |
| 217 | /** |
| 218 | * Get SAE password ID for WPA3-Personal |
| 219 | * |
| 220 | * @return status Status of the operation, and a string. |
| 221 | * Possible status codes: |
| 222 | * |SupplicantStatusCode.SUCCESS|, |
| 223 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 224 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 225 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 226 | */ |
| 227 | getSaePasswordId() |
| 228 | generates (SupplicantStatus status, string saePasswordId); |
| 229 | |
| 230 | /** |
| 231 | * Set SAE password for WPA3-Personal |
| 232 | * |
| 233 | * @param saePassword string with the above option |
| 234 | * |
| 235 | * @return status Status of the operation. |
| 236 | * Possible status codes: |
| 237 | * |SupplicantStatusCode.SUCCESS|, |
| 238 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 239 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 240 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 241 | */ |
| 242 | setSaePassword(string saePassword) |
| 243 | generates (SupplicantStatus status); |
| 244 | |
| 245 | /** |
| 246 | * Set SAE password ID for WPA3-Personal |
| 247 | * |
| 248 | * @param sae_password_id string with the above option |
| 249 | * |
| 250 | * @return status Status of the operation. |
| 251 | * Possible status codes: |
| 252 | * |SupplicantStatusCode.SUCCESS|, |
| 253 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 254 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 255 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 256 | */ |
| 257 | setSaePasswordId(string saePasswordId) |
| 258 | generates (SupplicantStatus status); |
Hai Shalom | fcc8fa0 | 2018-10-15 15:36:04 -0700 | [diff] [blame] | 259 | }; |