summaryrefslogtreecommitdiff
path: root/core/proto/android/net/networkcapabilities.proto
blob: edb6c0400062a1452a505d6d78cb56cc2a1a5878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto2";

package android.net;

option java_multiple_files = true;

import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/proto_logging/stats/enums/net/enums.proto";

/**
 * An android.net.NetworkCapabilities object.
 */
message NetworkCapabilitiesProto {
    option (.android.msg_privacy).dest = DEST_AUTOMATIC;

    repeated Transport transports = 1;

    enum NetCapability {
        // Indicates this is a network that has the ability to reach the
        // carrier's MMSC for sending and receiving MMS messages.
        NET_CAPABILITY_MMS = 0;
        // Indicates this is a network that has the ability to reach the
        // carrier's SUPL server, used to retrieve GPS information.
        NET_CAPABILITY_SUPL = 1;
        // Indicates this is a network that has the ability to reach the
        // carrier's DUN or tethering gateway.
        NET_CAPABILITY_DUN = 2;
        // Indicates this is a network that has the ability to reach the
        // carrier's FOTA portal, used for over the air updates.
        NET_CAPABILITY_FOTA = 3;
        // Indicates this is a network that has the ability to reach the
        // carrier's IMS servers, used for network registration and signaling.
        NET_CAPABILITY_IMS = 4;
        // Indicates this is a network that has the ability to reach the
        // carrier's CBS servers, used for carrier specific services.
        NET_CAPABILITY_CBS = 5;
        // Indicates this is a network that has the ability to reach a Wi-Fi
        // direct peer.
        NET_CAPABILITY_WIFI_P2P = 6;
        // Indicates this is a network that has the ability to reach a carrier's
        // Initial Attach servers.
        NET_CAPABILITY_IA = 7;
        // Indicates this is a network that has the ability to reach a carrier's
        // RCS servers, used for Rich Communication Services.
        NET_CAPABILITY_RCS = 8;
        // Indicates this is a network that has the ability to reach a carrier's
        // XCAP servers, used for configuration and control.
        NET_CAPABILITY_XCAP = 9;
        // Indicates this is a network that has the ability to reach a carrier's
        // Emergency IMS servers or other services, used for network signaling
        // during emergency calls.
        NET_CAPABILITY_EIMS = 10;
        // Indicates that this network is unmetered.
        NET_CAPABILITY_NOT_METERED = 11;
        // Indicates that this network should be able to reach the internet.
        NET_CAPABILITY_INTERNET = 12;
        // Indicates that this network is available for general use. If this is
        // not set applications should not attempt to communicate on this
        // network. Note that this is simply informative and not enforcement -
        // enforcement is handled via other means. Set by default.
        NET_CAPABILITY_NOT_RESTRICTED = 13;
        // Indicates that the user has indicated implicit trust of this network.
        // This generally means it's a sim-selected carrier, a plugged in
        // ethernet, a paired BT device or a wifi the user asked to connect to.
        // Untrusted networks are probably limited to unknown wifi AP. Set by
        // default.
        NET_CAPABILITY_TRUSTED = 14;
        // Indicates that this network is not a VPN.  This capability is set by
        // default and should be explicitly cleared for VPN networks.
        NET_CAPABILITY_NOT_VPN = 15;
        // Indicates that connectivity on this network was successfully
        // validated. For example, for a network with NET_CAPABILITY_INTERNET,
        // it means that Internet connectivity was successfully detected.
        NET_CAPABILITY_VALIDATED = 16;
        // Indicates that this network was found to have a captive portal in
        // place last time it was probed.
        NET_CAPABILITY_CAPTIVE_PORTAL = 17;
        // Indicates that this network is not roaming.
        NET_CAPABILITY_NOT_ROAMING = 18;
        // Indicates that this network is available for use by apps, and not a
        // network that is being kept up in the background to facilitate fast
        // network switching.
        NET_CAPABILITY_FOREGROUND = 19;
    }
    repeated NetCapability capabilities = 2;

    // Passive link bandwidth. This is a rough guide of the expected peak
    // bandwidth for the first hop on the given transport.  It is not measured,
    // but may take into account link parameters (Radio technology, allocated
    // channels, etc).
    optional int32 link_up_bandwidth_kbps = 3;
    optional int32 link_down_bandwidth_kbps = 4;

    optional string network_specifier = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];

    // True if this object specifies a signal strength.
    optional bool can_report_signal_strength = 6;
    // This is a signed integer, and higher values indicate better signal. The
    // exact units are bearer-dependent. For example, Wi-Fi uses RSSI.
    // Only valid if can_report_signal_strength is true.
    optional sint32 signal_strength = 7;
}