blob: 7d86f42e7e17c942f98ee41bc333d861ab1f5e3f [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 */
200 setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
201
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 */
214 setProto(uint32_t protoMask) generates (SupplicantStatus status);
215
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 */
228 setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
229
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 */
242 setGroupCipher(uint32_t groupCipherMask)
243 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 */
257 setPairwiseCipher(uint32_t pairwiseCipherMask)
258 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 Pius2d50db92017-01-13 15:53:07 -0800511 /**
512 * Get ID string set for this network.
513 * Network identifier string for external scripts.
514 *
515 * @return idStr ID string value to set.
516 * @return status Status of the operation.
517 * Possible status codes:
518 * |SupplicantStatusCode.SUCCESS|,
519 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
520 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
521 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
522 */
523 setIdStr(string idStr) generates (SupplicantStatus status);
Roshan Pius39f588f2016-10-31 14:51:27 -0700524
525 /**
526 * Getters for the various network params.
527 */
528 /**
529 * Get SSID for this network.
530 *
531 * @return status Status of the operation.
532 * Possible status codes:
533 * |SupplicantStatusCode.SUCCESS|,
534 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
535 * @return ssid value set.
536 */
537 getSsid() generates (SupplicantStatus status, Ssid ssid);
538
539 /**
540 * Get the BSSID set for this network.
541 *
542 * @return status Status of the operation.
543 * Possible status codes:
544 * |SupplicantStatusCode.SUCCESS|,
545 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
546 * @return bssid value set.
547 */
548 getBssid() generates (SupplicantStatus status, Bssid bssid);
549
550 /**
551 * Get whether Probe Requests are being sent for this network (hidden).
552 *
553 * @return status Status of the operation.
554 * Possible status codes:
555 * |SupplicantStatusCode.SUCCESS|,
556 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
557 * @return enabled true if set, false otherwise.
558 */
559 getScanSsid() generates (SupplicantStatus status, bool enabled);
560
561 /**
562 * Get the key mgmt mask set for the network.
563 *
564 * @return status Status of the operation.
565 * Possible status codes:
566 * |SupplicantStatusCode.SUCCESS|,
567 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
568 * @return keyMgmtMask Combination of |KeyMgmtMask| values.
569 */
570 getKeyMgmt()
571 generates (SupplicantStatus status, uint32_t keyMgmtMask);
572
573 /**
574 * Get the proto mask set for the network.
575 *
576 * @return status Status of the operation.
577 * Possible status codes:
578 * |SupplicantStatusCode.SUCCESS|,
579 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
580 * @return protoMask Combination of |ProtoMask| values.
581 */
582 getProto() generates (SupplicantStatus status, uint32_t protoMask);
583
584 /**
585 * Get the auth alg mask set for the network.
586 *
587 * @return status Status of the operation.
588 * Possible status codes:
589 * |SupplicantStatusCode.SUCCESS|,
590 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
591 * @return authAlgMask Combination of |AuthAlgMask| values.
592 */
593 getAuthAlg()
594 generates (SupplicantStatus status, uint32_t authAlgMask);
595
596 /**
597 * Get the group cipher mask set for the network.
598 *
599 * @return status Status of the operation.
600 * Possible status codes:
601 * |SupplicantStatusCode.SUCCESS|,
602 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
603 * @return groupCipherMask Combination of |GroupCipherMask| values.
604 */
605 getGroupCipher()
606 generates (SupplicantStatus status, uint32_t groupCipherMask);
607
608 /**
609 * Get the pairwise cipher mask set for the network.
610 *
611 * @return status Status of the operation.
612 * Possible status codes:
613 * |SupplicantStatusCode.SUCCESS|,
614 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
615 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
616 */
617 getPairwiseCipher()
618 generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
619
620 /**
621 * Get passphrase for WPA_PSK network.
622 *
623 * @return status Status of the operation.
624 * Possible status codes:
625 * |SupplicantStatusCode.SUCCESS|,
626 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
627 * @return psk value set.
628 */
629 getPskPassphrase() generates (SupplicantStatus status, string psk);
630
631 /**
632 * Get WEP key for WEP network.
633 *
634 * @param keyIdx Index of wep key to be fetched.
635 * Max of |WEP_KEYS_MAX_NUM|.
636 * @return status Status of the operation.
637 * Possible status codes:
638 * |SupplicantStatusCode.SUCCESS|,
639 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
640 * @return wepKey value set.
641 */
642 getWepKey(uint32_t keyIdx)
643 generates (SupplicantStatus status, vec<uint8_t> wepKey);
644
645 /**
646 * Get default Tx key index for WEP network.
647 *
648 * @return status Status of the operation.
649 * Possible status codes:
650 * |SupplicantStatusCode.SUCCESS|,
651 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
652 * @return keyIdx value set.
653 */
654 getWepTxKeyIdx()
655 generates (SupplicantStatus status, uint32_t keyIdx);
656
657 /**
658 * Get whether RequirePmf is enabled for this network.
659 *
660 * @return status Status of the operation.
661 * Possible status codes:
662 * |SupplicantStatusCode.SUCCESS|,
663 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
664 * @return enabled true if set, false otherwise.
665 */
666 getRequirePmf() generates (SupplicantStatus status, bool enabled);
667
668 /**
Roshan Pius118598a2016-12-13 13:39:27 -0800669 * Get EAP Method set for this network.
670 *
671 * @return status Status of the operation.
672 * Possible status codes:
673 * |SupplicantStatusCode.SUCCESS|,
674 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
675 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
676 * @return method value set.
677 * Must be one of |EapMethod| values.
678 */
679 getEapMethod()
680 generates (SupplicantStatus status, EapMethod method);
681
682 /**
683 * Get EAP Phase2 Method set for this network.
684 *
685 * @return status Status of the operation.
686 * Possible status codes:
687 * |SupplicantStatusCode.SUCCESS|,
688 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
689 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
690 * @return method value set.
691 * Must be one of |EapPhase2Method| values.
692 */
693 getEapPhase2Method()
694 generates (SupplicantStatus status, EapPhase2Method method);
695
696 /**
697 * Get EAP Identity set for this network.
698 *
699 * @return status Status of the operation.
700 * Possible status codes:
701 * |SupplicantStatusCode.SUCCESS|,
702 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
703 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
704 * @return identity value set.
705 */
706 getEapIdentity()
707 generates (SupplicantStatus status, vec<uint8_t> identity);
708
709 /**
710 * Get EAP Anonymous Identity 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 identity value set.
718 */
719 getEapAnonymousIdentity()
720 generates (SupplicantStatus status, vec<uint8_t> identity);
721
722 /**
723 * Get EAP Password set for this network.
724 *
725 * @return status Status of the operation.
726 * Possible status codes:
727 * |SupplicantStatusCode.SUCCESS|,
728 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
729 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
730 * @return password value set.
731 */
732 getEapPassword()
733 generates (SupplicantStatus status, vec<uint8_t> password);
734
735 /**
736 * Get EAP CA certificate file path set for this network.
737 *
738 * @return status Status of the operation.
739 * Possible status codes:
740 * |SupplicantStatusCode.SUCCESS|,
741 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
742 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
743 * @return path value set.
744 */
745 getEapCACert() generates (SupplicantStatus status, string path);
746
747 /**
748 * Get EAP CA certificate directory path 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 path value set.
756 */
757 getEapCAPath() generates (SupplicantStatus status, string path);
758
759 /**
760 * Get EAP Client certificate file path set for this network.
761 *
762 * @return status Status of the operation.
763 * Possible status codes:
764 * |SupplicantStatusCode.SUCCESS|,
765 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
766 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
767 * @return path value set.
768 */
769 getEapClientCert() generates (SupplicantStatus status, string path);
770
771 /**
772 * Get EAP private key file path set for this network.
773 *
774 * @return status Status of the operation.
775 * Possible status codes:
776 * |SupplicantStatusCode.SUCCESS|,
777 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
778 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
779 * @return path value set.
780 */
781 getEapPrivateKey() generates (SupplicantStatus status, string path);
782
783 /**
784 * Get EAP subject match set for this network.
785 *
786 * @return status Status of the operation.
787 * Possible status codes:
788 * |SupplicantStatusCode.SUCCESS|,
789 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
790 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
791 * @return match value set.
792 */
793 getEapSubjectMatch() generates (SupplicantStatus status, string match);
794
795 /**
796 * Get EAP Alt subject match set for this network.
797 *
798 * @return status Status of the operation.
799 * Possible status codes:
800 * |SupplicantStatusCode.SUCCESS|,
801 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
802 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
803 * @return match value set.
804 */
805 getEapAltSubjectMatch()
806 generates (SupplicantStatus status, string match);
807
808 /**
809 * Get if EAP Open SSL Engine is enabled for this network.
810 *
811 * @return status Status of the operation.
812 * Possible status codes:
813 * |SupplicantStatusCode.SUCCESS|,
814 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
815 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
816 * @return enabled true if set, false otherwise.
817 */
818 getEapEngine() generates (SupplicantStatus status, bool enabled);
819
820 /**
821 * Get EAP Open SSL Engine ID set for this network.
822 *
823 * @return status Status of the operation.
824 * Possible status codes:
825 * |SupplicantStatusCode.SUCCESS|,
826 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
827 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
828 * @return id value set.
829 */
830 getEapEngineID() generates (SupplicantStatus status, string id);
831
832 /**
833 * Get EAP Domain suffix match set for this network.
834 *
835 * @return status Status of the operation.
836 * Possible status codes:
837 * |SupplicantStatusCode.SUCCESS|,
838 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
839 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
840 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
841 * @return match value set.
842 */
843 getEapDomainSuffixMatch()
844 generates (SupplicantStatus status, string match);
845
846 /**
Roshan Pius2d50db92017-01-13 15:53:07 -0800847 * Get ID string set for this network.
848 * Network identifier string for external scripts.
849 *
850 * @return status Status of the operation.
851 * Possible status codes:
852 * |SupplicantStatusCode.SUCCESS|,
853 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
854 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
855 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
856 * @return idStr ID string set.
857 */
858 getIdStr() generates (SupplicantStatus status, string idStr);
859
860 /**
Roshan Pius39f588f2016-10-31 14:51:27 -0700861 * Enable the network for connection purposes.
862 *
863 * This must trigger a connection to the network if:
864 * a) |noConnect| is false, and
865 * b) This is the only network configured, and
866 * c) Is visible in the current scan results.
867 *
868 * @param noConnect Only enable the network, dont trigger a connect.
869 * @return status Status of the operation.
870 * Possible status codes:
871 * |SupplicantStatusCode.SUCCESS|,
872 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
873 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
874 */
875 enable(bool noConnect) generates (SupplicantStatus status);
876
877 /**
878 * Disable the network for connection purposes.
879 *
880 * This must trigger a disconnection from the network, if currently
881 * connected to this one.
882 *
883 * @return status Status of the operation.
884 * Possible status codes:
885 * |SupplicantStatusCode.SUCCESS|,
886 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
887 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
888 */
889 disable() generates (SupplicantStatus status);
890
891 /**
892 * Initiate connection to this network.
893 *
894 * @return status Status of the operation.
895 * Possible status codes:
896 * |SupplicantStatusCode.SUCCESS|,
897 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
898 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
899 */
900 select() generates (SupplicantStatus status);
901
902 /**
903 * Used to send a response to the
904 * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
905 *
906 * @param params Params to be used for EAP GSM authentication.
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 sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
914 generates (SupplicantStatus status);
915
916 /**
917 * Used to send a response to the
918 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
919 *
920 * @param params Params to be used for EAP UMTS authentication.
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 sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
928 generates (SupplicantStatus status);
929
930 /**
931 * Used to send a response to the
932 * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
933 *
934 * @param identity Identity to be used for the network.
935 * @return status Status of the operation.
936 * Possible status codes:
937 * |SupplicantStatusCode.SUCCESS|,
938 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
939 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
940 */
941 sendNetworkEapIdentityResponse(vec<uint8_t> identity)
942 generates (SupplicantStatus status);
943};