blob: c18bffc93f787e28ce0a0fe985a78b26c16c5357 [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 /**
29 * Possble mask of values for Proto param.
30 */
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 /**
36 * Possble mask of values for KeyMgmt param.
37 */
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 /**
50 * Possble mask of values for PairwiseCipher param.
51 */
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 /**
60 * Possble mask of values for GroupCipher param.
61 */
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 /**
70 * Set OCSP (Online Certificate Status Protocol) type for this network.
71 *
72 * @param ocspType value to set.
73 * @return status Status of the operation.
74 * Possible status codes:
75 * |SupplicantStatusCode.SUCCESS|,
76 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
77 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
78 */
79 setOcsp(OcspType ocspType) generates (SupplicantStatus status);
80
81 /**
82 * Get OCSP (Online Certificate Status Protocol) type for this network.
83 *
84 * @return status Status of the operation.
85 * Possible status codes:
86 * |SupplicantStatusCode.SUCCESS|,
87 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
88 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
89 * @return ocspType ocsp type.
90 */
91 getOcsp() generates (SupplicantStatus status, OcspType ocspType);
Jimmy Chen1eb82362019-08-28 17:54:29 +080092
93 /**
Jimmy Chene374a4a2019-09-16 16:09:27 +080094 * Set key management mask for the network.
95 *
96 * @param keyMgmtMask value to set.
97 * Combination of |KeyMgmtMask| values.
98 * @return status Status of the operation.
99 * Possible status codes:
100 * |SupplicantStatusCode.SUCCESS|,
101 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
102 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
103 * |SupplicantStatusCode.FAILURE_UNKNOWN|
104 */
105 setKeyMgmt_1_3(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
106
107 /**
108 * Get the key mgmt mask set for the network.
109 *
110 * @return status Status of the operation.
111 * Possible status codes:
112 * |SupplicantStatusCode.SUCCESS|,
113 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
114 * |SupplicantStatusCode.FAILURE_UNKNOWN|
115 * @return keyMgmtMask Combination of |KeyMgmtMask| values.
116 */
Sunil Ravic6489a52019-12-06 18:03:24 -0800117 getKeyMgmt_1_3() generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800118
119 /**
120 * Set proto mask for the network.
121 *
122 * @param protoMask value to set.
123 * Combination of |ProtoMask| values.
124 * @return status Status of the operation.
125 * Possible status codes:
126 * |SupplicantStatusCode.SUCCESS|,
127 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
128 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
129 * |SupplicantStatusCode.FAILURE_UNKNOWN|
130 */
131 setProto_1_3(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
132
133 /**
134 * Get the proto mask set for the network.
135 *
136 * @return status Status of the operation.
137 * Possible status codes:
138 * |SupplicantStatusCode.SUCCESS|,
139 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
140 * |SupplicantStatusCode.FAILURE_UNKNOWN|
141 * @return protoMask Combination of |ProtoMask| values.
142 */
143 getProto_1_3() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
144
145 /**
146 * Set group cipher mask for the network.
147 *
148 * @param groupCipherMask value to set.
149 * Combination of |ProtoMask| values.
150 * @return status Status of the operation.
151 * Possible status codes:
152 * |SupplicantStatusCode.SUCCESS|,
153 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
154 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
155 * |SupplicantStatusCode.FAILURE_UNKNOWN|
156 */
157 setGroupCipher_1_3(bitfield<GroupCipherMask> groupCipherMask)
158 generates (SupplicantStatus status);
159
160 /**
161 * Get the pairwise cipher mask set for the network.
162 *
163 * @return status Status of the operation.
164 * Possible status codes:
165 * |SupplicantStatusCode.SUCCESS|,
166 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
167 * |SupplicantStatusCode.FAILURE_UNKNOWN|
168 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
169 */
170 getPairwiseCipher_1_3()
Sunil Ravic6489a52019-12-06 18:03:24 -0800171 generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800172
173 /**
174 * Set pairwise cipher mask for the network.
175 *
176 * @param pairwiseCipherMask value to set.
177 * Combination of |ProtoMask| values.
178 * @return status Status of the operation.
179 * Possible status codes:
180 * |SupplicantStatusCode.SUCCESS|,
181 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
182 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
183 * |SupplicantStatusCode.FAILURE_UNKNOWN|
184 */
185 setPairwiseCipher_1_3(bitfield<PairwiseCipherMask> pairwiseCipherMask)
186 generates (SupplicantStatus status);
187
188 /**
189 * Get the group cipher mask set for the network.
190 *
191 * @return status Status of the operation.
192 * Possible status codes:
193 * |SupplicantStatusCode.SUCCESS|,
194 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
195 * |SupplicantStatusCode.FAILURE_UNKNOWN|
196 * @return groupCipherMask Combination of |GroupCipherMask| values.
197 */
198 getGroupCipher_1_3()
Sunil Ravic6489a52019-12-06 18:03:24 -0800199 generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
Jimmy Chene374a4a2019-09-16 16:09:27 +0800200
201 /**
202 * Set WAPI certificate suite for this network.
203 *
204 * @param suite value to set.
205 * @return status Status of the operation.
206 * Possible status codes:
207 * |SupplicantStatusCode.SUCCESS|,
208 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
209 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
210 * |SupplicantStatusCode.FAILURE_UNKNOWN|
211 */
212 setWapiCertSuite(string suite) generates (SupplicantStatus status);
213
214 /**
215 * Get WAPI certificate suite set for this network.
216 *
217 * @return status Status of the operation.
218 * Possible status codes:
219 * |SupplicantStatusCode.SUCCESS|,
220 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
221 * |SupplicantStatusCode.FAILURE_UNKNOWN|
222 * @return suite The name of a suite.
223 */
224 getWapiCertSuite() generates (SupplicantStatus status, string suite);
225
226 /**
Jimmy Chen1eb82362019-08-28 17:54:29 +0800227 * Add a PMK into supplicant PMK cache.
228 *
229 * @param serializedEntry is serialized PMK cache entry, the content is
230 * opaque for the framework and depends on the native implementation.
231 * @return status Status of the operation
232 * Possible status codes:
233 * |SupplicantStatusCode.SUCCESS|,
234 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
235 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
236 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
237 */
Ahmed ElArabawye56767d2019-09-30 09:35:03 -0700238 setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status);
Jimmy Chen0cb0aed2019-07-04 14:51:22 +0800239};