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