File: networkcapabilities.proto

package info (click to toggle)
android-platform-frameworks-base 1%3A10.0.0%2Br36-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 321,788 kB
  • sloc: java: 962,234; cpp: 274,314; xml: 242,770; python: 5,060; sh: 1,432; ansic: 494; makefile: 47; sed: 19
file content (133 lines) | stat: -rw-r--r-- 6,235 bytes parent folder | download | duplicates (2)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
 * 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";

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

    enum Transport {
        // Indicates this network uses a Cellular transport.
        TRANSPORT_CELLULAR = 0;
        // Indicates this network uses a Wi-Fi transport.
        TRANSPORT_WIFI = 1;
        // Indicates this network uses a Bluetooth transport.
        TRANSPORT_BLUETOOTH = 2;
        // Indicates this network uses an Ethernet transport.
        TRANSPORT_ETHERNET = 3;
        // Indicates this network uses a VPN transport.
        TRANSPORT_VPN = 4;
        // Indicates this network uses a Wi-Fi Aware transport.
        TRANSPORT_WIFI_AWARE = 5;
        // Indicates this network uses a LoWPAN transport.
        TRANSPORT_LOWPAN = 6;
    }
    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;
}