blob: 2505912cfb0324b15b0ade265f3da8724ad31d65 [file] [log] [blame]
Jimmy Chen0cb0aed2019-07-04 14:51:22 +08001/*
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
17package android.hardware.wifi.supplicant@1.3;
18
Jimmy Chene374a4a2019-09-16 16:09:27 +080019import @1.0::ISupplicantStaNetwork;
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080020import @1.0::SupplicantStatus;
21import @1.2::ISupplicantStaNetwork;
22
23/**
24 * Interface exposed by the supplicant for each station mode network
25 * configuration it controls.
26 */
27interface ISupplicantStaNetwork extends @1.2::ISupplicantStaNetwork {
Sunil Ravic6489a52019-12-06 18:03:24 -080028 /**
Hai Shalom08b70222020-01-06 16:31:18 -080029 * Possible mask of values for Proto param.
Sunil Ravic6489a52019-12-06 18:03:24 -080030 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080031 enum ProtoMask : @1.0::ISupplicantStaNetwork.ProtoMask {
32 WAPI = 1 << 2,
33 };
34
Sunil Ravic6489a52019-12-06 18:03:24 -080035 /**
Hai Shalom08b70222020-01-06 16:31:18 -080036 * Possible mask of values for KeyMgmt param.
Sunil Ravic6489a52019-12-06 18:03:24 -080037 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080038 enum KeyMgmtMask : @1.2::ISupplicantStaNetwork.KeyMgmtMask {
Sunil Ravic6489a52019-12-06 18:03:24 -080039 /*
40 * WAPI Psk
41 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080042 WAPI_PSK = 1 << 12,
Sunil Ravic6489a52019-12-06 18:03:24 -080043 /**
44 * WAPI Cert
45 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080046 WAPI_CERT = 1 << 13,
Vamsi Krishna2f829232019-12-05 19:18:50 +053047 /**
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 Chene374a4a2019-09-16 16:09:27 +080055 };
56
Sunil Ravic6489a52019-12-06 18:03:24 -080057 /**
Hai Shalom08b70222020-01-06 16:31:18 -080058 * Possible mask of values for PairwiseCipher param.
Sunil Ravic6489a52019-12-06 18:03:24 -080059 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080060 enum PairwiseCipherMask : @1.2::ISupplicantStaNetwork.PairwiseCipherMask {
Sunil Ravic6489a52019-12-06 18:03:24 -080061 /**
62 * SMS4 Pairwise Cipher
63 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080064 SMS4 = 1 << 7,
65 };
66
Sunil Ravic6489a52019-12-06 18:03:24 -080067 /**
Hai Shalom08b70222020-01-06 16:31:18 -080068 * Possible mask of values for GroupCipher param.
Sunil Ravic6489a52019-12-06 18:03:24 -080069 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080070 enum GroupCipherMask : @1.2::ISupplicantStaNetwork.GroupCipherMask {
Sunil Ravic6489a52019-12-06 18:03:24 -080071 /**
72 * SMS4 Group Cipher
73 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080074 SMS4 = 1 << 7,
75 };
76
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080077 /**
Hai Shalom08b70222020-01-06 16:31:18 -080078 * Possible mask of values for AuthAlg param.
79 */
80 enum AuthAlgMask : @1.0::ISupplicantStaNetwork.AuthAlgMask {
81 SAE = 1 << 4,
82 };
83
84 /**
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080085 * 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 Chen1eb82362019-08-28 17:54:29 +0800107
108 /**
Jimmy Chene374a4a2019-09-16 16:09:27 +0800109 * 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 Ravic6489a52019-12-06 18:03:24 -0800132 getKeyMgmt_1_3() generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800133
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 Ravic6489a52019-12-06 18:03:24 -0800186 generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800187
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 Ravic6489a52019-12-06 18:03:24 -0800214 generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800215
216 /**
Sunil Ravic8c00642020-02-08 18:45:20 -0800217 * Set WAPI certificate suite name for this network.
Jimmy Chene374a4a2019-09-16 16:09:27 +0800218 *
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 Ravic8c00642020-02-08 18:45:20 -0800230 * Get WAPI certificate suite name set for this network.
Jimmy Chene374a4a2019-09-16 16:09:27 +0800231 *
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 Ravic8c00642020-02-08 18:45:20 -0800242 * Add a pairwise master key (PMK) into supplicant PMK cache.
Jimmy Chen1eb82362019-08-28 17:54:29 +0800243 *
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 ElArabawye56767d2019-09-30 09:35:03 -0700253 setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status);
Hai Shalom08b70222020-01-06 16:31:18 -0800254
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 Krishna2f829232019-12-05 19:18:50 +0530279
280 /**
Sunil Ravic8c00642020-02-08 18:45:20 -0800281 * Enable Extensible Authentication (EAP) - Re-authentication Protocol (ERP) for this network.
Vamsi Krishna2f829232019-12-05 19:18:50 +0530282 *
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 Chen0cb0aed2019-07-04 14:51:22 +0800291};