lifr | 8abf3a7 | 2020-06-13 11:24:34 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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 | syntax = "proto2"; |
| 17 | package android.stats.connectivity; |
| 18 | option java_multiple_files = true; |
| 19 | option java_outer_classname = "TetheringProto"; |
| 20 | |
| 21 | enum ErrorCode { |
| 22 | EC_NO_ERROR = 0; |
| 23 | EC_UNKNOWN_IFACE = 1; |
| 24 | EC_SERVICE_UNAVAIL = 2; |
| 25 | EC_UNSUPPORTED = 3; |
| 26 | EC_UNAVAIL_IFACE = 4; |
| 27 | EC_INTERNAL_ERROR = 5; |
| 28 | EC_TETHER_IFACE_ERROR = 6; |
| 29 | EC_UNTETHER_IFACE_ERROR = 7; |
| 30 | EC_ENABLE_FORWARDING_ERROR = 8; |
| 31 | EC_DISABLE_FORWARDING_ERROR = 9; |
| 32 | EC_IFACE_CFG_ERROR = 10; |
| 33 | EC_PROVISIONING_FAILED = 11; |
| 34 | EC_DHCPSERVER_ERROR = 12; |
| 35 | EC_ENTITLEMENT_UNKNOWN = 13; |
| 36 | EC_NO_CHANGE_TETHERING_PERMISSION = 14; |
| 37 | EC_NO_ACCESS_TETHERING_PERMISSION = 15; |
| 38 | EC_UNKNOWN_TYPE = 16; |
| 39 | } |
| 40 | |
| 41 | enum DownstreamType { |
| 42 | // Unspecific tethering type. |
| 43 | DS_UNSPECIFIED = 0; |
| 44 | // Wifi tethering type. |
| 45 | DS_TETHERING_WIFI = 1; |
| 46 | // USB tethering type. |
| 47 | DS_TETHERING_USB = 2; |
| 48 | // Bluetooth tethering type. |
| 49 | DS_TETHERING_BLUETOOTH = 3; |
| 50 | // Wifi P2p tethering type. |
| 51 | DS_TETHERING_WIFI_P2P = 4; |
| 52 | // NCM (Network Control Model) local tethering type. |
| 53 | DS_TETHERING_NCM = 5; |
| 54 | // Ethernet tethering type. |
| 55 | DS_TETHERING_ETHERNET = 6; |
| 56 | } |
| 57 | |
| 58 | enum UpstreamType { |
| 59 | UT_UNKNOWN = 0; |
| 60 | // Indicates upstream using a Cellular transport. |
| 61 | UT_CELLULAR = 1; |
| 62 | // Indicates upstream using a Wi-Fi transport. |
| 63 | UT_WIFI = 2; |
| 64 | // Indicates upstream using a Bluetooth transport. |
| 65 | UT_BLUETOOTH = 3; |
| 66 | // Indicates upstream using an Ethernet transport. |
| 67 | UT_ETHERNET = 4; |
| 68 | // Indicates upstream using a Wi-Fi Aware transport. |
| 69 | UT_WIFI_AWARE = 5; |
| 70 | // Indicates upstream using a LoWPAN transport. |
| 71 | UT_LOWPAN = 6; |
| 72 | // Indicates upstream using a Cellular+VPN transport. |
| 73 | UT_CELLULAR_VPN = 7; |
| 74 | // Indicates upstream using a Wi-Fi+VPN transport. |
| 75 | UT_WIFI_VPN = 8; |
| 76 | // Indicates upstream using a Bluetooth+VPN transport. |
| 77 | UT_BLUETOOTH_VPN = 9; |
| 78 | // Indicates upstream using an Ethernet+VPN transport. |
| 79 | UT_ETHERNET_VPN = 10; |
| 80 | // Indicates upstream using a Wi-Fi+Cellular+VPN transport. |
| 81 | UT_WIFI_CELLULAR_VPN = 11; |
| 82 | // Indicates upstream using for test only. |
| 83 | UT_TEST = 12; |
| 84 | // Indicates upstream using DUN capability + Cellular transport. |
| 85 | UT_DUN_CELLULAR = 13; |
| 86 | } |
| 87 | |
| 88 | enum UserType { |
| 89 | // Unknown. |
| 90 | USER_UNKOWNN = 0; |
| 91 | // Settings. |
| 92 | USER_SETTINGS = 1; |
| 93 | // System UI. |
| 94 | USER_SYSTEMUI = 2; |
| 95 | // Google mobile service. |
| 96 | USER_GMS = 3; |
| 97 | } |