blob: e579d24513647cfcf4366a77ae2db46ea8c904ae [file] [log] [blame]
Jimmy Chen0cb0aed2019-07-04 14:51:22 +08001/*
2 * Copyright 2019 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.3;
18
Jimmy Chene374a4a2019-09-16 16:09:27 +080019import @1.0::ISupplicantStaNetwork;
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080020import @1.0::SupplicantStatus;
21import @1.2::ISupplicantStaNetwork;
22
23/**
24 * Interface exposed by the supplicant for each station mode network
25 * configuration it controls.
26 */
27interface ISupplicantStaNetwork extends @1.2::ISupplicantStaNetwork {
Sunil Ravic6489a52019-12-06 18:03:24 -080028 /**
Hai Shalom08b70222020-01-06 16:31:18 -080029 * Possible mask of values for Proto param.
Sunil Ravic6489a52019-12-06 18:03:24 -080030 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080031 enum ProtoMask : @1.0::ISupplicantStaNetwork.ProtoMask {
32 WAPI = 1 << 2,
33 };
34
Sunil Ravic6489a52019-12-06 18:03:24 -080035 /**
Hai Shalom08b70222020-01-06 16:31:18 -080036 * Possible mask of values for KeyMgmt param.
Sunil Ravic6489a52019-12-06 18:03:24 -080037 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080038 enum KeyMgmtMask : @1.2::ISupplicantStaNetwork.KeyMgmtMask {
Sunil Ravic6489a52019-12-06 18:03:24 -080039 /*
40 * WAPI Psk
41 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080042 WAPI_PSK = 1 << 12,
Sunil Ravic6489a52019-12-06 18:03:24 -080043 /**
44 * WAPI Cert
45 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080046 WAPI_CERT = 1 << 13,
47 };
48
Sunil Ravic6489a52019-12-06 18:03:24 -080049 /**
Hai Shalom08b70222020-01-06 16:31:18 -080050 * Possible mask of values for PairwiseCipher param.
Sunil Ravic6489a52019-12-06 18:03:24 -080051 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080052 enum PairwiseCipherMask : @1.2::ISupplicantStaNetwork.PairwiseCipherMask {
Sunil Ravic6489a52019-12-06 18:03:24 -080053 /**
54 * SMS4 Pairwise Cipher
55 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080056 SMS4 = 1 << 7,
57 };
58
Sunil Ravic6489a52019-12-06 18:03:24 -080059 /**
Hai Shalom08b70222020-01-06 16:31:18 -080060 * Possible mask of values for GroupCipher param.
Sunil Ravic6489a52019-12-06 18:03:24 -080061 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080062 enum GroupCipherMask : @1.2::ISupplicantStaNetwork.GroupCipherMask {
Sunil Ravic6489a52019-12-06 18:03:24 -080063 /**
64 * SMS4 Group Cipher
65 */
Jimmy Chene374a4a2019-09-16 16:09:27 +080066 SMS4 = 1 << 7,
67 };
68
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080069 /**
Hai Shalom08b70222020-01-06 16:31:18 -080070 * Possible mask of values for AuthAlg param.
71 */
72 enum AuthAlgMask : @1.0::ISupplicantStaNetwork.AuthAlgMask {
73 SAE = 1 << 4,
74 };
75
76 /**
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080077 * Set OCSP (Online Certificate Status Protocol) type for this network.
78 *
79 * @param ocspType value to set.
80 * @return status Status of the operation.
81 * Possible status codes:
82 * |SupplicantStatusCode.SUCCESS|,
83 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
84 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
85 */
86 setOcsp(OcspType ocspType) generates (SupplicantStatus status);
87
88 /**
89 * Get OCSP (Online Certificate Status Protocol) type for this network.
90 *
91 * @return status Status of the operation.
92 * Possible status codes:
93 * |SupplicantStatusCode.SUCCESS|,
94 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
95 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
96 * @return ocspType ocsp type.
97 */
98 getOcsp() generates (SupplicantStatus status, OcspType ocspType);
Jimmy Chen1eb82362019-08-28 17:54:29 +080099
100 /**
Jimmy Chene374a4a2019-09-16 16:09:27 +0800101 * Set key management mask for the network.
102 *
103 * @param keyMgmtMask value to set.
104 * Combination of |KeyMgmtMask| values.
105 * @return status Status of the operation.
106 * Possible status codes:
107 * |SupplicantStatusCode.SUCCESS|,
108 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
109 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
110 * |SupplicantStatusCode.FAILURE_UNKNOWN|
111 */
112 setKeyMgmt_1_3(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
113
114 /**
115 * Get the key mgmt mask set for the network.
116 *
117 * @return status Status of the operation.
118 * Possible status codes:
119 * |SupplicantStatusCode.SUCCESS|,
120 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
121 * |SupplicantStatusCode.FAILURE_UNKNOWN|
122 * @return keyMgmtMask Combination of |KeyMgmtMask| values.
123 */
Sunil Ravic6489a52019-12-06 18:03:24 -0800124 getKeyMgmt_1_3() generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800125
126 /**
127 * Set proto mask for the network.
128 *
129 * @param protoMask value to set.
130 * Combination of |ProtoMask| values.
131 * @return status Status of the operation.
132 * Possible status codes:
133 * |SupplicantStatusCode.SUCCESS|,
134 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
135 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
136 * |SupplicantStatusCode.FAILURE_UNKNOWN|
137 */
138 setProto_1_3(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
139
140 /**
141 * Get the proto mask set for the network.
142 *
143 * @return status Status of the operation.
144 * Possible status codes:
145 * |SupplicantStatusCode.SUCCESS|,
146 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
147 * |SupplicantStatusCode.FAILURE_UNKNOWN|
148 * @return protoMask Combination of |ProtoMask| values.
149 */
150 getProto_1_3() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
151
152 /**
153 * Set group cipher mask for the network.
154 *
155 * @param groupCipherMask value to set.
156 * Combination of |ProtoMask| values.
157 * @return status Status of the operation.
158 * Possible status codes:
159 * |SupplicantStatusCode.SUCCESS|,
160 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
161 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
162 * |SupplicantStatusCode.FAILURE_UNKNOWN|
163 */
164 setGroupCipher_1_3(bitfield<GroupCipherMask> groupCipherMask)
165 generates (SupplicantStatus status);
166
167 /**
168 * Get the pairwise cipher mask set for the network.
169 *
170 * @return status Status of the operation.
171 * Possible status codes:
172 * |SupplicantStatusCode.SUCCESS|,
173 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
174 * |SupplicantStatusCode.FAILURE_UNKNOWN|
175 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
176 */
177 getPairwiseCipher_1_3()
Sunil Ravic6489a52019-12-06 18:03:24 -0800178 generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800179
180 /**
181 * Set pairwise cipher mask for the network.
182 *
183 * @param pairwiseCipherMask value to set.
184 * Combination of |ProtoMask| values.
185 * @return status Status of the operation.
186 * Possible status codes:
187 * |SupplicantStatusCode.SUCCESS|,
188 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
189 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
190 * |SupplicantStatusCode.FAILURE_UNKNOWN|
191 */
192 setPairwiseCipher_1_3(bitfield<PairwiseCipherMask> pairwiseCipherMask)
193 generates (SupplicantStatus status);
194
195 /**
196 * Get the group cipher mask set for the network.
197 *
198 * @return status Status of the operation.
199 * Possible status codes:
200 * |SupplicantStatusCode.SUCCESS|,
201 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
202 * |SupplicantStatusCode.FAILURE_UNKNOWN|
203 * @return groupCipherMask Combination of |GroupCipherMask| values.
204 */
205 getGroupCipher_1_3()
Sunil Ravic6489a52019-12-06 18:03:24 -0800206 generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800207
208 /**
209 * Set WAPI certificate suite for this network.
210 *
211 * @param suite value to set.
212 * @return status Status of the operation.
213 * Possible status codes:
214 * |SupplicantStatusCode.SUCCESS|,
215 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
216 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
217 * |SupplicantStatusCode.FAILURE_UNKNOWN|
218 */
219 setWapiCertSuite(string suite) generates (SupplicantStatus status);
220
221 /**
222 * Get WAPI certificate suite set for this network.
223 *
224 * @return status Status of the operation.
225 * Possible status codes:
226 * |SupplicantStatusCode.SUCCESS|,
227 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
228 * |SupplicantStatusCode.FAILURE_UNKNOWN|
229 * @return suite The name of a suite.
230 */
231 getWapiCertSuite() generates (SupplicantStatus status, string suite);
232
233 /**
Jimmy Chen1eb82362019-08-28 17:54:29 +0800234 * Add a PMK into supplicant PMK cache.
235 *
236 * @param serializedEntry is serialized PMK cache entry, the content is
237 * opaque for the framework and depends on the native implementation.
238 * @return status Status of the operation
239 * Possible status codes:
240 * |SupplicantStatusCode.SUCCESS|,
241 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
242 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
243 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
244 */
Ahmed ElArabawye56767d2019-09-30 09:35:03 -0700245 setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status);
Hai Shalom08b70222020-01-06 16:31:18 -0800246
247 /**
248 * Set auth alg mask for the network.
249 *
250 * @param authAlgMask value to set.
251 * Combination of |ProtoMask| values.
252 * @return status Status of the operation.
253 * Possible status codes:
254 * |SupplicantStatusCode.SUCCESS|,
255 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
256 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
257 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
258 */
259 setAuthAlg_1_3(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status);
260
261 /**
262 * Get the auth alg mask set for the network.
263 *
264 * @return status Status of the operation.
265 * Possible status codes:
266 * |SupplicantStatusCode.SUCCESS|,
267 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
268 * @return authAlgMask Combination of |AuthAlgMask| values.
269 */
270 getAuthAlg_1_3() generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
Jimmy Chen0cb0aed2019-07-04 14:51:22 +0800271};