1/*
2 * Copyright (C) 2019 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 com.android.server.connectivity;
20option java_multiple_files = true;
21option java_outer_classname = "DataStallEventProto";
22
23enum ProbeResult {
24    UNKNOWN = 0;
25    VALID = 1;
26    INVALID = 2;
27    PORTAL = 3;
28    PARTIAL = 4;
29}
30
31enum ApBand {
32    AP_BAND_UNKNOWN = 0;
33    AP_BAND_2GHZ = 1;
34    AP_BAND_5GHZ = 2;
35}
36
37// Refer to definition in TelephonyManager.java.
38enum RadioTech {
39  RADIO_TECHNOLOGY_UNKNOWN = 0;
40  RADIO_TECHNOLOGY_GPRS = 1;
41  RADIO_TECHNOLOGY_EDGE = 2;
42  RADIO_TECHNOLOGY_UMTS = 3;
43  RADIO_TECHNOLOGY_IS95A = 4;
44  RADIO_TECHNOLOGY_IS95B = 5;
45  RADIO_TECHNOLOGY_1XRTT = 6;
46  RADIO_TECHNOLOGY_EVDO_0 = 7;
47  RADIO_TECHNOLOGY_EVDO_A = 8;
48  RADIO_TECHNOLOGY_HSDPA = 9;
49  RADIO_TECHNOLOGY_HSUPA = 10;
50  RADIO_TECHNOLOGY_HSPA = 11;
51  RADIO_TECHNOLOGY_EVDO_B = 12;
52  RADIO_TECHNOLOGY_LTE = 13;
53  RADIO_TECHNOLOGY_EHRPD = 14;
54  RADIO_TECHNOLOGY_HSPAP = 15;
55  RADIO_TECHNOLOGY_GSM = 16;
56  RADIO_TECHNOLOGY_TD_SCDMA = 17;
57  RADIO_TECHNOLOGY_IWLAN = 18;
58  RADIO_TECHNOLOGY_LTE_CA = 19;
59  RADIO_TECHNOLOGY_NR = 20;
60}
61
62// Cellular specific information.
63message CellularData {
64    // Indicate the radio technology at the time of data stall suspected.
65    optional RadioTech rat_type = 1;
66    // True if device is in roaming network at the time of data stall suspected.
67    optional bool is_roaming = 2;
68    // Registered network MccMnc when data stall happen
69    optional string network_mccmnc = 3;
70    // Indicate the SIM card carrier.
71    optional string sim_mccmnc = 4;
72    // Signal strength level at the time of data stall suspected.
73    optional int32 signal_strength = 5;
74}
75
76// Wifi specific information.
77message WifiData {
78    // Signal strength at the time of data stall suspected.
79    // RSSI range is between -55 to -110.
80    optional int32 signal_strength = 1;
81    // AP band.
82    optional ApBand wifi_band = 2;
83}
84
85message DnsEvent {
86    // The dns return code.
87    repeated int32 dns_return_code = 1;
88    // Indicate the timestamp of the dns event.
89    repeated int64 dns_time = 2;
90}
91