• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2018 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
17syntax = "proto2";
18package android.net.wifi;
19
20option java_outer_classname = "WifiProtoEnums";
21option java_multiple_files = true;
22
23/**
24 * Wifi Lock modes, primarily used in
25 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLockManager.java.
26 */
27enum WifiModeEnum {
28    /**
29     * Deprecated.
30     * Wi-Fi will be kept active, and will behave normally.
31     */
32    WIFI_MODE_FULL = 1 [deprecated=true];
33
34    /**
35     * Deprecated.
36     * Wi-Fi will be kept active, but the only operation that will be supported is initiation of
37     * scans, and the subsequent reporting of scan results.
38     */
39    WIFI_MODE_SCAN_ONLY = 2 [deprecated=true];
40
41    /**
42     * Deprecated. Refer {@link com.android.server.wifi.WifiManager#WIFI_MODE_FULL_HIGH_PERF}.
43     * Wi-Fi will not go to power save.
44     */
45    WIFI_MODE_FULL_HIGH_PERF = 3 [deprecated=true];
46
47    /**
48     * Wi-Fi will operate with a priority to achieve low latency.
49     */
50    WIFI_MODE_FULL_LOW_LATENCY = 4;
51}
52
53/**
54 * What permission model the caller has.
55 * Calculated with WifiPermissionsUtil#getWifiCallerType
56 */
57enum WifiCallerType {
58    UNKNOWN = 0;
59    SETTINGS = 1; // caller is SETTINGS or SETUP_WIZARD
60    ADMIN = 2; // caller is a device admin(DO/PO/DA)
61    AUTOMOTIVE = 3; // caller has automotive related permissions
62    SIGNATURE = 4;  // Caller uid must be signed with platform key
63    SYSTEM = 5; // caller is a system app
64    OTHERS = 6;  // caller is none of the above
65}
66
67/**
68 * Wifi authentication type.
69 */
70enum WifiAuthType {
71    AUTH_TYPE_NONE = 0;
72
73    // WPA pre-shared key.
74    AUTH_TYPE_WPA_PSK = 1;
75    // WPA using EAP authentication. Generally used with an external authentication server.
76    AUTH_TYPE_WPA_EAP = 2;
77    // IEEE 802.1X using EAP authentication and (optionally) dynamically generated WEP keys.
78    AUTH_TYPE_IEEE8021X = 3;
79    // WPA2 pre-shared key for use with soft access point.
80    AUTH_TYPE_WPA2_PSK = 4;
81    // Hotspot 2.0 r2 OSEN.
82    AUTH_TYPE_OSEN = 5;
83    // IEEE 802.11r Fast BSS Transition with PSK authentication.
84    AUTH_TYPE_FT_PSK = 6;
85    // IEEE 802.11r Fast BSS Transition with EAP authentication.
86    AUTH_TYPE_FT_EAP = 7;
87    // Simultaneous Authentication of Equals.
88    AUTH_TYPE_SAE = 8;
89    // Opportunistic Wireless Encryption.
90    AUTH_TYPE_OWE = 9;
91    // SUITE_B_192 192 bit level
92    AUTH_TYPE_SUITE_B_192 = 10;
93    // WPA pre-shared key with stronger SHA256-based algorithms.
94    AUTH_TYPE_WPA_PSK_SHA256 = 11;
95    // WPA using EAP authentication with stronger SHA256-based algorithms.
96    AUTH_TYPE_WPA_EAP_SHA256 = 12;
97    // WAPI pre-shared key.
98    AUTH_TYPE_WAPI_PSK = 13;
99    // WAPI certificate to be specified.
100    AUTH_TYPE_WAPI_CERT = 14;
101    // IEEE 802.11ai FILS SK with SHA256.
102    AUTH_TYPE_FILS_SHA256 = 15;
103    // IEEE 802.11ai FILS SK with SHA384.
104    AUTH_TYPE_FILS_SHA384 = 16;
105    // Simultaneous Authentication of Equals transition mode.
106    AUTH_TYPE_SAE_TRANSITION = 17;
107    // Opportunistic Wireless Encryption transition mode.
108    AUTH_TYPE_OWE_TRANSITION = 18;
109}
110
111/**
112 * Bucketed wifi band.
113 */
114enum WifiBandBucket {
115    BAND_UNKNOWN = 0;
116
117    // All of 2.4GHz band
118    BAND_2G = 1;
119    // Frequencies in the range of [5150, 5250) GHz
120    BAND_5G_LOW = 2;
121    // Frequencies in the range of [5250, 5725) GHz
122    BAND_5G_MIDDLE = 3;
123    // Frequencies in the range of [5725, 5850) GHz
124    BAND_5G_HIGH = 4;
125    // Frequencies in the range of [5925, 6425) GHz
126    BAND_6G_LOW = 5;
127    // Frequencies in the range of [6425, 6875) GHz
128    BAND_6G_MIDDLE = 6;
129    // Frequencies in the range of [6875, 7125) GHz
130    BAND_6G_HIGH = 7;
131}
132
133// Status of various Aware operations
134enum AwareStatus {
135    // unknown status
136    ST_UNKNOWN = 0;
137    // NAN operation succeeded
138    ST_SUCCESS = 1;
139    // NAN Discovery Engine/Host driver failures
140    ST_INTERNAL_FAILURE = 2;
141    // NAN OTA failures
142    ST_PROTOCOL_FAILURE = 3;
143    // The publish/subscribe discovery session id is invalid
144    ST_INVALID_SESSION_ID = 4;
145    // Out of resources to fufill request
146    ST_NO_RESOURCES_AVAILABLE = 5;
147    // Invalid arguments passed
148    ST_INVALID_ARGS = 6;
149    // Invalid peer id
150    ST_INVALID_PEER_ID = 7;
151    // Invalid NAN data-path (ndp) id
152    ST_INVALID_NDP_ID = 8;
153    // Attempting to enable NAN when not available, e.g. wifi is disabled
154    ST_NAN_NOT_ALLOWED = 9;
155    // Over the air ACK not received
156    ST_NO_OTA_ACK = 10;
157    // Attempting to enable NAN when already enabled
158    ST_ALREADY_ENABLED = 11;
159    // Can't queue tx followup message foor transmission
160    ST_FOLLOWUP_TX_QUEUE_FULL = 12;
161    // Unsupported concurrency of NAN and another feature - NAN disabled
162    ST_UNSUPPORTED_CONCURRENCY = 13;
163    // Other failures
164    ST_GENERIC_FAILURE = 14;
165}
166
167/**
168 * Soft AP Role
169 */
170enum SoftApRole {
171    // Unknown
172    ROLE_UNKNOWN = 0;
173    // Tethering AP
174    ROLE_TETHERING = 1;
175    // Local-only AP
176    ROLE_LOCAL_ONLY = 2;
177}
178
179/**
180 * Device support for STA + AP concurrency
181 */
182enum StaApConcurrency {
183    // Unknown
184    STA_AP_CONCURRENCY_UNKNOWN = 0;
185    // STA + AP concurrency unsupported
186    STA_AP_CONCURRENCY_UNSUPPORTED = 1;
187    // STA + Single AP concurrency supported
188    STA_AP_CONCURRENCY_SINGLE = 2;
189    // STA + Bridged AP concurrency supported
190    STA_AP_CONCURRENCY_DBS = 3;
191}
192
193/**
194 * Connection status of the existing primary STA
195 */
196enum StaStatus {
197    // Unknown
198    STA_STATUS_UNKNOWN = 0;
199    // STA is disconnected
200    STA_STATUS_DISCONNECTED = 1;
201    // STA is connected via 2.4GHz band
202    STA_STATUS_CONNECTED_2_GHZ = 2;
203    // STA is connected via 5GHz band
204    STA_STATUS_CONNECTED_5_GHZ = 3;
205    // STA is connected via 6GHz band
206    STA_STATUS_CONNECTED_6_GHZ = 4;
207}
208
209enum EapType {
210    // Unknown Type
211    TYPE_UNKNOWN = 0;
212    // EAP_TLS (13)
213    TYPE_EAP_TLS = 1;
214    // EAP_TTLS (21)
215    TYPE_EAP_TTLS = 2;
216    // EAP_SIM (18)
217    TYPE_EAP_SIM = 3;
218    // EAP_AKA (23)
219    TYPE_EAP_AKA = 4;
220    // EAP_AKA_PRIME (50)
221    TYPE_EAP_AKA_PRIME = 5;
222    TYPE_EAP_WAPI_CERT = 6;
223    TYPE_EAP_UNAUTH_TLS = 7;
224    TYPE_EAP_PEAP = 8;
225    TYPE_EAP_PWD = 9;
226    TYPE_EAP_OTHERS = 10;
227}
228
229enum EapInnerMethod {
230    METHOD_UNKNOWN = 0;
231    METHOD_PAP = 1;
232    METHOD_MSCHAP = 2;
233    METHOD_MSCHAP_V2 = 3;
234    METHOD_OTHERS = 4;
235    // Generic Token Card
236    METHOD_GTC = 5;
237    // EAP-Subscriber Identity Module [RFC-4186]
238    METHOD_SIM = 6;
239    // EAP-Authentication and Key Agreement [RFC-4187]
240    METHOD_AKA = 7;
241    // EAP-Authentication and Key Agreement Prime [RFC-5448]
242    METHOD_AKA_PRIME = 8;
243}
244
245enum RoamingType {
246    ROAMING_UNKNOWN = 0;
247    // Not a Passpoint network
248    ROAMING_NOT_PASSPOINT = 1;
249    // Non-Roaming
250    ROAMING_NONE = 2;
251    // Other RCOI Roaming
252    ROAMING_RCOI_OTHERS = 3;
253    // Free OpenRoaming
254    ROAMING_RCOI_OPENROAMING_FREE = 4;
255    // Settled OpenRoaming
256    ROAMING_RCOI_OPENROAMING_SETTLED = 5;
257    // Not RCOI roaming
258    ROAMING_NOT_RCOI = 6;
259}
260
261/**
262 * Wi-Fi Standards
263 */
264enum WifiStandard {
265    // Unknown
266    WIFI_STANDARD_UNKNOWN = 0;
267    // Wi-Fi 802.11a/b/g
268    WIFI_STANDARD_LEGACY = 1;
269    // Wi-Fi 802.11n
270    WIFI_STANDARD_11N = 2;
271    // Wi-Fi 802.11ac
272    WIFI_STANDARD_11AC = 3;
273    // Wi-Fi 802.11ax
274    WIFI_STANDARD_11AX = 4;
275    // Wi-Fi 802.11ad
276    WIFI_STANDARD_11AD = 5;
277    // Wi-Fi 802.11be
278    WIFI_STANDARD_11BE = 6;
279}
280
281/**
282 * Role of the client mode manager
283 */
284enum ClientModeRole {
285    ROLE_UNSPECIFIED = 0;
286    ROLE_CLIENT_PRIMARY = 1;
287    ROLE_CLIENT_SECONDARY_LONG_LIVED = 2;
288    ROLE_CLIENT_SECONDARY_TRANSIENT = 3;
289    ROLE_CLIENT_SECONDARY_INTERNET = 4;
290    ROLE_CLIENT_LOCAL_ONLY = 5;
291    ROLE_CLIENT_OTHERS = 6;
292}
293
294/**
295 * Aware HAL API
296 */
297enum AwareHalApi {
298    AWARE_API_UNKNOWN = 0;
299    AWARE_CONFIG_REQUEST = 1;
300    AWARE_CREATE_DATA_INTERFACE_REQUEST = 2;
301    AWARE_DELETE_DATA_INTERFACE_REQUEST = 3;
302    AWARE_DISABLE_REQUEST = 4;
303    AWARE_ENABLE_REQUEST = 5;
304    AWARE_GET_CAPABILITIES_REQUEST = 6;
305    AWARE_INITIATE_DATA_PATH_REQUEST = 7;
306    AWARE_REGISTER_EVENT_CALLBACK = 8;
307    AWARE_RESPOND_TO_DATA_PATH_INDICATION_REQUEST = 9;
308    AWARE_START_PUBLISH_REQUEST = 10;
309    AWARE_START_SUBSCRIBE_REQUEST = 11;
310    AWARE_STOP_PUBLISH_REQUEST = 12;
311    AWARE_STOP_SUBSCRIBE_REQUEST = 13;
312    AWARE_TERMINATE_DATA_PATH_REQUEST = 14;
313    AWARE_SUSPEND_REQUEST = 15;
314    AWARE_RESUME_REQUEST = 16;
315    AWARE_TRANSMIT_FOLLOW_UP_REQUEST = 17;
316    AWARE_INITIATE_PAIRING_REQUEST = 18;
317    AWARE_RESPOND_TO_PAIRING_INDICATION_REQUEST = 19;
318    AWARE_INITIATE_BOOTSTRAPPING_REQUEST = 20;
319    AWARE_RESPOND_TO_BOOTSTRAPPING_INDICATION_REQUEST = 21;
320    AWARE_TERMINATE_PAIRING_REQUEST = 22;
321}
322
323/**
324 * Wi-Fi Security modes defined by the combinations of cipher suite, AKM and PMF
325 */
326enum SecurityMode {
327    SECURITY_MODE_UNKNOWN = 0;
328    SECURITY_MODE_INVALID = 1;
329    SECURITY_MODE_WPA3_ENTERPRISE_192_BIT = 2;
330    SECURITY_MODE_WPA3_ENTERPRISE = 3;
331    SECURITY_MODE_WPA3_PERSONAL = 4;
332    SECURITY_MODE_WPA3_WPA2_PERSONAL_TRANSITION = 5;
333    SECURITY_MODE_DPP = 6;
334    SECURITY_MODE_WPA2_PERSONAL = 7;
335    SECURITY_MODE_WPA2_WPA_PERSONAL_TRANSITION = 8;
336    SECURITY_MODE_WAPI_CERT = 9;
337    SECURITY_MODE_WAPI_PSK = 10;
338    SECURITY_MODE_WPA_ENTERPRISE_LEGACY = 11;
339    SECURITY_MODE_WPA_PERSONAL_LEGACY = 12;
340    SECURITY_MODE_OWE = 13;
341    SECURITY_MODE_OWE_TRANSITION = 14;
342    SECURITY_MODE_WEP = 15;
343    SECURITY_MODE_NONE = 16;
344}
345
346enum TofuConfiguration {
347    // Default value.
348    TOFU_CONFIGURATION_UNSPECIFIED = 0;
349    // TOFU is not enabled on the enterprise config.
350    TOFU_CONFIGURATION_NOT_ENABLED = 1;
351    // TOFU is enabled pre-connection.
352    TOFU_CONFIGURATION_ENABLED_PRE_CONNECTION = 2;
353    // Root CA was configured post-TOFU connection.
354    TOFU_CONFIGURATION_CONFIGURE_ROOT_CA = 3;
355    // Certificate pinning was used post-TOFU connection.
356    TOFU_CONFIGURATION_CERT_PINNING = 4;
357}
358
359/**
360 * Passpoint release versions
361 */
362enum PasspointRelease {
363  PASSPOINT_RELEASE_UNKNOWN = 0;
364  PASSPOINT_RELEASE_1 = 1;
365  PASSPOINT_RELEASE_2 = 2;
366  PASSPOINT_RELEASE_3 = 3;
367}
368
369/**
370 * Wi-Fi usability state as predicted by the network scorer
371 */
372enum WifiPredictedUsabilityState {
373   WIFI_USABILITY_PREDICTED_UNKNOWN = 0;
374   WIFI_USABILITY_PREDICTED_USABLE = 1;
375   WIFI_USABILITY_PREDICTED_UNUSABLE = 2;
376   // Scorer doesn't predict or the prediction isn't for the current session.
377   WIFI_USABILITY_PREDICTED_NONE = 3;
378 }
379
380/**
381 * Wi-Fi channel width
382 */
383enum WifiChannelWidth {
384  CHANNEL_WIDTH_UNKNOWN = 0;
385  CHANNEL_WIDTH_20MHZ = 1;
386  CHANNEL_WIDTH_40MHZ = 2;
387  CHANNEL_WIDTH_80MHZ = 3;
388  CHANNEL_WIDTH_160MHZ = 4;
389  CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 5;
390  CHANNEL_WIDTH_320MHZ = 6;
391}
392