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