blob: deaad5d865d15e8e59802a80eeacbd3c3c621e45 [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,
109 GTC = 4
110 };
111
112 /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
113 struct NetworkResponseEapSimGsmAuthParams {
114 uint8_t[8] kc;
115 uint8_t[4] sres;
116 };
117
118 /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
119 struct NetworkResponseEapSimUmtsAuthParams {
120 vec<uint8_t> res;
121 uint8_t[16] ik;
122 uint8_t[16] ck;
123 };
124
125 /**
126 * Register for callbacks from this network.
127 *
128 * These callbacks are invoked for events that are specific to this network.
129 * Registration of multiple callback objects is supported. These objects must
130 * be automatically deleted when the corresponding client process is dead or
131 * if this network is removed.
132 *
133 * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
134 * interface object.
135 * @return status Status of the operation.
136 * Possible status codes:
137 * |SupplicantStatusCode.SUCCESS|,
138 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
139 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
140 */
141 registerCallback(ISupplicantStaNetworkCallback callback)
142 generates (SupplicantStatus status);
143
144 /**
145 * Setters for the various network params.
146 * These correspond to elements of |wpa_sssid| struct used internally by
Roshan Pius8c6a8772016-11-03 09:37:57 -0700147 * the supplicant to represent each network.
Roshan Pius39f588f2016-10-31 14:51:27 -0700148 */
149 /**
150 * Set SSID for this network.
151 *
152 * @param ssid value to set.
153 * Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
154 * @return status Status of the operation.
155 * Possible status codes:
156 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800157 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700158 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
159 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
160 */
161 setSsid(Ssid ssid) generates (SupplicantStatus status);
162
163 /**
164 * Set the network to only connect to an AP with provided BSSID.
165 *
166 * @param bssid value to set.
167 * @return status Status of the operation.
168 * Possible status codes:
169 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800170 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700171 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
172 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
173 */
174 setBssid(Bssid bssid) generates (SupplicantStatus status);
175
176 /**
177 * Set whether to send probe requests for this network (hidden).
178 *
179 * @param enable true to set, false otherwise.
180 * @return status Status of the operation.
181 * Possible status codes:
182 * |SupplicantStatusCode.SUCCESS|,
183 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
184 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
185 */
186 setScanSsid(bool enable) generates (SupplicantStatus status);
187
188 /**
189 * Set key management mask for the network.
190 *
191 * @param keyMgmtMask value to set.
192 * Combination of |KeyMgmtMask| values.
193 * @return status Status of the operation.
194 * Possible status codes:
195 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800196 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700197 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
198 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
199 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800200 setKeyMgmt(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700201
202 /**
203 * Set proto mask for the network.
204 *
205 * @param protoMask value to set.
206 * Combination of |ProtoMask| values.
207 * @return status Status of the operation.
208 * Possible status codes:
209 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800210 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700211 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
212 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
213 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800214 setProto(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700215
216 /**
217 * Set auth alg mask for the network.
218 *
219 * @param authAlgMask value to set.
220 * Combination of |ProtoMask| values.
221 * @return status Status of the operation.
222 * Possible status codes:
223 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800224 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700225 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
226 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
227 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800228 setAuthAlg(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700229
230 /**
231 * Set group cipher mask for the network.
232 *
233 * @param groupCipherMask value to set.
234 * Combination of |ProtoMask| values.
235 * @return status Status of the operation.
236 * Possible status codes:
237 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800238 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700239 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
240 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
241 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800242 setGroupCipher(bitfield<GroupCipherMask> groupCipherMask)
Roshan Pius39f588f2016-10-31 14:51:27 -0700243 generates (SupplicantStatus status);
244
245 /**
246 * Set pairwise cipher mask for the network.
247 *
248 * @param pairwiseCipherMask value to set.
249 * Combination of |ProtoMask| values.
250 * @return status Status of the operation.
251 * Possible status codes:
252 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800253 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700254 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
255 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
256 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800257 setPairwiseCipher(bitfield<PairwiseCipherMask> pairwiseCipherMask)
Roshan Pius39f588f2016-10-31 14:51:27 -0700258 generates (SupplicantStatus status);
259
260 /**
261 * Set passphrase for WPA_PSK network.
262 *
263 * @param psk value to set.
264 * Length of value must be between
265 * |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
266 * |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
267 * @return status Status of the operation.
268 * Possible status codes:
Roshan Pius756ad992016-11-07 10:29:48 -0800269 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700270 * |SupplicantStatusCode.SUCCESS|,
271 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
272 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
273 */
274 setPskPassphrase(string psk) generates (SupplicantStatus status);
275
276 /**
277 * Set WEP key for WEP network.
278 *
279 * @param keyIdx Index of wep key to set.
280 * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
281 * @param wepKey value to set.
282 * Length of each key must be either
283 * |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
284 * |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
285 * @return status Status of the operation.
286 * Possible status codes:
287 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800288 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700289 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
290 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
291 */
292 setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
293 generates (SupplicantStatus status);
294
295 /**
296 * Set default Tx key index for WEP network.
297 *
298 * @param KeyIdx value to set.
299 * Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
300 * @return status Status of the operation.
301 * Possible status codes:
302 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800303 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700304 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
305 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
306 */
307 setWepTxKeyIdx(uint32_t keyIdx)
308 generates (SupplicantStatus status);
309
310 /**
311 * Set whether RequirePmf is enabled for this network.
312 *
313 * @param enable true to set, false otherwise.
314 * @return status Status of the operation.
315 * Possible status codes:
316 * |SupplicantStatusCode.SUCCESS|,
317 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
318 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
319 */
320 setRequirePmf(bool enable) generates (SupplicantStatus status);
321
322 /**
323 * Set EAP Method for this network.
324 *
325 * @param method value to be set.
326 * Must be one of |EapMethod| values.
327 * @return status Status of the operation.
328 * Possible status codes:
329 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800330 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700331 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
332 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
333 */
334 setEapMethod(EapMethod method)
335 generates (SupplicantStatus status);
336
337 /**
338 * Set EAP Phase2 Method for this network.
339 *
340 * @param method value to set.
341 * Must be one of |EapPhase2Method| values.
342 * @return status Status of the operation.
343 * Possible status codes:
344 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800345 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700346 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
347 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
348 */
349 setEapPhase2Method(EapPhase2Method method)
350 generates (SupplicantStatus status);
351
352 /**
353 * Set EAP Identity for this network.
354 *
355 * @param identity value to set.
356 * @return status Status of the operation.
357 * Possible status codes:
358 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800359 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700360 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
361 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
362 */
363 setEapIdentity(vec<uint8_t> identity)
364 generates (SupplicantStatus status);
365
366 /**
367 * Set EAP Anonymous Identity for this network.
368 *
369 * @param identity value to set.
370 * @return status Status of the operation.
371 * Possible status codes:
372 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800373 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700374 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
375 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
376 */
377 setEapAnonymousIdentity(vec<uint8_t> identity)
378 generates (SupplicantStatus status);
379
380 /**
381 * Set EAP Password for this network.
382 *
383 * @param password value to set.
384 * @return status Status of the operation.
385 * Possible status codes:
386 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800387 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700388 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
389 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
390 */
391 setEapPassword(vec<uint8_t> password)
392 generates (SupplicantStatus status);
393
394 /**
395 * Set EAP CA certificate file path for this network.
396 *
397 * @param path value to set.
398 * @return status Status of the operation.
399 * Possible status codes:
400 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800401 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700402 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
403 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
404 */
405 setEapCACert(string path) generates (SupplicantStatus status);
406
407 /**
408 * Set EAP CA certificate directory path for this network.
409 *
410 * @param path value to set.
411 * @return status Status of the operation.
412 * Possible status codes:
413 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800414 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700415 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
416 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
417 */
418 setEapCAPath(string path) generates (SupplicantStatus status);
419
420 /**
421 * Set EAP Client certificate file path for this network.
422 *
423 * @param path value to set.
424 * @return status Status of the operation.
425 * Possible status codes:
426 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800427 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700428 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
429 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
430 */
431 setEapClientCert(string path) generates (SupplicantStatus status);
432
433 /**
434 * Set EAP private key file path for this network.
435 *
436 * @param path value to set.
437 * @return status Status of the operation.
438 * Possible status codes:
439 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800440 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700441 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
442 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
443 */
444 setEapPrivateKey(string path) generates (SupplicantStatus status);
445
446 /**
447 * Set EAP subject match for this network.
448 *
449 * @param match value to set.
450 * @return status Status of the operation.
451 * Possible status codes:
452 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800453 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700454 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
455 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
456 */
457 setEapSubjectMatch(string match) generates (SupplicantStatus status);
458
459 /**
Roshan Pius118598a2016-12-13 13:39:27 -0800460 * Set EAP Alt subject match for this network.
Roshan Pius39f588f2016-10-31 14:51:27 -0700461 *
462 * @param match value to set.
463 * @return status Status of the operation.
464 * Possible status codes:
465 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800466 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700467 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
468 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
469 */
470 setEapAltSubjectMatch(string match)
471 generates (SupplicantStatus status);
472
473 /**
474 * Enable EAP Open SSL Engine for this network.
475 *
476 * @param enable true to set, false otherwise.
477 * @return status Status of the operation.
478 * Possible status codes:
479 * |SupplicantStatusCode.SUCCESS|,
480 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
481 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
482 */
483 setEapEngine(bool enable) generates (SupplicantStatus status);
484
485 /**
486 * Set EAP Open SSL Engine ID for this network.
487 *
488 * @param id value to set.
489 * @return status Status of the operation.
490 * Possible status codes:
491 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800492 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700493 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
494 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
495 */
496 setEapEngineID(string id) generates (SupplicantStatus status);
497
498 /**
499 * Set EAP Domain suffix match for this network.
500 *
501 * @param match value to set.
502 * @return status Status of the operation.
503 * Possible status codes:
504 * |SupplicantStatusCode.SUCCESS|,
Roshan Pius756ad992016-11-07 10:29:48 -0800505 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
Roshan Pius39f588f2016-10-31 14:51:27 -0700506 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
507 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
508 */
509 setEapDomainSuffixMatch(string match)
510 generates (SupplicantStatus status);
Roshan Piusdbd09c62017-01-19 16:03:36 -0800511
Roshan Pius2d50db92017-01-13 15:53:07 -0800512 /**
Roshan Piusdbd09c62017-01-19 16:03:36 -0800513 * This field can be used to enable proactive key caching which is also
514 * known as opportunistic PMKSA caching for WPA2. This is disabled (0)
515 * by default unless default value is changed with the global okc=1
516 * parameter.
517 *
518 * Proactive key caching is used to make supplicant assume that the APs
519 * are using the same PMK and generate PMKSA cache entries without
520 * doing RSN pre-authentication. This requires support from the AP side
521 * and is normally used with wireless switches that co-locate the
522 * authenticator.
523 *
524 * @param enable true to set, false otherwise.
525 * @return status Status of the operation.
526 * Possible status codes:
527 * |SupplicantStatusCode.SUCCESS|,
528 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
529 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
530 */
531 setProactiveKeyCaching(bool enable) generates (SupplicantStatus status);
532
533 /**
534 * Set ID string for this network.
Roshan Pius2d50db92017-01-13 15:53:07 -0800535 * Network identifier string for external scripts.
536 *
537 * @return idStr ID string value to set.
538 * @return status Status of the operation.
539 * Possible status codes:
540 * |SupplicantStatusCode.SUCCESS|,
541 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
542 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
543 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
544 */
545 setIdStr(string idStr) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700546
547 /**
Roshan Piusdbd09c62017-01-19 16:03:36 -0800548 * Set PPS MO ID for this network.
549 * (Hotspot 2.0 PerProviderSubscription/UpdateIdentifier)
550 *
551 * @return id ID value to set.
552 * @return status Status of the operation.
553 * Possible status codes:
554 * |SupplicantStatusCode.SUCCESS|,
555 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
556 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
557 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
558 */
559 setUpdateIdentifier(uint32_t id) generates (SupplicantStatus status);
560
561 /**
Roshan Pius39f588f2016-10-31 14:51:27 -0700562 * Getters for the various network params.
563 */
564 /**
565 * Get SSID for this network.
566 *
567 * @return status Status of the operation.
568 * Possible status codes:
569 * |SupplicantStatusCode.SUCCESS|,
570 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
571 * @return ssid value set.
572 */
573 getSsid() generates (SupplicantStatus status, Ssid ssid);
574
575 /**
576 * Get the BSSID set for this network.
577 *
578 * @return status Status of the operation.
579 * Possible status codes:
580 * |SupplicantStatusCode.SUCCESS|,
581 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
582 * @return bssid value set.
583 */
584 getBssid() generates (SupplicantStatus status, Bssid bssid);
585
586 /**
587 * Get whether Probe Requests are being sent for this network (hidden).
588 *
589 * @return status Status of the operation.
590 * Possible status codes:
591 * |SupplicantStatusCode.SUCCESS|,
592 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
593 * @return enabled true if set, false otherwise.
594 */
595 getScanSsid() generates (SupplicantStatus status, bool enabled);
596
597 /**
598 * Get the key mgmt mask set for the network.
599 *
600 * @return status Status of the operation.
601 * Possible status codes:
602 * |SupplicantStatusCode.SUCCESS|,
603 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
604 * @return keyMgmtMask Combination of |KeyMgmtMask| values.
605 */
606 getKeyMgmt()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800607 generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700608
609 /**
610 * Get the proto mask set for the network.
611 *
612 * @return status Status of the operation.
613 * Possible status codes:
614 * |SupplicantStatusCode.SUCCESS|,
615 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
616 * @return protoMask Combination of |ProtoMask| values.
617 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800618 getProto() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700619
620 /**
621 * Get the auth alg mask set for the network.
622 *
623 * @return status Status of the operation.
624 * Possible status codes:
625 * |SupplicantStatusCode.SUCCESS|,
626 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
627 * @return authAlgMask Combination of |AuthAlgMask| values.
628 */
629 getAuthAlg()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800630 generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700631
632 /**
633 * Get the group cipher mask set for the network.
634 *
635 * @return status Status of the operation.
636 * Possible status codes:
637 * |SupplicantStatusCode.SUCCESS|,
638 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
639 * @return groupCipherMask Combination of |GroupCipherMask| values.
640 */
641 getGroupCipher()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800642 generates (SupplicantStatus status,
643 bitfield<GroupCipherMask> groupCipherMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700644
645 /**
646 * Get the pairwise cipher mask set for the network.
647 *
648 * @return status Status of the operation.
649 * Possible status codes:
650 * |SupplicantStatusCode.SUCCESS|,
651 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
652 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
653 */
654 getPairwiseCipher()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800655 generates (SupplicantStatus status,
656 bitfield<PairwiseCipherMask> pairwiseCipherMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700657
658 /**
659 * Get passphrase for WPA_PSK network.
660 *
661 * @return status Status of the operation.
662 * Possible status codes:
663 * |SupplicantStatusCode.SUCCESS|,
664 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
665 * @return psk value set.
666 */
667 getPskPassphrase() generates (SupplicantStatus status, string psk);
668
669 /**
670 * Get WEP key for WEP network.
671 *
672 * @param keyIdx Index of wep key to be fetched.
673 * Max of |WEP_KEYS_MAX_NUM|.
674 * @return status Status of the operation.
675 * Possible status codes:
676 * |SupplicantStatusCode.SUCCESS|,
677 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
678 * @return wepKey value set.
679 */
680 getWepKey(uint32_t keyIdx)
681 generates (SupplicantStatus status, vec<uint8_t> wepKey);
682
683 /**
684 * Get default Tx key index for WEP network.
685 *
686 * @return status Status of the operation.
687 * Possible status codes:
688 * |SupplicantStatusCode.SUCCESS|,
689 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
690 * @return keyIdx value set.
691 */
692 getWepTxKeyIdx()
693 generates (SupplicantStatus status, uint32_t keyIdx);
694
695 /**
696 * Get whether RequirePmf is enabled for this network.
697 *
698 * @return status Status of the operation.
699 * Possible status codes:
700 * |SupplicantStatusCode.SUCCESS|,
701 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
702 * @return enabled true if set, false otherwise.
703 */
704 getRequirePmf() generates (SupplicantStatus status, bool enabled);
705
706 /**
Roshan Pius118598a2016-12-13 13:39:27 -0800707 * Get EAP Method set for this network.
708 *
709 * @return status Status of the operation.
710 * Possible status codes:
711 * |SupplicantStatusCode.SUCCESS|,
712 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
713 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
714 * @return method value set.
715 * Must be one of |EapMethod| values.
716 */
717 getEapMethod()
718 generates (SupplicantStatus status, EapMethod method);
719
720 /**
721 * Get EAP Phase2 Method set for this network.
722 *
723 * @return status Status of the operation.
724 * Possible status codes:
725 * |SupplicantStatusCode.SUCCESS|,
726 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
727 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
728 * @return method value set.
729 * Must be one of |EapPhase2Method| values.
730 */
731 getEapPhase2Method()
732 generates (SupplicantStatus status, EapPhase2Method method);
733
734 /**
735 * Get EAP Identity set for this network.
736 *
737 * @return status Status of the operation.
738 * Possible status codes:
739 * |SupplicantStatusCode.SUCCESS|,
740 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
741 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
742 * @return identity value set.
743 */
744 getEapIdentity()
745 generates (SupplicantStatus status, vec<uint8_t> identity);
746
747 /**
748 * Get EAP Anonymous Identity set for this network.
749 *
750 * @return status Status of the operation.
751 * Possible status codes:
752 * |SupplicantStatusCode.SUCCESS|,
753 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
754 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
755 * @return identity value set.
756 */
757 getEapAnonymousIdentity()
758 generates (SupplicantStatus status, vec<uint8_t> identity);
759
760 /**
761 * Get EAP Password set for this network.
762 *
763 * @return status Status of the operation.
764 * Possible status codes:
765 * |SupplicantStatusCode.SUCCESS|,
766 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
767 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
768 * @return password value set.
769 */
770 getEapPassword()
771 generates (SupplicantStatus status, vec<uint8_t> password);
772
773 /**
774 * Get EAP CA certificate file path set for this network.
775 *
776 * @return status Status of the operation.
777 * Possible status codes:
778 * |SupplicantStatusCode.SUCCESS|,
779 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
780 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
781 * @return path value set.
782 */
783 getEapCACert() generates (SupplicantStatus status, string path);
784
785 /**
786 * Get EAP CA certificate directory path set for this network.
787 *
788 * @return status Status of the operation.
789 * Possible status codes:
790 * |SupplicantStatusCode.SUCCESS|,
791 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
792 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
793 * @return path value set.
794 */
795 getEapCAPath() generates (SupplicantStatus status, string path);
796
797 /**
798 * Get EAP Client certificate file path set for this network.
799 *
800 * @return status Status of the operation.
801 * Possible status codes:
802 * |SupplicantStatusCode.SUCCESS|,
803 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
804 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
805 * @return path value set.
806 */
807 getEapClientCert() generates (SupplicantStatus status, string path);
808
809 /**
810 * Get EAP private key file path set for this network.
811 *
812 * @return status Status of the operation.
813 * Possible status codes:
814 * |SupplicantStatusCode.SUCCESS|,
815 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
816 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
817 * @return path value set.
818 */
819 getEapPrivateKey() generates (SupplicantStatus status, string path);
820
821 /**
822 * Get EAP subject match set for this network.
823 *
824 * @return status Status of the operation.
825 * Possible status codes:
826 * |SupplicantStatusCode.SUCCESS|,
827 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
828 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
829 * @return match value set.
830 */
831 getEapSubjectMatch() generates (SupplicantStatus status, string match);
832
833 /**
834 * Get EAP Alt subject match set for this network.
835 *
836 * @return status Status of the operation.
837 * Possible status codes:
838 * |SupplicantStatusCode.SUCCESS|,
839 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
840 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
841 * @return match value set.
842 */
843 getEapAltSubjectMatch()
844 generates (SupplicantStatus status, string match);
845
846 /**
847 * Get if EAP Open SSL Engine is enabled for this network.
848 *
849 * @return status Status of the operation.
850 * Possible status codes:
851 * |SupplicantStatusCode.SUCCESS|,
852 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
853 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
854 * @return enabled true if set, false otherwise.
855 */
856 getEapEngine() generates (SupplicantStatus status, bool enabled);
857
858 /**
859 * Get EAP Open SSL Engine ID set for this network.
860 *
861 * @return status Status of the operation.
862 * Possible status codes:
863 * |SupplicantStatusCode.SUCCESS|,
864 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
865 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
866 * @return id value set.
867 */
868 getEapEngineID() generates (SupplicantStatus status, string id);
869
870 /**
871 * Get EAP Domain suffix match set for this network.
872 *
873 * @return status Status of the operation.
874 * Possible status codes:
875 * |SupplicantStatusCode.SUCCESS|,
876 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
877 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
878 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
879 * @return match value set.
880 */
881 getEapDomainSuffixMatch()
882 generates (SupplicantStatus status, string match);
883
884 /**
Roshan Pius2d50db92017-01-13 15:53:07 -0800885 * Get ID string set for this network.
886 * Network identifier string for external scripts.
887 *
888 * @return status Status of the operation.
889 * Possible status codes:
890 * |SupplicantStatusCode.SUCCESS|,
891 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
892 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
893 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
894 * @return idStr ID string set.
895 */
896 getIdStr() generates (SupplicantStatus status, string idStr);
897
898 /**
Roshan Pius39f588f2016-10-31 14:51:27 -0700899 * Enable the network for connection purposes.
900 *
901 * This must trigger a connection to the network if:
902 * a) |noConnect| is false, and
903 * b) This is the only network configured, and
904 * c) Is visible in the current scan results.
905 *
906 * @param noConnect Only enable the network, dont trigger a connect.
907 * @return status Status of the operation.
908 * Possible status codes:
909 * |SupplicantStatusCode.SUCCESS|,
910 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
911 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
912 */
913 enable(bool noConnect) generates (SupplicantStatus status);
914
915 /**
916 * Disable the network for connection purposes.
917 *
918 * This must trigger a disconnection from the network, if currently
919 * connected to this one.
920 *
921 * @return status Status of the operation.
922 * Possible status codes:
923 * |SupplicantStatusCode.SUCCESS|,
924 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
925 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
926 */
927 disable() generates (SupplicantStatus status);
928
929 /**
930 * Initiate connection to this network.
931 *
932 * @return status Status of the operation.
933 * Possible status codes:
934 * |SupplicantStatusCode.SUCCESS|,
935 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
936 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
937 */
938 select() generates (SupplicantStatus status);
939
940 /**
941 * Used to send a response to the
942 * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
943 *
944 * @param params Params to be used for EAP GSM authentication.
945 * @return status Status of the operation.
946 * Possible status codes:
947 * |SupplicantStatusCode.SUCCESS|,
948 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
949 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
950 */
Roshan Piusdbd09c62017-01-19 16:03:36 -0800951 sendNetworkEapSimGsmAuthResponse(vec<NetworkResponseEapSimGsmAuthParams> params)
Roshan Pius39f588f2016-10-31 14:51:27 -0700952 generates (SupplicantStatus status);
953
954 /**
955 * Used to send a response to the
Roshan Piusdbd09c62017-01-19 16:03:36 -0800956 * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
957 *
958 * @return status Status of the operation.
959 * Possible status codes:
960 * |SupplicantStatusCode.SUCCESS|,
961 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
962 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
963 */
964 sendNetworkEapSimGsmAuthFailure() generates (SupplicantStatus status);
965
966 /**
967 * Used to send a response to the
Roshan Pius39f588f2016-10-31 14:51:27 -0700968 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
969 *
970 * @param params Params to be used for EAP UMTS authentication.
971 * @return status Status of the operation.
972 * Possible status codes:
973 * |SupplicantStatusCode.SUCCESS|,
974 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
975 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
976 */
977 sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
978 generates (SupplicantStatus status);
979
980 /**
981 * Used to send a response to the
Roshan Piusdbd09c62017-01-19 16:03:36 -0800982 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
983 *
984 * @param auts Params to be used for EAP UMTS authentication.
985 * @return status Status of the operation.
986 * Possible status codes:
987 * |SupplicantStatusCode.SUCCESS|,
988 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
989 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
990 */
991 sendNetworkEapSimUmtsAutsResponse(uint8_t[14] auts)
992 generates (SupplicantStatus status);
993
994 /**
995 * Used to send a response to the
996 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
997 *
998 * @return status Status of the operation.
999 * Possible status codes:
1000 * |SupplicantStatusCode.SUCCESS|,
1001 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
1002 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
1003 */
1004 sendNetworkEapSimUmtsAuthFailure() generates (SupplicantStatus status);
1005
1006 /**
1007 * Used to send a response to the
Roshan Pius39f588f2016-10-31 14:51:27 -07001008 * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
1009 *
1010 * @param identity Identity to be used for the network.
1011 * @return status Status of the operation.
1012 * Possible status codes:
1013 * |SupplicantStatusCode.SUCCESS|,
1014 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
1015 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
1016 */
1017 sendNetworkEapIdentityResponse(vec<uint8_t> identity)
1018 generates (SupplicantStatus status);
1019};