blob: b16fb393b7c3e4eefe7eb00f90ee6d70c32c078d [file] [log] [blame]
Roshan Pius39f588f2016-10-31 14:51:27 -07001/*
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
17package android.hardware.wifi.supplicant@1.0;
18
19import ISupplicantNetwork;
20import ISupplicantStaNetworkCallback;
21
22/**
Roshan Pius8c6a8772016-11-03 09:37:57 -070023 * Interface exposed by the supplicant for each station mode network
Roshan Pius39f588f2016-10-31 14:51:27 -070024 * configuration it controls.
25 */
26interface 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,
Roshan Pius2d50db92017-01-13 15:53:07 -080054 IEEE8021X = 1 << 3,
55 FT_EAP = 1 << 5,
56 FT_PSK = 1 << 6,
57 OSEN = 1 << 15
Roshan Pius39f588f2016-10-31 14:51:27 -070058 };
59
60 /** Possble mask of values for Proto param. */
61 enum ProtoMask : uint32_t {
62 WPA = 1 << 0,
63 RSN = 1 << 1,
64 /** Unused 1 << 2 */
65 OSEN = 1 << 3
66 };
67
68 /** Possble mask of values for AuthAlg param. */
69 enum AuthAlgMask : uint32_t {
70 OPEN = 1 << 0,
71 SHARED = 1 << 1,
72 LEAP = 1 << 2
73 };
74
75 /** Possble mask of values for GroupCipher param. */
76 enum GroupCipherMask : uint32_t {
77 WEP40 = 1 << 1,
78 WEP104 = 1 << 2,
79 TKIP = 1 << 3,
Roshan Pius2d50db92017-01-13 15:53:07 -080080 CCMP = 1 << 4,
81 GTK_NOT_USED = 1 << 14
Roshan Pius39f588f2016-10-31 14:51:27 -070082 };
83
84 /** Possble mask of values for PairwiseCipher param. */
85 enum PairwiseCipherMask : uint32_t {
86 NONE = 1 << 0,
87 TKIP = 1 << 3,
88 CCMP = 1 << 4
89 };
90
91 /** Possble values for EapMethod param. */
92 enum EapMethod : uint32_t {
93 PEAP = 0,
94 TLS = 1,
95 TTLS = 2,
96 PWD = 3,
97 SIM = 4,
98 AKA = 5,
99 AKA_PRIME = 6,
100 WFA_UNAUTH_TLS = 7
101 };
102
103 /** Possble values for Phase2Method param. */
104 enum EapPhase2Method : uint32_t {
105 NONE = 0,
106 PAP = 1,
107 MSPAP = 2,
108 MSPAPV2 = 3,
Roshan Pius72b5eb02017-02-13 13:19:38 -0800109 GTC = 4,
110 SIM = 5,
111 AKA = 6,
112 AKA_PRIME = 7
Roshan Pius39f588f2016-10-31 14:51:27 -0700113 };
114
115 /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
116 struct NetworkResponseEapSimGsmAuthParams {
117 uint8_t[8] kc;
118 uint8_t[4] sres;
119 };
120
121 /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
122 struct NetworkResponseEapSimUmtsAuthParams {
123 vec<uint8_t> res;
124 uint8_t[16] ik;
125 uint8_t[16] ck;
126 };
127
128 /**
129 * Register for callbacks from this network.
130 *
131 * These callbacks are invoked for events that are specific to this network.
132 * Registration of multiple callback objects is supported. These objects must
133 * be automatically deleted when the corresponding client process is dead or
134 * if this network is removed.
135 *
136 * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
137 * interface object.
138 * @return status Status of the operation.
139 * Possible status codes:
140 * |SupplicantStatusCode.SUCCESS|,
141 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
142 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
143 */
144 registerCallback(ISupplicantStaNetworkCallback callback)
145 generates (SupplicantStatus status);
146
147 /**
148 * Setters for the various network params.
149 * These correspond to elements of |wpa_sssid| struct used internally by
Roshan Pius8c6a8772016-11-03 09:37:57 -0700150 * the supplicant to represent each network.
Roshan Pius39f588f2016-10-31 14:51:27 -0700151 */
152 /**
153 * Set SSID for this network.
154 *
155 * @param ssid value to set.
156 * Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
157 * @return status Status of the operation.
158 * Possible status codes:
159 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800160 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700161 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
162 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
163 */
164 setSsid(Ssid ssid) generates (SupplicantStatus status);
165
166 /**
167 * Set the network to only connect to an AP with provided BSSID.
168 *
169 * @param bssid value to set.
170 * @return status Status of the operation.
171 * Possible status codes:
172 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800173 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700174 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
175 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
176 */
177 setBssid(Bssid bssid) generates (SupplicantStatus status);
178
179 /**
180 * Set whether to send probe requests for this network (hidden).
181 *
182 * @param enable true to set, false otherwise.
183 * @return status Status of the operation.
184 * Possible status codes:
185 * |SupplicantStatusCode.SUCCESS|,
186 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
187 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
188 */
189 setScanSsid(bool enable) generates (SupplicantStatus status);
190
191 /**
192 * Set key management mask for the network.
193 *
194 * @param keyMgmtMask value to set.
195 * Combination of |KeyMgmtMask| values.
196 * @return status Status of the operation.
197 * Possible status codes:
198 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800199 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700200 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
201 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
202 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800203 setKeyMgmt(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700204
205 /**
206 * Set proto mask for the network.
207 *
208 * @param protoMask value to set.
209 * Combination of |ProtoMask| values.
210 * @return status Status of the operation.
211 * Possible status codes:
212 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800213 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700214 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
215 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
216 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800217 setProto(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700218
219 /**
220 * Set auth alg mask for the network.
221 *
222 * @param authAlgMask value to set.
223 * Combination of |ProtoMask| values.
224 * @return status Status of the operation.
225 * Possible status codes:
226 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800227 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700228 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
229 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
230 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800231 setAuthAlg(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700232
233 /**
234 * Set group cipher mask for the network.
235 *
236 * @param groupCipherMask value to set.
237 * Combination of |ProtoMask| values.
238 * @return status Status of the operation.
239 * Possible status codes:
240 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800241 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700242 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
243 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
244 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800245 setGroupCipher(bitfield<GroupCipherMask> groupCipherMask)
Roshan Pius39f588f2016-10-31 14:51:27 -0700246 generates (SupplicantStatus status);
247
248 /**
249 * Set pairwise cipher mask for the network.
250 *
251 * @param pairwiseCipherMask value to set.
252 * Combination of |ProtoMask| values.
253 * @return status Status of the operation.
254 * Possible status codes:
255 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800256 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700257 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
258 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
259 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800260 setPairwiseCipher(bitfield<PairwiseCipherMask> pairwiseCipherMask)
Roshan Pius39f588f2016-10-31 14:51:27 -0700261 generates (SupplicantStatus status);
262
263 /**
264 * Set passphrase for WPA_PSK network.
265 *
266 * @param psk value to set.
267 * Length of value must be between
268 * |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
269 * |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
270 * @return status Status of the operation.
271 * Possible status codes:
Roshan Pius756ad992016-11-07 10:29:48 -0800272 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700273 * |SupplicantStatusCode.SUCCESS|,
274 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
275 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
276 */
277 setPskPassphrase(string psk) generates (SupplicantStatus status);
278
279 /**
280 * Set WEP key for WEP network.
281 *
282 * @param keyIdx Index of wep key to set.
283 * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
284 * @param wepKey value to set.
285 * Length of each key must be either
286 * |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
287 * |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
288 * @return status Status of the operation.
289 * Possible status codes:
290 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800291 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700292 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
293 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
294 */
295 setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
296 generates (SupplicantStatus status);
297
298 /**
299 * Set default Tx key index for WEP network.
300 *
301 * @param KeyIdx value to set.
302 * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
303 * @return status Status of the operation.
304 * Possible status codes:
305 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800306 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700307 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
308 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
309 */
310 setWepTxKeyIdx(uint32_t keyIdx)
311 generates (SupplicantStatus status);
312
313 /**
314 * Set whether RequirePmf is enabled for this network.
315 *
316 * @param enable true to set, false otherwise.
317 * @return status Status of the operation.
318 * Possible status codes:
319 * |SupplicantStatusCode.SUCCESS|,
320 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
321 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
322 */
323 setRequirePmf(bool enable) generates (SupplicantStatus status);
324
325 /**
326 * Set EAP Method for this network.
327 *
328 * @param method value to be set.
329 * Must be one of |EapMethod| values.
330 * @return status Status of the operation.
331 * Possible status codes:
332 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800333 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700334 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
335 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
336 */
337 setEapMethod(EapMethod method)
338 generates (SupplicantStatus status);
339
340 /**
341 * Set EAP Phase2 Method for this network.
342 *
343 * @param method value to set.
344 * Must be one of |EapPhase2Method| values.
345 * @return status Status of the operation.
346 * Possible status codes:
347 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800348 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700349 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
350 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
351 */
352 setEapPhase2Method(EapPhase2Method method)
353 generates (SupplicantStatus status);
354
355 /**
356 * Set EAP Identity for this network.
357 *
358 * @param identity value to set.
359 * @return status Status of the operation.
360 * Possible status codes:
361 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800362 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700363 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
364 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
365 */
366 setEapIdentity(vec<uint8_t> identity)
367 generates (SupplicantStatus status);
368
369 /**
370 * Set EAP Anonymous Identity for this network.
371 *
372 * @param identity value to set.
373 * @return status Status of the operation.
374 * Possible status codes:
375 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800376 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700377 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
378 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
379 */
380 setEapAnonymousIdentity(vec<uint8_t> identity)
381 generates (SupplicantStatus status);
382
383 /**
384 * Set EAP Password for this network.
385 *
386 * @param password value to set.
387 * @return status Status of the operation.
388 * Possible status codes:
389 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800390 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700391 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
392 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
393 */
394 setEapPassword(vec<uint8_t> password)
395 generates (SupplicantStatus status);
396
397 /**
398 * Set EAP CA certificate file path for this network.
399 *
400 * @param path value to set.
401 * @return status Status of the operation.
402 * Possible status codes:
403 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800404 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700405 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
406 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
407 */
408 setEapCACert(string path) generates (SupplicantStatus status);
409
410 /**
411 * Set EAP CA certificate directory path for this network.
412 *
413 * @param path value to set.
414 * @return status Status of the operation.
415 * Possible status codes:
416 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800417 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700418 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
419 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
420 */
421 setEapCAPath(string path) generates (SupplicantStatus status);
422
423 /**
424 * Set EAP Client certificate file path for this network.
425 *
426 * @param path value to set.
427 * @return status Status of the operation.
428 * Possible status codes:
429 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800430 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700431 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
432 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
433 */
434 setEapClientCert(string path) generates (SupplicantStatus status);
435
436 /**
437 * Set EAP private key file path for this network.
438 *
439 * @param path value to set.
440 * @return status Status of the operation.
441 * Possible status codes:
442 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800443 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700444 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
445 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
446 */
447 setEapPrivateKey(string path) generates (SupplicantStatus status);
448
449 /**
450 * Set EAP subject match for this network.
451 *
452 * @param match value to set.
453 * @return status Status of the operation.
454 * Possible status codes:
455 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800456 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700457 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
458 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
459 */
460 setEapSubjectMatch(string match) generates (SupplicantStatus status);
461
462 /**
Roshan Pius118598a2016-12-13 13:39:27 -0800463 * Set EAP Alt subject match for this network.
Roshan Pius39f588f2016-10-31 14:51:27 -0700464 *
465 * @param match value to set.
466 * @return status Status of the operation.
467 * Possible status codes:
468 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800469 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700470 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
471 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
472 */
473 setEapAltSubjectMatch(string match)
474 generates (SupplicantStatus status);
475
476 /**
477 * Enable EAP Open SSL Engine for this network.
478 *
479 * @param enable true to set, false otherwise.
480 * @return status Status of the operation.
481 * Possible status codes:
482 * |SupplicantStatusCode.SUCCESS|,
483 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
484 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
485 */
486 setEapEngine(bool enable) generates (SupplicantStatus status);
487
488 /**
489 * Set EAP Open SSL Engine ID for this network.
490 *
491 * @param id value to set.
492 * @return status Status of the operation.
493 * Possible status codes:
494 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800495 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700496 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
497 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
498 */
499 setEapEngineID(string id) generates (SupplicantStatus status);
500
501 /**
502 * Set EAP Domain suffix match for this network.
503 *
504 * @param match value to set.
505 * @return status Status of the operation.
506 * Possible status codes:
507 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800508 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700509 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
510 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
511 */
512 setEapDomainSuffixMatch(string match)
513 generates (SupplicantStatus status);
Roshan Piusdbd09c62017-01-19 16:03:36 -0800514
Roshan Pius2d50db92017-01-13 15:53:07 -0800515 /**
Roshan Piusdbd09c62017-01-19 16:03:36 -0800516 * This field can be used to enable proactive key caching which is also
517 * known as opportunistic PMKSA caching for WPA2. This is disabled (0)
518 * by default unless default value is changed with the global okc=1
519 * parameter.
520 *
521 * Proactive key caching is used to make supplicant assume that the APs
522 * are using the same PMK and generate PMKSA cache entries without
523 * doing RSN pre-authentication. This requires support from the AP side
524 * and is normally used with wireless switches that co-locate the
525 * authenticator.
526 *
527 * @param enable true to set, false otherwise.
528 * @return status Status of the operation.
529 * Possible status codes:
530 * |SupplicantStatusCode.SUCCESS|,
531 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
532 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
533 */
534 setProactiveKeyCaching(bool enable) generates (SupplicantStatus status);
535
536 /**
537 * Set ID string for this network.
Roshan Pius2d50db92017-01-13 15:53:07 -0800538 * Network identifier string for external scripts.
539 *
540 * @return idStr ID string value to set.
541 * @return status Status of the operation.
542 * Possible status codes:
543 * |SupplicantStatusCode.SUCCESS|,
544 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
545 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
546 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
547 */
548 setIdStr(string idStr) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700549
550 /**
Roshan Piusdbd09c62017-01-19 16:03:36 -0800551 * Set PPS MO ID for this network.
552 * (Hotspot 2.0 PerProviderSubscription/UpdateIdentifier)
553 *
554 * @return id ID value to set.
555 * @return status Status of the operation.
556 * Possible status codes:
557 * |SupplicantStatusCode.SUCCESS|,
558 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
559 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
560 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
561 */
562 setUpdateIdentifier(uint32_t id) generates (SupplicantStatus status);
563
564 /**
Roshan Pius39f588f2016-10-31 14:51:27 -0700565 * Getters for the various network params.
566 */
567 /**
568 * Get SSID for this network.
569 *
570 * @return status Status of the operation.
571 * Possible status codes:
572 * |SupplicantStatusCode.SUCCESS|,
573 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
574 * @return ssid value set.
575 */
576 getSsid() generates (SupplicantStatus status, Ssid ssid);
577
578 /**
579 * Get the BSSID set for this network.
580 *
581 * @return status Status of the operation.
582 * Possible status codes:
583 * |SupplicantStatusCode.SUCCESS|,
584 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
585 * @return bssid value set.
586 */
587 getBssid() generates (SupplicantStatus status, Bssid bssid);
588
589 /**
590 * Get whether Probe Requests are being sent for this network (hidden).
591 *
592 * @return status Status of the operation.
593 * Possible status codes:
594 * |SupplicantStatusCode.SUCCESS|,
595 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
596 * @return enabled true if set, false otherwise.
597 */
598 getScanSsid() generates (SupplicantStatus status, bool enabled);
599
600 /**
601 * Get the key mgmt mask set for the network.
602 *
603 * @return status Status of the operation.
604 * Possible status codes:
605 * |SupplicantStatusCode.SUCCESS|,
606 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
607 * @return keyMgmtMask Combination of |KeyMgmtMask| values.
608 */
609 getKeyMgmt()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800610 generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700611
612 /**
613 * Get the proto mask set for the network.
614 *
615 * @return status Status of the operation.
616 * Possible status codes:
617 * |SupplicantStatusCode.SUCCESS|,
618 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
619 * @return protoMask Combination of |ProtoMask| values.
620 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800621 getProto() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700622
623 /**
624 * Get the auth alg mask set for the network.
625 *
626 * @return status Status of the operation.
627 * Possible status codes:
628 * |SupplicantStatusCode.SUCCESS|,
629 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
630 * @return authAlgMask Combination of |AuthAlgMask| values.
631 */
632 getAuthAlg()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800633 generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700634
635 /**
636 * Get the group cipher mask set for the network.
637 *
638 * @return status Status of the operation.
639 * Possible status codes:
640 * |SupplicantStatusCode.SUCCESS|,
641 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
642 * @return groupCipherMask Combination of |GroupCipherMask| values.
643 */
644 getGroupCipher()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800645 generates (SupplicantStatus status,
646 bitfield<GroupCipherMask> groupCipherMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700647
648 /**
649 * Get the pairwise cipher mask set for the network.
650 *
651 * @return status Status of the operation.
652 * Possible status codes:
653 * |SupplicantStatusCode.SUCCESS|,
654 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
655 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
656 */
657 getPairwiseCipher()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800658 generates (SupplicantStatus status,
659 bitfield<PairwiseCipherMask> pairwiseCipherMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700660
661 /**
662 * Get passphrase for WPA_PSK network.
663 *
664 * @return status Status of the operation.
665 * Possible status codes:
666 * |SupplicantStatusCode.SUCCESS|,
667 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
668 * @return psk value set.
669 */
670 getPskPassphrase() generates (SupplicantStatus status, string psk);
671
672 /**
673 * Get WEP key for WEP network.
674 *
675 * @param keyIdx Index of wep key to be fetched.
676 * Max of |WEP_KEYS_MAX_NUM|.
677 * @return status Status of the operation.
678 * Possible status codes:
679 * |SupplicantStatusCode.SUCCESS|,
680 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
681 * @return wepKey value set.
682 */
683 getWepKey(uint32_t keyIdx)
684 generates (SupplicantStatus status, vec<uint8_t> wepKey);
685
686 /**
687 * Get default Tx key index for WEP network.
688 *
689 * @return status Status of the operation.
690 * Possible status codes:
691 * |SupplicantStatusCode.SUCCESS|,
692 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
693 * @return keyIdx value set.
694 */
695 getWepTxKeyIdx()
696 generates (SupplicantStatus status, uint32_t keyIdx);
697
698 /**
699 * Get whether RequirePmf is enabled for this network.
700 *
701 * @return status Status of the operation.
702 * Possible status codes:
703 * |SupplicantStatusCode.SUCCESS|,
704 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
705 * @return enabled true if set, false otherwise.
706 */
707 getRequirePmf() generates (SupplicantStatus status, bool enabled);
708
709 /**
Roshan Pius118598a2016-12-13 13:39:27 -0800710 * Get EAP Method set for this network.
711 *
712 * @return status Status of the operation.
713 * Possible status codes:
714 * |SupplicantStatusCode.SUCCESS|,
715 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
716 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
717 * @return method value set.
718 * Must be one of |EapMethod| values.
719 */
720 getEapMethod()
721 generates (SupplicantStatus status, EapMethod method);
722
723 /**
724 * Get EAP Phase2 Method set for this network.
725 *
726 * @return status Status of the operation.
727 * Possible status codes:
728 * |SupplicantStatusCode.SUCCESS|,
729 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
730 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
731 * @return method value set.
732 * Must be one of |EapPhase2Method| values.
733 */
734 getEapPhase2Method()
735 generates (SupplicantStatus status, EapPhase2Method method);
736
737 /**
738 * Get EAP Identity set for this network.
739 *
740 * @return status Status of the operation.
741 * Possible status codes:
742 * |SupplicantStatusCode.SUCCESS|,
743 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
744 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
745 * @return identity value set.
746 */
747 getEapIdentity()
748 generates (SupplicantStatus status, vec<uint8_t> identity);
749
750 /**
751 * Get EAP Anonymous Identity set for this network.
752 *
753 * @return status Status of the operation.
754 * Possible status codes:
755 * |SupplicantStatusCode.SUCCESS|,
756 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
757 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
758 * @return identity value set.
759 */
760 getEapAnonymousIdentity()
761 generates (SupplicantStatus status, vec<uint8_t> identity);
762
763 /**
764 * Get EAP Password set for this network.
765 *
766 * @return status Status of the operation.
767 * Possible status codes:
768 * |SupplicantStatusCode.SUCCESS|,
769 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
770 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
771 * @return password value set.
772 */
773 getEapPassword()
774 generates (SupplicantStatus status, vec<uint8_t> password);
775
776 /**
777 * Get EAP CA certificate file path set for this network.
778 *
779 * @return status Status of the operation.
780 * Possible status codes:
781 * |SupplicantStatusCode.SUCCESS|,
782 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
783 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
784 * @return path value set.
785 */
786 getEapCACert() generates (SupplicantStatus status, string path);
787
788 /**
789 * Get EAP CA certificate directory path set for this network.
790 *
791 * @return status Status of the operation.
792 * Possible status codes:
793 * |SupplicantStatusCode.SUCCESS|,
794 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
795 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
796 * @return path value set.
797 */
798 getEapCAPath() generates (SupplicantStatus status, string path);
799
800 /**
801 * Get EAP Client certificate file path set for this network.
802 *
803 * @return status Status of the operation.
804 * Possible status codes:
805 * |SupplicantStatusCode.SUCCESS|,
806 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
807 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
808 * @return path value set.
809 */
810 getEapClientCert() generates (SupplicantStatus status, string path);
811
812 /**
813 * Get EAP private key file path set for this network.
814 *
815 * @return status Status of the operation.
816 * Possible status codes:
817 * |SupplicantStatusCode.SUCCESS|,
818 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
819 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
820 * @return path value set.
821 */
822 getEapPrivateKey() generates (SupplicantStatus status, string path);
823
824 /**
825 * Get EAP subject match set for this network.
826 *
827 * @return status Status of the operation.
828 * Possible status codes:
829 * |SupplicantStatusCode.SUCCESS|,
830 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
831 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
832 * @return match value set.
833 */
834 getEapSubjectMatch() generates (SupplicantStatus status, string match);
835
836 /**
837 * Get EAP Alt subject match set for this network.
838 *
839 * @return status Status of the operation.
840 * Possible status codes:
841 * |SupplicantStatusCode.SUCCESS|,
842 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
843 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
844 * @return match value set.
845 */
846 getEapAltSubjectMatch()
847 generates (SupplicantStatus status, string match);
848
849 /**
850 * Get if EAP Open SSL Engine is enabled for this network.
851 *
852 * @return status Status of the operation.
853 * Possible status codes:
854 * |SupplicantStatusCode.SUCCESS|,
855 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
856 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
857 * @return enabled true if set, false otherwise.
858 */
859 getEapEngine() generates (SupplicantStatus status, bool enabled);
860
861 /**
862 * Get EAP Open SSL Engine ID set for this network.
863 *
864 * @return status Status of the operation.
865 * Possible status codes:
866 * |SupplicantStatusCode.SUCCESS|,
867 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
868 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
869 * @return id value set.
870 */
871 getEapEngineID() generates (SupplicantStatus status, string id);
872
873 /**
874 * Get EAP Domain suffix match set for this network.
875 *
876 * @return status Status of the operation.
877 * Possible status codes:
878 * |SupplicantStatusCode.SUCCESS|,
879 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
880 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
881 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
882 * @return match value set.
883 */
884 getEapDomainSuffixMatch()
885 generates (SupplicantStatus status, string match);
886
887 /**
Roshan Pius2d50db92017-01-13 15:53:07 -0800888 * Get ID string set for this network.
889 * Network identifier string for external scripts.
890 *
891 * @return status Status of the operation.
892 * Possible status codes:
893 * |SupplicantStatusCode.SUCCESS|,
894 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
895 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
896 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
897 * @return idStr ID string set.
898 */
899 getIdStr() generates (SupplicantStatus status, string idStr);
900
901 /**
Roshan Pius72b5eb02017-02-13 13:19:38 -0800902 * Retrieves a WPS-NFC configuration token for this network.
903 *
904 * @return status Status of the operation.
905 * Possible status codes:
906 * |SupplicantStatusCode.SUCCESS|,
907 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
908 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
909 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
910 * @return token Bytes representing WPS-NFC configuration token.
911 * This is a dump of all the WPS atrributes of the AP configuration
912 * as specified in the Wi-Fi Protected Setup Specification.
913 */
914 getWpsNfcConfigurationToken()
915 generates (SupplicantStatus status, vec<uint8_t> token);
916
917 /**
Roshan Pius39f588f2016-10-31 14:51:27 -0700918 * Enable the network for connection purposes.
919 *
920 * This must trigger a connection to the network if:
921 * a) |noConnect| is false, and
922 * b) This is the only network configured, and
923 * c) Is visible in the current scan results.
924 *
925 * @param noConnect Only enable the network, dont trigger a connect.
926 * @return status Status of the operation.
927 * Possible status codes:
928 * |SupplicantStatusCode.SUCCESS|,
929 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
930 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
931 */
932 enable(bool noConnect) generates (SupplicantStatus status);
933
934 /**
935 * Disable the network for connection purposes.
936 *
937 * This must trigger a disconnection from the network, if currently
938 * connected to this one.
939 *
940 * @return status Status of the operation.
941 * Possible status codes:
942 * |SupplicantStatusCode.SUCCESS|,
943 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
944 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
945 */
946 disable() generates (SupplicantStatus status);
947
948 /**
949 * Initiate connection to this network.
950 *
951 * @return status Status of the operation.
952 * Possible status codes:
953 * |SupplicantStatusCode.SUCCESS|,
954 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
955 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
956 */
957 select() generates (SupplicantStatus status);
958
959 /**
960 * Used to send a response to the
961 * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
962 *
963 * @param params Params to be used for EAP GSM authentication.
964 * @return status Status of the operation.
965 * Possible status codes:
966 * |SupplicantStatusCode.SUCCESS|,
967 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
968 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
969 */
Roshan Piusdbd09c62017-01-19 16:03:36 -0800970 sendNetworkEapSimGsmAuthResponse(vec<NetworkResponseEapSimGsmAuthParams> params)
Roshan Pius39f588f2016-10-31 14:51:27 -0700971 generates (SupplicantStatus status);
972
973 /**
974 * Used to send a response to the
Roshan Piusdbd09c62017-01-19 16:03:36 -0800975 * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
976 *
977 * @return status Status of the operation.
978 * Possible status codes:
979 * |SupplicantStatusCode.SUCCESS|,
980 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
981 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
982 */
983 sendNetworkEapSimGsmAuthFailure() generates (SupplicantStatus status);
984
985 /**
986 * Used to send a response to the
Roshan Pius39f588f2016-10-31 14:51:27 -0700987 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
988 *
989 * @param params Params to be used for EAP UMTS authentication.
990 * @return status Status of the operation.
991 * Possible status codes:
992 * |SupplicantStatusCode.SUCCESS|,
993 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
994 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
995 */
996 sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
997 generates (SupplicantStatus status);
998
999 /**
1000 * Used to send a response to the
Roshan Piusdbd09c62017-01-19 16:03:36 -08001001 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
1002 *
1003 * @param auts Params to be used for EAP UMTS authentication.
1004 * @return status Status of the operation.
1005 * Possible status codes:
1006 * |SupplicantStatusCode.SUCCESS|,
1007 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
1008 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
1009 */
1010 sendNetworkEapSimUmtsAutsResponse(uint8_t[14] auts)
1011 generates (SupplicantStatus status);
1012
1013 /**
1014 * Used to send a response to the
1015 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
1016 *
1017 * @return status Status of the operation.
1018 * Possible status codes:
1019 * |SupplicantStatusCode.SUCCESS|,
1020 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
1021 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
1022 */
1023 sendNetworkEapSimUmtsAuthFailure() generates (SupplicantStatus status);
1024
1025 /**
1026 * Used to send a response to the
Roshan Pius39f588f2016-10-31 14:51:27 -07001027 * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
1028 *
1029 * @param identity Identity to be used for the network.
1030 * @return status Status of the operation.
1031 * Possible status codes:
1032 * |SupplicantStatusCode.SUCCESS|,
1033 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
1034 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
1035 */
1036 sendNetworkEapIdentityResponse(vec<uint8_t> identity)
1037 generates (SupplicantStatus status);
1038};