blob: 1bcf7bcde29d240154c793f1736912b528f328ad [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 {
Jimmy Chene374a4a2019-09-16 16:09:27 +080028 /** Possble mask of values for Proto param. */
29 enum ProtoMask : @1.0::ISupplicantStaNetwork.ProtoMask {
30 WAPI = 1 << 2,
31 };
32
33 /** Possble mask of values for KeyMgmt param. */
34 enum KeyMgmtMask : @1.2::ISupplicantStaNetwork.KeyMgmtMask {
35 /* WAPI Psk */
36 WAPI_PSK = 1 << 12,
37
38 /** WAPI Cert */
39 WAPI_CERT = 1 << 13,
40 };
41
42 /** Possble mask of values for PairwiseCipher param. */
43 enum PairwiseCipherMask : @1.2::ISupplicantStaNetwork.PairwiseCipherMask {
44 /** SMS4 Pairwise Cipher */
45 SMS4 = 1 << 7,
46 };
47
48 /** Possble mask of values for GroupCipher param. */
49 enum GroupCipherMask : @1.2::ISupplicantStaNetwork.GroupCipherMask {
50 /** SMS4 Group Cipher */
51 SMS4 = 1 << 7,
52 };
53
Jimmy Chen0cb0aed2019-07-04 14:51:22 +080054 /**
55 * Set OCSP (Online Certificate Status Protocol) type for this network.
56 *
57 * @param ocspType value to set.
58 * @return status Status of the operation.
59 * Possible status codes:
60 * |SupplicantStatusCode.SUCCESS|,
61 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
62 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
63 */
64 setOcsp(OcspType ocspType) generates (SupplicantStatus status);
65
66 /**
67 * Get OCSP (Online Certificate Status Protocol) type for this network.
68 *
69 * @return status Status of the operation.
70 * Possible status codes:
71 * |SupplicantStatusCode.SUCCESS|,
72 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
73 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
74 * @return ocspType ocsp type.
75 */
76 getOcsp() generates (SupplicantStatus status, OcspType ocspType);
Jimmy Chen1eb82362019-08-28 17:54:29 +080077
78 /**
Jimmy Chene374a4a2019-09-16 16:09:27 +080079 * Set key management mask for the network.
80 *
81 * @param keyMgmtMask value to set.
82 * Combination of |KeyMgmtMask| values.
83 * @return status Status of the operation.
84 * Possible status codes:
85 * |SupplicantStatusCode.SUCCESS|,
86 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
87 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
88 * |SupplicantStatusCode.FAILURE_UNKNOWN|
89 */
90 setKeyMgmt_1_3(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
91
92 /**
93 * Get the key mgmt mask set for the network.
94 *
95 * @return status Status of the operation.
96 * Possible status codes:
97 * |SupplicantStatusCode.SUCCESS|,
98 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
99 * |SupplicantStatusCode.FAILURE_UNKNOWN|
100 * @return keyMgmtMask Combination of |KeyMgmtMask| values.
101 */
102 getKeyMgmt_1_3()
103 generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
104
105 /**
106 * Set proto mask for the network.
107 *
108 * @param protoMask value to set.
109 * Combination of |ProtoMask| values.
110 * @return status Status of the operation.
111 * Possible status codes:
112 * |SupplicantStatusCode.SUCCESS|,
113 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
114 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
115 * |SupplicantStatusCode.FAILURE_UNKNOWN|
116 */
117 setProto_1_3(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
118
119 /**
120 * Get the proto mask set for the network.
121 *
122 * @return status Status of the operation.
123 * Possible status codes:
124 * |SupplicantStatusCode.SUCCESS|,
125 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
126 * |SupplicantStatusCode.FAILURE_UNKNOWN|
127 * @return protoMask Combination of |ProtoMask| values.
128 */
129 getProto_1_3() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
130
131 /**
132 * Set group cipher mask for the network.
133 *
134 * @param groupCipherMask value to set.
135 * Combination of |ProtoMask| values.
136 * @return status Status of the operation.
137 * Possible status codes:
138 * |SupplicantStatusCode.SUCCESS|,
139 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
140 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
141 * |SupplicantStatusCode.FAILURE_UNKNOWN|
142 */
143 setGroupCipher_1_3(bitfield<GroupCipherMask> groupCipherMask)
144 generates (SupplicantStatus status);
145
146 /**
147 * Get the pairwise cipher mask set for the network.
148 *
149 * @return status Status of the operation.
150 * Possible status codes:
151 * |SupplicantStatusCode.SUCCESS|,
152 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
153 * |SupplicantStatusCode.FAILURE_UNKNOWN|
154 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
155 */
156 getPairwiseCipher_1_3()
157 generates (SupplicantStatus status,
158 bitfield<PairwiseCipherMask> pairwiseCipherMask);
159
160 /**
161 * Set pairwise cipher mask for the network.
162 *
163 * @param pairwiseCipherMask value to set.
164 * Combination of |ProtoMask| values.
165 * @return status Status of the operation.
166 * Possible status codes:
167 * |SupplicantStatusCode.SUCCESS|,
168 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
169 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
170 * |SupplicantStatusCode.FAILURE_UNKNOWN|
171 */
172 setPairwiseCipher_1_3(bitfield<PairwiseCipherMask> pairwiseCipherMask)
173 generates (SupplicantStatus status);
174
175 /**
176 * Get the group cipher mask set for the network.
177 *
178 * @return status Status of the operation.
179 * Possible status codes:
180 * |SupplicantStatusCode.SUCCESS|,
181 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
182 * |SupplicantStatusCode.FAILURE_UNKNOWN|
183 * @return groupCipherMask Combination of |GroupCipherMask| values.
184 */
185 getGroupCipher_1_3()
186 generates (SupplicantStatus status,
187 bitfield<GroupCipherMask> groupCipherMask);
188
189 /**
190 * Set WAPI certificate suite for this network.
191 *
192 * @param suite value to set.
193 * @return status Status of the operation.
194 * Possible status codes:
195 * |SupplicantStatusCode.SUCCESS|,
196 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
197 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
198 * |SupplicantStatusCode.FAILURE_UNKNOWN|
199 */
200 setWapiCertSuite(string suite) generates (SupplicantStatus status);
201
202 /**
203 * Get WAPI certificate suite set for this network.
204 *
205 * @return status Status of the operation.
206 * Possible status codes:
207 * |SupplicantStatusCode.SUCCESS|,
208 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
209 * |SupplicantStatusCode.FAILURE_UNKNOWN|
210 * @return suite The name of a suite.
211 */
212 getWapiCertSuite() generates (SupplicantStatus status, string suite);
213
214 /**
Jimmy Chen1eb82362019-08-28 17:54:29 +0800215 * Add a PMK into supplicant PMK cache.
216 *
217 * @param serializedEntry is serialized PMK cache entry, the content is
218 * opaque for the framework and depends on the native implementation.
219 * @return status Status of the operation
220 * Possible status codes:
221 * |SupplicantStatusCode.SUCCESS|,
222 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
223 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
224 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
225 */
Ahmed ElArabawye56767d2019-09-30 09:35:03 -0700226 setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status);
Jimmy Chen0cb0aed2019-07-04 14:51:22 +0800227};