1/* 2 * Copyright (C) 2023 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"; 18 19package android.os.statsd.wifi; 20 21import "frameworks/proto_logging/stats/atom_field_options.proto"; 22import "frameworks/proto_logging/stats/atoms.proto"; 23import "frameworks/proto_logging/stats/enums/stats/connectivity/network_stack.proto"; 24import "frameworks/proto_logging/stats/enums/wifi/enums.proto"; 25import "frameworks/proto_logging/stats/attribution_node.proto"; 26 27option java_package = "com.android.os.wifi"; 28option java_multiple_files = true; 29 30extend Atom { 31 // Push metrics 32 optional WifiAwareNdpReported wifi_aware_ndp_reported = 638 [(module) = "wifi"]; 33 optional WifiAwareAttachReported wifi_aware_attach_reported = 639 [(module) = "wifi"]; 34 optional WifiSelfRecoveryTriggered wifi_self_recovery_triggered = 661 [(module) = "wifi"]; 35 optional SoftApStarted soft_ap_started = 680 [(module) = "wifi"]; 36 optional SoftApStopped soft_ap_stopped = 681 [(module) = "wifi"]; 37 optional WifiLockReleased wifi_lock_released = 687 [(module) = "wifi"]; 38 optional WifiLockDeactivated wifi_lock_deactivated = 688 [(module) = "wifi"]; 39 optional WifiConfigSaved wifi_config_saved = 689 [(module) = "wifi"]; 40 optional WifiAwareResourceUsingChanged wifi_aware_resource_using_changed 41 = 690 [(module) = "wifi"]; 42 optional WifiAwareHalApiCalled wifi_aware_hal_api_called = 691 [(module) = "wifi"]; 43 optional WifiLocalOnlyRequestReceived wifi_local_only_request_received 44 = 692 [(module) = "wifi"]; 45 optional WifiLocalOnlyRequestScanTriggered wifi_local_only_request_scan_triggered 46 = 693 [(module) = "wifi"]; 47 optional WifiThreadTaskExecuted wifi_thread_task_executed = 694 [(module) = "wifi"]; 48 optional WifiStateChanged wifi_state_changed = 700 [(module) = "wifi"]; 49 optional PnoScanStarted pno_scan_started = 719 [(module) = "wifi"]; 50 optional PnoScanStopped pno_scan_stopped = 720 [(module) = "wifi"]; 51 optional WifiIsUnusableReported wifi_is_unusable_reported = 722 [(module) = "wifi"]; 52 optional WifiApCapabilitiesReported wifi_ap_capabilities_reported= 723 [(module) = "wifi"]; 53 optional SoftApStateChanged soft_ap_state_changed = 805 [(module) = "wifi"]; 54 optional ScorerPredictionResultReported scorer_prediction_result_reported = 884 [(module) = "wifi"]; 55 56 // Pull metrics 57 optional WifiAwareCapabilities wifi_aware_capabilities = 10190 [(module) = "wifi"]; 58 optional WifiModuleInfo wifi_module_info = 10193 [(module) = "wifi"]; 59 optional WifiSettingInfo wifi_setting_info = 10194 [(module) = "wifi"]; 60 optional WifiComplexSettingInfo wifi_complex_setting_info = 10195 [(module) = "wifi"]; 61 optional WifiConfiguredNetworkInfo wifi_configured_network_info = 10198 [(module) = "wifi"]; 62} 63 64/** 65 * Pulled atom for tracking wifi version number. 66 */ 67message WifiModuleInfo { 68 enum BuildType { 69 TYPE_UNKNOWN = 0; 70 TYPE_BUILT_FROM_SOURCE = 1; 71 TYPE_PREBUILT = 2; 72 } 73 // Version number of the wifi module 74 optional int32 version_number = 1; 75 // The type of the wifi module 76 optional BuildType build_type = 2; 77} 78 79 80/** 81 * Logged when wifi aware data path is completed 82 */ 83message WifiAwareNdpReported { 84 enum Role { 85 ROLE_UNKNOWN = 0; 86 ROLE_INITIATOR = 1; 87 ROLE_RESPONDER = 2; 88 } 89 // Role of data path 90 optional Role role = 1; 91 // If it is over out-of-band 92 optional bool is_out_of_band = 2; 93 // Status of NDP 94 optional android.net.wifi.AwareStatus status = 3; 95 // Duration to create NDP in millis. 96 optional int32 ndp_latency_ms= 4; 97 // The latency of discovery + NDP in millis. 98 optional int32 discovery_ndp_latency_ms= 5; 99 // Channel frequency in MHz, 0 if unavailable, >= 2400 otherwise. 100 optional int32 channel_frequency_mhz= 6; 101 // If the instant mode is enabled 102 optional bool is_instant_mode = 7; 103 // The caller type of the NDP request 104 optional android.net.wifi.WifiCallerType caller_type = 8; 105 // The Attribution tag to identify the caller 106 optional string attribution_tag = 9; 107 // The uid of the caller 108 optional int32 uid = 10 [(is_uid) = true]; 109} 110 111/** 112 * Logged when wifi aware attach is completed 113 */ 114message WifiAwareAttachReported { 115 // Status of attach 116 optional android.net.wifi.AwareStatus status = 1; 117 // The caller type of the attach 118 optional android.net.wifi.WifiCallerType caller_type = 2; 119 // The Attribution tag to identify the caller 120 optional string attribution_tag = 3; 121 // The uid of the caller 122 optional int32 uid = 4 [(is_uid) = true]; 123} 124 125/** 126 * Logged when wifi self recovery triggered 127 */ 128message WifiSelfRecoveryTriggered { 129 enum Reason { 130 REASON_UNKNOWN = 0; 131 REASON_LAST_RESORT_WDOG = 1; 132 REASON_WIFINATIVE_FAILURE = 2; 133 REASON_STA_IFACE_DOWN = 3; 134 REASON_API_CALL = 4; 135 REASON_SUBSYSTEM_RESTART = 5; 136 REASON_IFACE_ADDED = 6; 137 } 138 enum Result { 139 RES_UNSPECIFIED = 0; 140 RES_RESTART_SUCCESS = 1; 141 RES_INVALID_REASON = 2; 142 RES_IFACE_DOWN = 3; 143 RES_IFACE_ADD_DISABLED = 4; 144 RES_RETRY_DISABLED = 5; 145 RES_ABOVE_MAX_RETRY = 6; 146 RES_RESTART_FAILURE = 7; 147 RES_RESTART_STARTED_INTERNAL_RECOVERY = 8; 148 RES_RESTART_STARTED_INTERNAL_RECOVERY_BY_NATIVE_CALLBACK = 9; 149 } 150 151 // Trigger reason 152 optional Reason reason = 1; 153 // Self recovery result 154 optional Result result = 2; 155 // Record time elapsed from last trigger event 156 optional int64 time_elapsed_from_last_millis = 3; 157} 158 159/** 160 * Logged when SoftAp is started or stopped. 161 */ 162message SoftApStateChanged { 163 enum HotspotState { 164 // Unknown - reserved field for invalid data 165 STATE_UNKNOWN = 0; 166 167 // SoftAp is on 168 STATE_OFF = 1; 169 170 // SoftAp is off 171 STATE_ON = 2; 172 } 173 174 // New hotspot state. 175 optional HotspotState hotspot_on = 1 [ 176 (state_field_option).exclusive_state = true, 177 (state_field_option).nested = false 178 ]; 179} 180 181/** 182 * Logged when Soft AP is started 183 */ 184message SoftApStarted { 185 /** 186 * Result of starting Soft AP 187 */ 188 enum StartResult { 189 // Unknown 190 START_RESULT_UNKNOWN = 0; 191 // Successful start 192 START_RESULT_SUCCESS = 1; 193 // General failure 194 START_RESULT_FAILURE_GENERAL = 2; 195 // Failed due to no channel available 196 START_RESULT_FAILURE_NO_CHANNEL = 3; 197 // Failed due to config being unsupported 198 START_RESULT_FAILURE_UNSUPPORTED_CONFIG = 4; 199 // Failed to start the HAL 200 START_RESULT_FAILURE_START_HAL = 5; 201 // Failed to start hostapd 202 START_RESULT_FAILURE_START_HOSTAPD = 6; 203 // Failed due to interface conflict with user rejection 204 START_RESULT_FAILURE_INTERFACE_CONFLICT_USER_REJECTED = 7; 205 // Failed due to interface conflict 206 START_RESULT_FAILURE_INTERFACE_CONFLICT = 8; 207 // Failed to create interface in vendor HAL 208 START_RESULT_FAILURE_CREATE_INTERFACE = 9; 209 // Failed to set country code 210 START_RESULT_FAILURE_SET_COUNTRY_CODE = 10; 211 // Failed to set mac address 212 START_RESULT_FAILURE_SET_MAC_ADDRESS = 11; 213 // Failed to register AP callback with hostapd 214 START_RESULT_FAILURE_REGISTER_AP_CALLBACK_HOSTAPD = 12; 215 // Failed to register AP callback with wificond 216 START_RESULT_FAILURE_REGISTER_AP_CALLBACK_WIFICOND = 13; 217 // Failed to add AP to hostapd 218 START_RESULT_FAILURE_ADD_AP_HOSTAPD = 14; 219 } 220 // Result of the start event 221 optional StartResult result = 1; 222 // Role of the Soft AP 223 optional android.net.wifi.SoftApRole role = 2; 224 // First band bitmask indexed by WifiBandBucket 225 optional int32 band1 = 3; 226 // Second band bitmask indexed by WifiBandBucket 227 optional int32 band2 = 4; 228 // Whether DBS is supported or not 229 optional bool dbs_supported = 5; 230 // STA + AP concurrency capability of the device 231 optional android.net.wifi.StaApConcurrency sta_ap_concurrency = 6; 232 // STA connection status at the time of starting 233 optional android.net.wifi.StaStatus sta_status = 7; 234 // Authentication type of the Soft AP 235 optional android.net.wifi.WifiAuthType auth_type = 8; 236} 237 238/** 239 * Logged when Soft AP is stopped 240 */ 241message SoftApStopped { 242 /** 243 * Type of Soft AP stop event 244 */ 245 enum StopEvent { 246 // Unknown 247 STOP_EVENT_UNKNOWN = 0; 248 // Stopped by the user 249 STOP_EVENT_STOPPED = 1; 250 // Stopped due to interface down 251 STOP_EVENT_INTERFACE_DOWN = 2; 252 // Stopped due to interface destroyed 253 STOP_EVENT_INTERFACE_DESTROYED = 3; 254 // Stopped due to hostapd failure 255 STOP_EVENT_HOSTAPD_FAILURE = 4; 256 // Stopped due to no usage timeout 257 STOP_EVENT_NO_USAGE_TIMEOUT = 5; 258 } 259 // Soft AP stop event 260 optional StopEvent stop_event = 1; 261 // Role of the Soft AP 262 optional android.net.wifi.SoftApRole role = 2; 263 // Band of the Soft AP at the time of stopping 264 optional int32 band = 3; 265 // Whether the Soft AP is DBS 266 optional bool is_dbs = 4; 267 // STA + AP concurrency capability of the device 268 optional android.net.wifi.StaApConcurrency sta_ap_concurrency = 5; 269 // STA connection status at the time of stopping 270 optional android.net.wifi.StaStatus sta_status = 6; 271 // Whether or not the no usage timeout is enabled 272 optional bool is_timeout_enabled = 7; 273 // Duration of the session in seconds 274 optional int32 session_duration_seconds = 8; 275 // Authentication type of the Soft AP 276 optional android.net.wifi.WifiAuthType auth_type = 9; 277 // Wi-Fi standard of the Soft AP 278 optional android.net.wifi.WifiStandard standard = 10; 279 // Max num of associated clients for the entire session 280 optional int32 max_clients = 11; 281 // Whether or not the opportunistic no usage timeout for DBS is enabled 282 optional bool is_dbs_timeout_enabled = 12; 283 // Band of the DBS instance that failed, if any 284 optional int32 dbs_instance_failure_band = 13; 285 // Band of the DBS instance that timed out, if any 286 optional int32 dbs_instance_timeout_band = 14; 287 // Upstream transport type at the time of stopping 288 optional android.stats.connectivity.TransportType upstream_transport = 15; 289} 290 291/** 292 * Logged when wifi lock is released 293 */ 294message WifiLockReleased { 295 // The AttributionNode to identify the caller 296 repeated AttributionNode attribution_node = 1; 297 // Permission model of the caller 298 optional android.net.wifi.WifiCallerType caller_type = 2; 299 // Lock mode 300 optional android.net.wifi.WifiModeEnum mode = 3; 301 // For how long the lock is acquired in milliseconds 302 optional int64 acquired_duration_ms = 4; 303 // Whether power save disable is allowed during lock acquire 304 optional bool is_powersave_disable_allowed = 5; 305 // Whether the application which acquired the lock is exempted from screen ON 306 optional bool is_app_exempted_from_screen_on = 6; 307 // Whether the application which acquired the lock is exempted from being foreground 308 optional bool is_app_exempted_from_foreground = 7; 309} 310 311/** 312 * Logged when wifi lock is deactivated 313 */ 314message WifiLockDeactivated { 315 // The AttributionNode to identify the caller 316 repeated AttributionNode attribution_node = 1; 317 // Lock mode 318 optional android.net.wifi.WifiModeEnum mode = 2; 319 // For how long the lock is activated in milliseconds 320 optional int64 activated_duration_ms = 3; 321 // Whether power save disable is allowed during the lock activation 322 optional bool is_powersave_disable_allowed = 4; 323 // Whether the application which activated the lock is exempted from screen ON 324 optional bool is_exempted_from_screen_on = 5; 325 // Whether the application which activated the lock is exempted from being foreground 326 optional bool is_exempted_from_foreground = 6; 327} 328 329/** 330 * Pull metrics for the Wifi Aware capabilities supported by the device 331 */ 332message WifiAwareCapabilities { 333 // If instant mode supported 334 optional bool is_instant_mode_supported = 1; 335 // If pairing supported 336 optional bool is_pairing_supported = 2; 337 // If suspension supported 338 optional bool is_suspension_supported = 3; 339 // Supported cipher suites 340 optional int32 cipher_suites = 4; 341 // Max number of the NDI 342 optional int32 ndi_number = 5; 343 // Max number of the NDP 344 optional int32 ndp_number = 6; 345 // Max number of the discovery session 346 optional int32 discovery_session_number = 7; 347} 348 349// Logged when the Wifi Aware resources is used by Apps 350message WifiAwareResourceUsingChanged { 351 optional int32 ndp_num = 1; 352 optional int32 discovery_session_num = 2; 353} 354 355/** 356 * Logged when Aware HAL API is called and send response 357 */ 358message WifiAwareHalApiCalled { 359 // The API name 360 optional android.net.wifi.AwareHalApi command = 1; 361 // Status of the API call 362 optional android.net.wifi.AwareStatus status = 2; 363 // The time for this API call to execute 364 optional int32 running_time_ms = 3; 365} 366 367/** 368 * Logged when local-only request received 369 */ 370message WifiLocalOnlyRequestReceived { 371 enum UserAction { 372 USER_UNSPECIFIED = 0; 373 USER_BYPASS = 1; 374 USER_ACCEPT = 2; 375 USER_REJECT = 3; 376 } 377 // The AttributionNode to identify the caller 378 repeated AttributionNode attribution_node = 1; 379 // User action on the local-only request 380 optional UserAction action = 2; 381 // The caller type of the request 382 optional android.net.wifi.WifiCallerType caller_type = 3; 383} 384 385// Logged when matched scan result received for local only request 386message WifiLocalOnlyRequestScanTriggered { 387 // The AttributionNode to identify the caller 388 repeated AttributionNode attribution_node = 1; 389 // How many channel specified in the request 390 optional int32 number_channel_specified = 2; 391 // Scan time to get a match 392 optional int32 match_delay_ms = 3; 393 // The caller type of the request 394 optional android.net.wifi.WifiCallerType caller_type = 4; 395} 396 397// Logged when a task on the Wifi thread is executed 398message WifiThreadTaskExecuted { 399 // How long does it take to execute the task 400 optional int32 running_time_ms = 1; 401 // How long does it take to start execute the task 402 optional int32 blocking_time_ms = 2; 403 // The name of the internal task running on Wifi Thread 404 optional string task_name = 3; 405} 406 407// Logged when Wifi config save to storage triggered 408message WifiConfigSaved { 409 // How long does it cost to save all config 410 optional int32 running_time_ms = 1; 411} 412 413// Logged when Wi-Fi state change happens. 414message WifiStateChanged { 415 // If Wi-Fi was enabled 416 optional bool wifi_enabled = 1; 417 // If Wi-Fi Wake feature was enabled 418 optional bool wifi_wake_enabled = 2; 419 // If the state change was due to Wi-Fi Wake 420 optional bool enabled_by_wifi_wake = 3; 421} 422 423// Logged when a PNO scan is started. 424message PnoScanStarted { 425 // Whether this scan includes Passpoint SSIDs 426 optional bool includes_passpoint_ssids = 1; 427} 428 429// Logged when a PNO scan is stopped. 430message PnoScanStopped { 431 enum StopReason { 432 UNSPECIFIED = 0; 433 SCAN_FAILED = 1; 434 FOUND_RESULTS = 2; 435 } 436 437 enum FailureCode { 438 // Default value. Error is unknown 439 UNSPECIFIED_FAILURE = 0; 440 // No error occurred 441 NO_FAILURE = 1; 442 // Wificond scan returned a failure 443 WIFICOND_SCAN_FAILURE = 2; 444 // An error occurred while requesting the wificond scan 445 WIFICOND_REQUEST_FAILURE = 3; 446 // WifiScanningService returned a failure 447 WIFI_SCANNING_SERVICE_FAILURE = 4; 448 } 449 450 // Reason that this scan stopped 451 optional StopReason stop_reason = 1; 452 // Number of results found by this scan 453 optional int32 num_results = 2; 454 // Whether we were scanning for Passpoint SSIDs 455 optional bool scanned_for_passpoint_ssids = 3; 456 // Whether any Passpoint results were found 457 optional bool includes_passpoint_results = 4; 458 // Whether this scan led to the selection of a connection candidate 459 optional bool candidate_selected = 5; 460 // Whether the connection candidate is a Passpoint network 461 optional bool candidate_is_passpoint = 6; 462 // Failure code if this scan stopped due to a failure 463 optional FailureCode failure_code = 7; 464} 465 466/** 467 * Pulled to indicate a single boolean Wifi setting. 468 */ 469message WifiSettingInfo { 470 enum SettingName { 471 UNSPECIFIED = 0; 472 WIFI_SCAN_ALWAYS_AVAILABLE = 1; 473 WIFI_SCAN_THROTTLE = 2; 474 WIFI_SCORING = 3; 475 WIFI_PASSPOINT = 4; 476 WIFI_WAKE = 5; 477 WIFI_ENHANCED_MAC_RANDOMIZATION = 6; 478 WIFI_NETWORKS_AVAILABLE_NOTIFICATION = 7; 479 LOCATION_MODE = 8; 480 } 481 482 // Name of the Wifi setting 483 optional SettingName setting_name = 1; 484 // Whether the setting is enabled 485 optional bool enabled = 2; 486} 487 488/** 489 * Pulled to indicate a single non-boolean Wifi setting. 490 */ 491message WifiComplexSettingInfo { 492 enum MultiInternetMode { 493 // Default value. Mode is unknown. 494 MULTI_INTERNET_MODE_UNSPECIFIED = 0; 495 // Simultaneous connection to multiple APs is disabled 496 MULTI_INTERNET_MODE_DISABLED = 1; 497 // Enabled but restricted to a single network on multiple bands 498 MULTI_INTERNET_MODE_DBS_AP = 2; 499 // Enabled and allowed to connect to multiple APs using different bands 500 MULTI_INTERNET_MODE_MULTI_AP = 3; 501 } 502 503 // Wifi multi-internet mode 504 optional MultiInternetMode multi_internet_mode = 1; 505} 506 507/** 508 * Logged for every Wi-Fi unusable event. 509 */ 510message WifiIsUnusableReported { 511 enum ReportType { 512 // Default/Invalid 513 TYPE_UNKNOWN = 0; 514 // There is a data stall from tx failures 515 TYPE_DATA_STALL_BAD_TX = 1; 516 // There is a data stall from rx failures 517 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 518 // There is a data stall from both tx and rx failures 519 TYPE_DATA_STALL_BOTH = 3; 520 // Firmware generated an alert 521 TYPE_FIRMWARE_ALERT = 4; 522 // IP Manager lost reachability to network neighbors 523 TYPE_IP_REACHABILITY_LOST = 5; 524 } 525 // Type of this report 526 optional ReportType type = 1; 527 // External scorer UID if external scorer is enabled. Otherwise WIFI_UID for 528 // AOSP scorer. 529 optional int32 scorer_uid = 2 [(is_uid) = true]; 530 // Whether or not Wi-Fi is predicted as usable by the scorer 531 // Note: 'is_wifi_predicted_as_usable' is deprectaed by 'wifi_predicted_usability_state'. 532 optional bool is_wifi_predicted_as_usable = 3; 533 // Wi-Fi usability state as predicted by the scorer 534 optional android.net.wifi.WifiPredictedUsabilityState wifi_predicted_usability_state = 4; 535} 536 537/** 538 * AP capabilities logged for every Wi-Fi connection 539 */ 540message WifiApCapabilitiesReported { 541 /** 542 * Online certificate status protocol stapling type 543 */ 544 enum OcspType { 545 TYPE_OCSP_UNKNOWN = 0; 546 // Do not use OCSP stapling 547 TYPE_OCSP_NONE = 1; 548 // Try to use OCSP stapling, but not require response 549 TYPE_OCSP_REQUEST_CERT_STATUS = 2; 550 // Require valid OCSP stapling response 551 TYPE_OCSP_REQUIRE_CERT_STATUS = 3; 552 // Require valid OCSP stapling response for all not-trusted certificates 553 // in the server certificate chain 554 TYPE_OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 4; 555 } 556 557 /** 558 * 6 GHz AP type as encoded in 'HE operation -> 6 GHz operation info -> Control -> 559 * Regulatory info' 560 */ 561 enum ApType6GHz { 562 AP_TYPE_6HZ_UNKNOWN = 0; 563 AP_TYPE_6GHZ_INDOOR = 1; 564 AP_TYPE_6GHZ_STANDARD_POWER = 2; 565 AP_TYPE_6GHZ_LOW_POWER_INDOOR = 3; 566 AP_TYPE_6GHZ_VERY_LOW_POWER = 4; 567 } 568 569 // Whether roaming is initiated by the framework to connect this AP 570 optional bool is_framework_initiated_roaming = 1; 571 // The center frequency of the primary 20 MHz frequency (in MHz) of the channel over which the 572 // connection was made. 573 optional int32 channel_frequency_mhz = 2; 574 // Band of the channel_frequency_mhz 575 optional android.net.wifi.WifiBandBucket band_mhz = 3; 576 // The DTIM period (in beacon periods) of the AP 577 optional int32 dtimPeriod = 4; 578 // Security mode of the connection 579 optional android.net.wifi.SecurityMode connected_security_mode = 5; 580 // Whether AP is hidden 581 optional bool is_hidden = 6; 582 // Whether the AP is configured incorrectly as hidden by the user 583 optional bool is_incorrectly_configured_as_hidden = 7; 584 // Wi-Fi standard of the connection 585 optional android.net.wifi.WifiStandard standard = 8; 586 // Whether IEEE 802.11b supported by the AP 587 optional bool is_11b_supported = 9; 588 // EAP type used by the AP 589 optional android.net.wifi.EapType eap_type = 10; 590 // EAP inner method used by the AP 591 optional android.net.wifi.EapInnerMethod eap_inner_method = 11; 592 // OCSP used by the AP 593 optional OcspType ocsp_type = 12; 594 // Whether the AP enabled PMK caching 595 optional bool is_pmk_caching_enabled = 13; 596 // Whether AP supports MBO 597 optional bool is_mbo_supported = 14; 598 // Whether AP supports OCE 599 optional bool is_oce_supported = 15; 600 // Whether the AP supports FILS 601 optional bool is_fils_supported = 16; 602 // Whether AP requires TWT support (individual or broadcast) 603 optional bool is_twt_required = 17; 604 // Whether the AP supports individual TWT agreements 605 optional bool is_individual_twt_supported = 18; 606 // Whether the AP supports broadcast TWT agreements 607 optional bool is_broadcast_twt_supported = 19; 608 // Whether the AP supports restricted TWT agreements 609 optional bool is_restricted_twt_supported = 20; 610 // Whether the AP supports IEEE 802.11mc 611 optional bool is_11mc_supported = 21; 612 // Whether the AP supports IEEE 802.11az 613 optional bool is_11az_supported = 22; 614 // Passpoint release version if a Passpoint connection, otherwise PassPointRelease.UNKNOWN 615 optional android.net.wifi.PasspointRelease passpoint_release = 23; 616 // If the Passpoint connection is provided by the Home provider or Roaming/visited network 617 optional bool is_passpoint_home_provider = 24; 618 // 6 GHz AP type 619 optional ApType6GHz ap_type_6ghz = 25; 620 // Whether AP supports ECPS priority access 621 optional bool is_ecps_priority_access_supported = 26; 622 // AP channel width for the connection 623 optional android.net.wifi.WifiChannelWidth channel_width_mhz = 27; 624} 625 626/* 627 * Pulled to indicate a single configured network on the device. 628 */ 629message WifiConfiguredNetworkInfo { 630 enum MacRandomization { 631 // Default value. Mode is unknown 632 MAC_RANDOMIZATION_UNSPECIFIED = 0; 633 // Factory MAC is used when connecting to this network 634 MAC_RANDOMIZATION_NONE = 1; 635 // Randomized MAC is generated once and reused for all connections to this network 636 MAC_RANDOMIZATION_PERSISTENT = 2; 637 // Randomized MAC is used and is not persisted across connections to this network 638 MAC_RANDOMIZATION_NON_PERSISTENT = 3; 639 // Framework decides on the MAC randomization strategy 640 MAC_RANDOMIZATION_AUTO = 4; 641 } 642 643 enum MeteredOverride { 644 // Default value. Mode is unknown 645 METERED_OVERRIDE_UNSPECIFIED = 0; 646 // No metered override 647 METERED_OVERRIDE_NONE = 1; 648 // Override network to be metered 649 METERED_OVERRIDE_METERED = 2; 650 // Override network to be unmetered 651 METERED_OVERRIDE_NOT_METERED = 3; 652 } 653 654 enum TofuConfiguration { 655 // Default value. 656 TOFU_CONFIGURATION_UNSPECIFIED = 0; 657 // TOFU is not enabled on the enterprise config. 658 TOFU_CONFIGURATION_NOT_ENABLED = 1; 659 // TOFU is enabled pre-connection. 660 TOFU_CONFIGURATION_ENABLED_PRE_CONNECTION = 2; 661 // Root CA was configured post-TOFU connection. 662 TOFU_CONFIGURATION_CONFIGURE_ROOT_CA = 3; 663 // Certificate pinning was used post-TOFU connection. 664 TOFU_CONFIGURATION_CERT_PINNING = 4; 665 } 666 667 enum TofuDialogState { 668 // Default value. 669 TOFU_DIALOG_STATE_UNSPECIFIED = 0; 670 // Dialog was rejected by the user. 671 TOFU_DIALOG_STATE_REJECTED = 1; 672 // Dialog was accepted by the user. 673 TOFU_DIALOG_STATE_ACCEPTED = 2; 674 } 675 676 // Unique ID for this network 677 optional int64 network_id = 1; 678 // Whether this is an Enterprise network 679 optional bool is_enterprise = 2; 680 // Whether this is a hidden network 681 optional bool is_hidden = 3; 682 // Whether this is a Passpoint network 683 optional bool is_passpoint = 4; 684 // Whether this is a suggestion network 685 optional bool is_suggestion = 5; 686 // Whether this network has a UTF-8 SSID 687 optional bool is_utf_8_ssid = 6; 688 // Whether the SSID translation feature is enabled 689 optional bool is_ssid_translation_enabled = 7; 690 // Whether this network was configured using TOFU 691 optional bool configured_using_tofu = 8; 692 // Whether this network has encountered a captive portal 693 optional bool encountered_captive_portal = 9; 694 // Whether this network has auto-join enabled 695 optional bool auto_join_enabled = 10; 696 // Security mode used by this network 697 optional android.net.wifi.SecurityMode connected_security_mode = 11; 698 // MAC randomization setting used by this network 699 optional MacRandomization mac_randomization = 12; 700 // Metered override setting used by this network 701 optional MeteredOverride metered_override = 13; 702 // EAP type used by this network 703 optional android.net.wifi.EapType eap_type = 14; 704 // EAP inner authentication method used by this network 705 optional android.net.wifi.EapInnerMethod eap_inner_auth_method = 15; 706 // Whether this network supports free OpenRoaming 707 optional bool free_open_roaming_supported = 16; 708 // Whether this network supports settled OpenRoaming 709 optional bool settled_open_roaming_supported = 17; 710 // Trust On First Use (TOFU) configuration for this network 711 optional TofuConfiguration tofu_configuration = 18; 712 // Whether the user accepted the TOFU dialog 713 optional TofuDialogState tofu_dialog_state = 19; 714} 715 716/** 717 * Logged after each scorer prediction interval is completed. 718 */ 719message ScorerPredictionResultReported { 720 enum UnusableEvent { 721 EVENT_UNKNOWN = 0; 722 EVENT_NONE = 1; 723 EVENT_FRAMEWORK_DATA_STALL = 2; 724 EVENT_IP_REACHABILITY_LOST = 3; 725 EVENT_FIRMWARE_ALERT = 4; 726 EVENT_OTHERS = 5; 727 } 728 enum DeviceState { 729 STATE_UNKNOWN = 0; 730 STATE_PREDICT_ONLY = 1; // Measures theoretical performance. Collected when adaptive connectivity is off. 731 STATE_CELLULAR_OFF = 2; // Cellular data is disabled. 732 STATE_CELLULAR_UNAVAILABLE = 3; // Measures actual performance based on a subset of data collected cellular data is toggled on, but unavailable. 733 STATE_LINGERING = 4; 734 STATE_OTHERS = 5; 735 } 736 // The AttributionNode to identify the caller 737 repeated AttributionNode attribution_node = 1; 738 // The scorer's prediction of the current Wi-Fi state 739 optional android.net.wifi.WifiPredictedUsabilityState wifi_predicted_usability_state = 2; 740 // The type of unusable event happened during this prediction interval 741 optional UnusableEvent unusable_event = 3; 742 // Whether Wi-Fi is evaluated as sufficient by the end of the current prediction interval 743 optional bool is_wifi_sufficient = 4; 744 // The status of the device 745 optional DeviceState device_state = 5; 746 // RSSI polling interval, which affects the scorer's prediction interval. 747 optional int32 rssi_polling_interval_ms = 6; 748} 749