blob: b347c1dce97b2912ce2da137e2d0988dc6161f09 [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 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()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800571 generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700572
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 */
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800582 getProto() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700583
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()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800594 generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700595
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()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800606 generates (SupplicantStatus status,
607 bitfield<GroupCipherMask> groupCipherMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700608
609 /**
610 * Get the pairwise cipher 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 pairwiseCipherMask Combination of |PairwiseCipherMask| values.
617 */
618 getPairwiseCipher()
Roshan Pius5c3a0d92017-01-18 09:23:18 -0800619 generates (SupplicantStatus status,
620 bitfield<PairwiseCipherMask> pairwiseCipherMask);
Roshan Pius39f588f2016-10-31 14:51:27 -0700621
622 /**
623 * Get passphrase for WPA_PSK network.
624 *
625 * @return status Status of the operation.
626 * Possible status codes:
627 * |SupplicantStatusCode.SUCCESS|,
628 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
629 * @return psk value set.
630 */
631 getPskPassphrase() generates (SupplicantStatus status, string psk);
632
633 /**
634 * Get WEP key for WEP network.
635 *
636 * @param keyIdx Index of wep key to be fetched.
637 * Max of |WEP_KEYS_MAX_NUM|.
638 * @return status Status of the operation.
639 * Possible status codes:
640 * |SupplicantStatusCode.SUCCESS|,
641 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
642 * @return wepKey value set.
643 */
644 getWepKey(uint32_t keyIdx)
645 generates (SupplicantStatus status, vec<uint8_t> wepKey);
646
647 /**
648 * Get default Tx key index for WEP network.
649 *
650 * @return status Status of the operation.
651 * Possible status codes:
652 * |SupplicantStatusCode.SUCCESS|,
653 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
654 * @return keyIdx value set.
655 */
656 getWepTxKeyIdx()
657 generates (SupplicantStatus status, uint32_t keyIdx);
658
659 /**
660 * Get whether RequirePmf is enabled for this network.
661 *
662 * @return status Status of the operation.
663 * Possible status codes:
664 * |SupplicantStatusCode.SUCCESS|,
665 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
666 * @return enabled true if set, false otherwise.
667 */
668 getRequirePmf() generates (SupplicantStatus status, bool enabled);
669
670 /**
Roshan Pius118598a2016-12-13 13:39:27 -0800671 * Get EAP Method set for this network.
672 *
673 * @return status Status of the operation.
674 * Possible status codes:
675 * |SupplicantStatusCode.SUCCESS|,
676 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
677 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
678 * @return method value set.
679 * Must be one of |EapMethod| values.
680 */
681 getEapMethod()
682 generates (SupplicantStatus status, EapMethod method);
683
684 /**
685 * Get EAP Phase2 Method set for this network.
686 *
687 * @return status Status of the operation.
688 * Possible status codes:
689 * |SupplicantStatusCode.SUCCESS|,
690 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
691 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
692 * @return method value set.
693 * Must be one of |EapPhase2Method| values.
694 */
695 getEapPhase2Method()
696 generates (SupplicantStatus status, EapPhase2Method method);
697
698 /**
699 * Get EAP Identity set for this network.
700 *
701 * @return status Status of the operation.
702 * Possible status codes:
703 * |SupplicantStatusCode.SUCCESS|,
704 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
705 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
706 * @return identity value set.
707 */
708 getEapIdentity()
709 generates (SupplicantStatus status, vec<uint8_t> identity);
710
711 /**
712 * Get EAP Anonymous Identity set for this network.
713 *
714 * @return status Status of the operation.
715 * Possible status codes:
716 * |SupplicantStatusCode.SUCCESS|,
717 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
718 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
719 * @return identity value set.
720 */
721 getEapAnonymousIdentity()
722 generates (SupplicantStatus status, vec<uint8_t> identity);
723
724 /**
725 * Get EAP Password set for this network.
726 *
727 * @return status Status of the operation.
728 * Possible status codes:
729 * |SupplicantStatusCode.SUCCESS|,
730 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
731 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
732 * @return password value set.
733 */
734 getEapPassword()
735 generates (SupplicantStatus status, vec<uint8_t> password);
736
737 /**
738 * Get EAP CA certificate file path 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 path value set.
746 */
747 getEapCACert() generates (SupplicantStatus status, string path);
748
749 /**
750 * Get EAP CA certificate directory path set for this network.
751 *
752 * @return status Status of the operation.
753 * Possible status codes:
754 * |SupplicantStatusCode.SUCCESS|,
755 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
756 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
757 * @return path value set.
758 */
759 getEapCAPath() generates (SupplicantStatus status, string path);
760
761 /**
762 * Get EAP Client certificate file path set for this network.
763 *
764 * @return status Status of the operation.
765 * Possible status codes:
766 * |SupplicantStatusCode.SUCCESS|,
767 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
768 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
769 * @return path value set.
770 */
771 getEapClientCert() generates (SupplicantStatus status, string path);
772
773 /**
774 * Get EAP private key 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 getEapPrivateKey() generates (SupplicantStatus status, string path);
784
785 /**
786 * Get EAP subject match 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 match value set.
794 */
795 getEapSubjectMatch() generates (SupplicantStatus status, string match);
796
797 /**
798 * Get EAP Alt subject match 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 match value set.
806 */
807 getEapAltSubjectMatch()
808 generates (SupplicantStatus status, string match);
809
810 /**
811 * Get if EAP Open SSL Engine is enabled for this network.
812 *
813 * @return status Status of the operation.
814 * Possible status codes:
815 * |SupplicantStatusCode.SUCCESS|,
816 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
817 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
818 * @return enabled true if set, false otherwise.
819 */
820 getEapEngine() generates (SupplicantStatus status, bool enabled);
821
822 /**
823 * Get EAP Open SSL Engine ID set for this network.
824 *
825 * @return status Status of the operation.
826 * Possible status codes:
827 * |SupplicantStatusCode.SUCCESS|,
828 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
829 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
830 * @return id value set.
831 */
832 getEapEngineID() generates (SupplicantStatus status, string id);
833
834 /**
835 * Get EAP Domain suffix match set for this network.
836 *
837 * @return status Status of the operation.
838 * Possible status codes:
839 * |SupplicantStatusCode.SUCCESS|,
840 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
841 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
842 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
843 * @return match value set.
844 */
845 getEapDomainSuffixMatch()
846 generates (SupplicantStatus status, string match);
847
848 /**
Roshan Pius2d50db92017-01-13 15:53:07 -0800849 * Get ID string set for this network.
850 * Network identifier string for external scripts.
851 *
852 * @return status Status of the operation.
853 * Possible status codes:
854 * |SupplicantStatusCode.SUCCESS|,
855 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
856 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
857 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
858 * @return idStr ID string set.
859 */
860 getIdStr() generates (SupplicantStatus status, string idStr);
861
862 /**
Roshan Pius39f588f2016-10-31 14:51:27 -0700863 * Enable the network for connection purposes.
864 *
865 * This must trigger a connection to the network if:
866 * a) |noConnect| is false, and
867 * b) This is the only network configured, and
868 * c) Is visible in the current scan results.
869 *
870 * @param noConnect Only enable the network, dont trigger a connect.
871 * @return status Status of the operation.
872 * Possible status codes:
873 * |SupplicantStatusCode.SUCCESS|,
874 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
875 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
876 */
877 enable(bool noConnect) generates (SupplicantStatus status);
878
879 /**
880 * Disable the network for connection purposes.
881 *
882 * This must trigger a disconnection from the network, if currently
883 * connected to this one.
884 *
885 * @return status Status of the operation.
886 * Possible status codes:
887 * |SupplicantStatusCode.SUCCESS|,
888 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
889 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
890 */
891 disable() generates (SupplicantStatus status);
892
893 /**
894 * Initiate connection to this network.
895 *
896 * @return status Status of the operation.
897 * Possible status codes:
898 * |SupplicantStatusCode.SUCCESS|,
899 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
900 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
901 */
902 select() generates (SupplicantStatus status);
903
904 /**
905 * Used to send a response to the
906 * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
907 *
908 * @param params Params to be used for EAP GSM authentication.
909 * @return status Status of the operation.
910 * Possible status codes:
911 * |SupplicantStatusCode.SUCCESS|,
912 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
913 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
914 */
915 sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
916 generates (SupplicantStatus status);
917
918 /**
919 * Used to send a response to the
920 * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
921 *
922 * @param params Params to be used for EAP UMTS authentication.
923 * @return status Status of the operation.
924 * Possible status codes:
925 * |SupplicantStatusCode.SUCCESS|,
926 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
927 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
928 */
929 sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
930 generates (SupplicantStatus status);
931
932 /**
933 * Used to send a response to the
934 * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
935 *
936 * @param identity Identity to be used for the network.
937 * @return status Status of the operation.
938 * Possible status codes:
939 * |SupplicantStatusCode.SUCCESS|,
940 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
941 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
942 */
943 sendNetworkEapIdentityResponse(vec<uint8_t> identity)
944 generates (SupplicantStatus status);
945};