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