• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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
19import @1.0::ISupplicantStaNetwork;
20import @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 {
28    /**
29     * Possible mask of values for Proto param.
30     */
31    enum ProtoMask : @1.0::ISupplicantStaNetwork.ProtoMask {
32        WAPI = 1 << 2,
33    };
34
35    /**
36     * Possible mask of values for KeyMgmt param.
37     */
38    enum KeyMgmtMask : @1.2::ISupplicantStaNetwork.KeyMgmtMask {
39        /*
40         * WAPI Psk
41         */
42        WAPI_PSK = 1 << 12,
43        /**
44         * WAPI Cert
45         */
46        WAPI_CERT = 1 << 13,
47        /**
48         * FILS shared key authentication with sha-256
49         */
50        FILS_SHA256 = 1 << 18,
51        /**
52         * FILS shared key authentication with sha-384
53         */
54        FILS_SHA384 = 1 << 19,
55    };
56
57    /**
58     * Possible mask of values for PairwiseCipher param.
59     */
60    enum PairwiseCipherMask : @1.2::ISupplicantStaNetwork.PairwiseCipherMask {
61        /**
62         * SMS4 Pairwise Cipher
63         */
64        SMS4 = 1 << 7,
65    };
66
67    /**
68     * Possible mask of values for GroupCipher param.
69     */
70    enum GroupCipherMask : @1.2::ISupplicantStaNetwork.GroupCipherMask {
71        /**
72         * SMS4 Group Cipher
73         */
74        SMS4 = 1 << 7,
75    };
76
77    /**
78     * Possible mask of values for AuthAlg param.
79     */
80    enum AuthAlgMask : @1.0::ISupplicantStaNetwork.AuthAlgMask {
81        SAE = 1 << 4,
82    };
83
84    /**
85     * Set OCSP (Online Certificate Status Protocol) type for this network.
86     *
87     * @param ocspType value to set.
88     * @return status Status of the operation.
89     *         Possible status codes:
90     *         |SupplicantStatusCode.SUCCESS|,
91     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
92     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
93     */
94    setOcsp(OcspType ocspType) generates (SupplicantStatus status);
95
96    /**
97     * Get OCSP (Online Certificate Status Protocol) type for this network.
98     *
99     * @return status Status of the operation.
100     *         Possible status codes:
101     *         |SupplicantStatusCode.SUCCESS|,
102     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
103     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
104     * @return ocspType ocsp type.
105     */
106    getOcsp() generates (SupplicantStatus status, OcspType ocspType);
107
108    /**
109     * Set key management mask for the network.
110     *
111     * @param keyMgmtMask value to set.
112     *        Combination of |KeyMgmtMask| values.
113     * @return status Status of the operation.
114     *         Possible status codes:
115     *         |SupplicantStatusCode.SUCCESS|,
116     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
117     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
118     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
119     */
120    setKeyMgmt_1_3(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
121
122    /**
123     * Get the key mgmt mask set for the network.
124     *
125     * @return status Status of the operation.
126     *         Possible status codes:
127     *         |SupplicantStatusCode.SUCCESS|,
128     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
129     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
130     * @return keyMgmtMask Combination of |KeyMgmtMask| values.
131     */
132    getKeyMgmt_1_3() generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
133
134    /**
135     * Set proto mask for the network.
136     *
137     * @param protoMask value to set.
138     *        Combination of |ProtoMask| values.
139     * @return status Status of the operation.
140     *         Possible status codes:
141     *         |SupplicantStatusCode.SUCCESS|,
142     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
143     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
144     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
145     */
146    setProto_1_3(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
147
148    /**
149     * Get the proto mask set for the network.
150     *
151     * @return status Status of the operation.
152     *         Possible status codes:
153     *         |SupplicantStatusCode.SUCCESS|,
154     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
155     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
156     * @return protoMask Combination of |ProtoMask| values.
157     */
158    getProto_1_3() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
159
160    /**
161     * Set group cipher mask for the network.
162     *
163     * @param groupCipherMask 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    setGroupCipher_1_3(bitfield<GroupCipherMask> groupCipherMask)
173        generates (SupplicantStatus status);
174
175    /**
176     * Get the pairwise 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 pairwiseCipherMask Combination of |PairwiseCipherMask| values.
184     */
185    getPairwiseCipher_1_3()
186        generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
187
188    /**
189     * Set pairwise cipher mask for the network.
190     *
191     * @param pairwiseCipherMask value to set.
192     *        Combination of |ProtoMask| values.
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    setPairwiseCipher_1_3(bitfield<PairwiseCipherMask> pairwiseCipherMask)
201        generates (SupplicantStatus status);
202
203    /**
204     * Get the group cipher mask set for the network.
205     *
206     * @return status Status of the operation.
207     *         Possible status codes:
208     *         |SupplicantStatusCode.SUCCESS|,
209     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
210     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
211     * @return groupCipherMask Combination of |GroupCipherMask| values.
212     */
213    getGroupCipher_1_3()
214        generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
215
216    /**
217     * Set WAPI certificate suite name for this network.
218     *
219     * @param suite value to set.
220     * @return status Status of the operation.
221     *         Possible status codes:
222     *         |SupplicantStatusCode.SUCCESS|,
223     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
224     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
225     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
226     */
227    setWapiCertSuite(string suite) generates (SupplicantStatus status);
228
229    /**
230     * Get WAPI certificate suite name set for this network.
231     *
232     * @return status Status of the operation.
233     *         Possible status codes:
234     *         |SupplicantStatusCode.SUCCESS|,
235     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
236     *         |SupplicantStatusCode.FAILURE_UNKNOWN|
237     * @return suite The name of a suite.
238     */
239    getWapiCertSuite() generates (SupplicantStatus status, string suite);
240
241    /**
242     * Add a pairwise master key (PMK) into supplicant PMK cache.
243     *
244     * @param serializedEntry is serialized PMK cache entry, the content is
245     *              opaque for the framework and depends on the native implementation.
246     * @return status Status of the operation
247     *         Possible status codes:
248     *         |SupplicantStatusCode.SUCCESS|,
249     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
250     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
251     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
252     */
253    setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status);
254
255    /**
256     * Set auth alg mask for the network.
257     *
258     * @param authAlgMask value to set.
259     *        Combination of |ProtoMask| values.
260     * @return status Status of the operation.
261     *         Possible status codes:
262     *         |SupplicantStatusCode.SUCCESS|,
263     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
264     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
265     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
266     */
267    setAuthAlg_1_3(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status);
268
269    /**
270     * Get the auth alg mask set for the network.
271     *
272     * @return status Status of the operation.
273     *         Possible status codes:
274     *         |SupplicantStatusCode.SUCCESS|,
275     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
276     * @return authAlgMask Combination of |AuthAlgMask| values.
277     */
278    getAuthAlg_1_3() generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
279
280    /**
281     * Enable Extensible Authentication (EAP) - Re-authentication Protocol (ERP) for this network.
282     *
283     * @param enable true to set, false otherwise.
284     * @return status Status of the operation.
285     *         Possible status codes:
286     *         |SupplicantStatusCode.SUCCESS|,
287     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
288     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
289     */
290    setEapErp(bool enable) generates (SupplicantStatus status);
291};
292