1/* 2 * Copyright (C) 2017 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.net; 20 21option java_multiple_files = true; 22 23import "frameworks/base/core/proto/android/privacy.proto"; 24import "frameworks/proto_logging/stats/enums/net/enums.proto"; 25 26/** 27 * An android.net.NetworkCapabilities object. 28 */ 29message NetworkCapabilitiesProto { 30 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 31 32 repeated Transport transports = 1; 33 34 enum NetCapability { 35 // Indicates this is a network that has the ability to reach the 36 // carrier's MMSC for sending and receiving MMS messages. 37 NET_CAPABILITY_MMS = 0; 38 // Indicates this is a network that has the ability to reach the 39 // carrier's SUPL server, used to retrieve GPS information. 40 NET_CAPABILITY_SUPL = 1; 41 // Indicates this is a network that has the ability to reach the 42 // carrier's DUN or tethering gateway. 43 NET_CAPABILITY_DUN = 2; 44 // Indicates this is a network that has the ability to reach the 45 // carrier's FOTA portal, used for over the air updates. 46 NET_CAPABILITY_FOTA = 3; 47 // Indicates this is a network that has the ability to reach the 48 // carrier's IMS servers, used for network registration and signaling. 49 NET_CAPABILITY_IMS = 4; 50 // Indicates this is a network that has the ability to reach the 51 // carrier's CBS servers, used for carrier specific services. 52 NET_CAPABILITY_CBS = 5; 53 // Indicates this is a network that has the ability to reach a Wi-Fi 54 // direct peer. 55 NET_CAPABILITY_WIFI_P2P = 6; 56 // Indicates this is a network that has the ability to reach a carrier's 57 // Initial Attach servers. 58 NET_CAPABILITY_IA = 7; 59 // Indicates this is a network that has the ability to reach a carrier's 60 // RCS servers, used for Rich Communication Services. 61 NET_CAPABILITY_RCS = 8; 62 // Indicates this is a network that has the ability to reach a carrier's 63 // XCAP servers, used for configuration and control. 64 NET_CAPABILITY_XCAP = 9; 65 // Indicates this is a network that has the ability to reach a carrier's 66 // Emergency IMS servers or other services, used for network signaling 67 // during emergency calls. 68 NET_CAPABILITY_EIMS = 10; 69 // Indicates that this network is unmetered. 70 NET_CAPABILITY_NOT_METERED = 11; 71 // Indicates that this network should be able to reach the internet. 72 NET_CAPABILITY_INTERNET = 12; 73 // Indicates that this network is available for general use. If this is 74 // not set applications should not attempt to communicate on this 75 // network. Note that this is simply informative and not enforcement - 76 // enforcement is handled via other means. Set by default. 77 NET_CAPABILITY_NOT_RESTRICTED = 13; 78 // Indicates that the user has indicated implicit trust of this network. 79 // This generally means it's a sim-selected carrier, a plugged in 80 // ethernet, a paired BT device or a wifi the user asked to connect to. 81 // Untrusted networks are probably limited to unknown wifi AP. Set by 82 // default. 83 NET_CAPABILITY_TRUSTED = 14; 84 // Indicates that this network is not a VPN. This capability is set by 85 // default and should be explicitly cleared for VPN networks. 86 NET_CAPABILITY_NOT_VPN = 15; 87 // Indicates that connectivity on this network was successfully 88 // validated. For example, for a network with NET_CAPABILITY_INTERNET, 89 // it means that Internet connectivity was successfully detected. 90 NET_CAPABILITY_VALIDATED = 16; 91 // Indicates that this network was found to have a captive portal in 92 // place last time it was probed. 93 NET_CAPABILITY_CAPTIVE_PORTAL = 17; 94 // Indicates that this network is not roaming. 95 NET_CAPABILITY_NOT_ROAMING = 18; 96 // Indicates that this network is available for use by apps, and not a 97 // network that is being kept up in the background to facilitate fast 98 // network switching. 99 NET_CAPABILITY_FOREGROUND = 19; 100 } 101 repeated NetCapability capabilities = 2; 102 103 // Passive link bandwidth. This is a rough guide of the expected peak 104 // bandwidth for the first hop on the given transport. It is not measured, 105 // but may take into account link parameters (Radio technology, allocated 106 // channels, etc). 107 optional int32 link_up_bandwidth_kbps = 3; 108 optional int32 link_down_bandwidth_kbps = 4; 109 110 optional string network_specifier = 5 [ (.android.privacy).dest = DEST_EXPLICIT ]; 111 112 // True if this object specifies a signal strength. 113 optional bool can_report_signal_strength = 6; 114 // This is a signed integer, and higher values indicate better signal. The 115 // exact units are bearer-dependent. For example, Wi-Fi uses RSSI. 116 // Only valid if can_report_signal_strength is true. 117 optional sint32 signal_strength = 7; 118} 119