| /* |
| * Copyright (C) 2019 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.stats.connectivity; |
| option java_multiple_files = true; |
| option java_outer_classname = "NetworkStackProto"; |
| |
| enum Ipv6ProvisioningMode { |
| IPV6_PROV_MODE_UNKNOWN = 0; |
| // IPv6 provisioning is disabled. |
| IPV6_PROV_MODE_DISABLED = 1; |
| // IPv6 provisioning is triggered in link-local mode e.g. WiFi P2P. |
| IPV6_PROV_MODE_LINK_LOCAL = 2; |
| // IPv6 provisioning is triggered from RA autoconf. |
| IPV6_PROV_MODE_SLAAC = 3; |
| // IPv6 provisioning is triggered from heuristic DHCPv6 prefix delegation. |
| IPV6_PROV_MODE_DHCP6_PD_HEURISTIC = 4; |
| // IPv6 provisioning is triggered from PIO P-flag explicitly. |
| IPV6_PROV_MODE_DHCP6_PD_PFLAG = 5; |
| // IPv6 provisioning is triggered from both RA autoconf and PIO P-flag, e.g. |
| // from different PIOs. |
| IPV6_PROV_MODE_DHCP6_SLAAC_AND_DHCP6_PD_PFLAG = 6; |
| } |
| |
| enum DhcpRenewResult { |
| RR_UNKNOWN = 0; |
| RR_SUCCESS = 1; |
| RR_ERROR_NAK = 2; |
| RR_ERROR_IP_MISMATCH = 3; |
| RR_ERROR_IP_EXPIRE = 4; |
| } |
| |
| enum DisconnectCode { |
| DC_NONE = 0; |
| DC_NORMAL_TERMINATION = 1; |
| DC_PROVISIONING_FAIL = 2; |
| DC_ERROR_STARTING_IPV4 = 4; |
| DC_ERROR_STARTING_IPV6 = 5; |
| DC_ERROR_STARTING_IPREACHABILITYMONITOR = 6; |
| DC_INVALID_PROVISIONING = 7; |
| DC_INTERFACE_NOT_FOUND = 8; |
| DC_PROVISIONING_TIMEOUT = 9; |
| DC_DHCP_ROAM_FAIL = 10; |
| } |
| |
| enum TransportType { |
| TT_UNKNOWN = 0; |
| // Indicates this network uses a Cellular transport |
| TT_CELLULAR = 1; |
| // Indicates this network uses a Wi-Fi transport |
| TT_WIFI = 2; |
| // Indicates this network uses a Bluetooth transport |
| TT_BLUETOOTH = 3; |
| // Indicates this network uses an Ethernet transport |
| TT_ETHERNET = 4; |
| // Indicates this network uses a Wi-Fi Aware transport |
| TT_WIFI_AWARE = 5; |
| // Indicates this network uses a LoWPAN transport |
| TT_LOWPAN = 6; |
| // Indicates this network uses a Cellular+VPN transport |
| TT_CELLULAR_VPN = 7; |
| // Indicates this network uses a Wi-Fi+VPN transport |
| TT_WIFI_VPN = 8; |
| // Indicates this network uses a Bluetooth+VPN transport |
| TT_BLUETOOTH_VPN = 9; |
| // Indicates this network uses an Ethernet+VPN transport |
| TT_ETHERNET_VPN = 10; |
| // Indicates this network uses a Wi-Fi+Cellular+VPN transport |
| TT_WIFI_CELLULAR_VPN = 11; |
| // Indicates this network uses for test only |
| TT_TEST = 12; |
| } |
| |
| enum DhcpFeature { |
| DF_UNKNOWN = 0; |
| // DHCP INIT-REBOOT state |
| DF_INITREBOOT = 1; |
| // DHCP rapid commit option |
| DF_RAPIDCOMMIT = 2; |
| // Duplicate address detection |
| DF_DAD = 3; |
| // Fast initial Link setup |
| DF_FILS = 4; |
| } |
| |
| enum HostnameTransResult { |
| HTR_UNKNOWN = 0; |
| HTR_SUCCESS = 1; |
| HTR_FAILURE = 2; |
| HTR_DISABLE = 3; |
| } |
| |
| enum ProbeResult { |
| PR_UNKNOWN = 0; |
| PR_SUCCESS = 1; |
| PR_FAILURE = 2; |
| PR_PORTAL = 3; |
| // DNS query for the probe host returned a private IP address |
| PR_PRIVATE_IP_DNS = 4; |
| } |
| |
| enum ValidationResult { |
| VR_UNKNOWN = 0; |
| VR_SUCCESS = 1; |
| VR_FAILURE = 2; |
| VR_PORTAL = 3; |
| VR_PARTIAL = 4; |
| } |
| |
| enum ProbeType { |
| PT_UNKNOWN = 0; |
| PT_DNS = 1; |
| PT_HTTP = 2; |
| PT_HTTPS = 3; |
| PT_PAC = 4; |
| PT_FALLBACK = 5; |
| PT_PRIVDNS = 6; |
| PT_CAPPORT_API = 7; |
| } |
| |
| // The Dhcp error code is defined in android.net.metrics.DhcpErrorEvent |
| enum DhcpErrorCode { |
| ET_UNKNOWN = 0; |
| ET_L2_ERROR = 1; |
| ET_L3_ERROR = 2; |
| ET_L4_ERROR = 3; |
| ET_DHCP_ERROR = 4; |
| ET_MISC_ERROR = 5; |
| /* Reserve for error type |
| // ET_L2_ERROR_TYPE = ET_L2_ERROR << 8; |
| ET_L2_ERROR_TYPE = 256; |
| // ET_L3_ERROR_TYPE = ET_L3_ERROR << 8; |
| ET_L3_ERROR_TYPE = 512; |
| // ET_L4_ERROR_TYPE = ET_L4_ERROR << 8; |
| ET_L4_ERROR_TYPE = 768; |
| // ET_DHCP_ERROR_TYPE = ET_DHCP_ERROR << 8; |
| ET_DHCP_ERROR_TYPE = 1024; |
| // ET_MISC_ERROR_TYPE = ET_MISC_ERROR << 8; |
| ET_MISC_ERROR_TYPE = 1280; |
| */ |
| // ET_L2_TOO_SHORT = (ET_L2_ERROR_TYPE | 0x1) << 16; |
| ET_L2_TOO_SHORT = 16842752; |
| // ET_L2_WRONG_ETH_TYPE = (ET_L2_ERROR_TYPE | 0x2) << 16; |
| ET_L2_WRONG_ETH_TYPE = 16908288; |
| // ET_L3_TOO_SHORT = (ET_L3_ERROR_TYPE | 0x1) << 16; |
| ET_L3_TOO_SHORT = 33619968; |
| // ET_L3_NOT_IPV4 = (ET_L3_ERROR_TYPE | 0x2) << 16; |
| ET_L3_NOT_IPV4 = 33685504; |
| // ET_L3_INVALID_IP = (ET_L3_ERROR_TYPE | 0x3) << 16; |
| ET_L3_INVALID_IP = 33751040; |
| // ET_L4_NOT_UDP = (ET_L4_ERROR_TYPE | 0x1) << 16; |
| ET_L4_NOT_UDP = 50397184; |
| // ET_L4_WRONG_PORT = (ET_L4_ERROR_TYPE | 0x2) << 16; |
| ET_L4_WRONG_PORT = 50462720; |
| // ET_BOOTP_TOO_SHORT = (ET_DHCP_ERROR_TYPE | 0x1) << 16; |
| ET_BOOTP_TOO_SHORT = 67174400; |
| // ET_DHCP_BAD_MAGIC_COOKIE = (ET_DHCP_ERROR_TYPE | 0x2) << 16; |
| ET_DHCP_BAD_MAGIC_COOKIE = 67239936; |
| // ET_DHCP_INVALID_OPTION_LENGTH = (ET_DHCP_ERROR_TYPE | 0x3) << 16; |
| ET_DHCP_INVALID_OPTION_LENGTH = 67305472; |
| // ET_DHCP_NO_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x4) << 16; |
| ET_DHCP_NO_MSG_TYPE = 67371008; |
| // ET_DHCP_UNKNOWN_MSG_TYPE = (ET_DHCP_ERROR_TYPE | 0x5) << 16; |
| ET_DHCP_UNKNOWN_MSG_TYPE = 67436544; |
| // ET_DHCP_NO_COOKIE = (ET_DHCP_ERROR_TYPE | 0x6) << 16; |
| ET_DHCP_NO_COOKIE = 67502080; |
| // ET_BUFFER_UNDERFLOW = (ET_MISC_ERROR_TYPE | 0x1) << 16; |
| ET_BUFFER_UNDERFLOW = 83951616; |
| // ET_RECEIVE_ERROR = (ET_MISC_ERROR_TYPE | 0x2) << 16; |
| ET_RECEIVE_ERROR = 84017152; |
| // ET_PARSING_ERROR = (ET_MISC_ERROR_TYPE | 0x3) << 16; |
| ET_PARSING_ERROR = 84082688; |
| } |
| |
| enum NetworkQuirkEvent { |
| QE_UNKNOWN = 0; |
| QE_IPV6_PROVISIONING_ROUTER_LOST = 1; |
| QE_APF_INSTALL_FAILURE = 2; |
| QE_APF_OVER_SIZE_FAILURE = 3; |
| QE_APF_GENERATE_FILTER_EXCEPTION = 4; |
| QE_DHCP6_HEURISTIC_TRIGGERED = 5; |
| QE_DHCP6_PD_PROVISIONED = 6; |
| } |
| |
| enum IpType { |
| // Unknown IP address type; |
| UNKNOWN = 0; |
| // IPv4 address; |
| IPV4 = 4; |
| // IPv6 address; |
| IPV6 = 6; |
| } |
| |
| enum NudEventType { |
| // Unknown event type; |
| NUD_EVENT_UNKNOWN = 0; |
| // Forced nud probe after roaming from IpReachabilityMonitor, neighbor is unreachable; |
| NUD_POST_ROAMING_FAILED = 1; |
| // Forced nud probe after roaming from IpReachabilityMonitor, neighbor is unreachable and |
| // IP provisioning lost; |
| NUD_POST_ROAMING_FAILED_CRITICAL = 2; |
| // Forced nud probe after receiving CMD_CONFIRM from IpReachabilityMonitor, neighbor is |
| // unreachable; |
| NUD_CONFIRM_FAILED = 3; |
| // Forced nud probe after receiving CMD_CONFIRM from IpReachabilityMonitor, neighbor is |
| // unreachable and IP provisioning lost; |
| NUD_CONFIRM_FAILED_CRITICAL = 4; |
| // Neighbor unreachable notification from kernel; |
| NUD_ORGANIC_FAILED = 5; |
| // Neighbor unreachable notification from kernel, and IP provisioning is also lost; |
| NUD_ORGANIC_FAILED_CRITICAL = 6; |
| // NUD probe failure due to neighbor's MAC address has changed. |
| NUD_MAC_ADDRESS_CHANGED = 7 [deprecated=true]; |
| // NUD probe failure due to neighbor's MAC address has changed after roaming. |
| NUD_POST_ROAMING_MAC_ADDRESS_CHANGED = 8; |
| // NUD probe failure due to neighbor's MAC address has changed after receiving CMD_CONFIRM. |
| NUD_CONFIRM_MAC_ADDRESS_CHANGED = 9; |
| // NUD probe failure due to neighbor's MAC address has changed during organic probes. |
| NUD_ORGANIC_MAC_ADDRESS_CHANGED = 10; |
| } |
| |
| enum NudNeighborType { |
| // Unknown neighbor type; |
| NUD_NEIGHBOR_UNKNOWN = 0; |
| // Neighbor is default gateway; |
| NUD_NEIGHBOR_GATEWAY = 1; |
| // Neighbor is DNS server; |
| NUD_NEIGHBOR_DNS = 2; |
| // Neighbor is both the default gateway and DNS server; |
| NUD_NEIGHBOR_BOTH = 3; |
| } |
| |
| enum CounterName { |
| CN_UNKNOWN = 0; |
| CN_TOTAL_PACKETS = 1; |
| CN_PASSED_ARP = 2; |
| CN_PASSED_DHCP = 3; |
| CN_PASSED_IPV4 = 4; |
| CN_PASSED_IPV6_NON_ICMP = 5; |
| CN_PASSED_IPV4_UNICAST = 6; |
| CN_PASSED_IPV6_ICMP = 7; |
| CN_PASSED_IPV6_UNICAST_NON_ICMP = 8; |
| CN_PASSED_ARP_UNICAST_REPLY = 9; |
| CN_PASSED_NON_IP_UNICAST = 10; |
| CN_PASSED_MDNS = 11; |
| CN_DROPPED_ETH_BROADCAST = 12; |
| CN_DROPPED_RA = 13; |
| CN_DROPPED_GARP_REPLY = 14; |
| CN_DROPPED_ARP_OTHER_HOST = 15; |
| CN_DROPPED_IPV4_L2_BROADCAST = 16; |
| CN_DROPPED_IPV4_BROADCAST_ADDR = 17; |
| CN_DROPPED_IPV4_BROADCAST_NET = 18; |
| CN_DROPPED_IPV4_MULTICAST = 19; |
| CN_DROPPED_IPV6_ROUTER_SOLICITATION = 20; |
| CN_DROPPED_IPV6_MULTICAST_NA = 21; |
| CN_DROPPED_IPV6_MULTICAST = 22; |
| CN_DROPPED_IPV6_MULTICAST_PING = 23; |
| CN_DROPPED_IPV6_NON_ICMP_MULTICAST = 24; |
| CN_DROPPED_802_3_FRAME = 25; |
| CN_DROPPED_ETHERTYPE_DENYLISTED = 26 [deprecated = true]; |
| CN_DROPPED_ARP_REPLY_SPA_NO_HOST = 27; |
| CN_DROPPED_IPV4_KEEPALIVE_ACK = 28; |
| CN_DROPPED_IPV6_KEEPALIVE_ACK = 29; |
| CN_DROPPED_IPV4_NATT_KEEPALIVE = 30; |
| CN_DROPPED_MDNS = 31; |
| CN_DROPPED_ARP_NON_IPV4 = 32; |
| CN_DROPPED_ARP_UNKNOWN = 33; |
| CN_PASSED_ARP_BROADCAST_REPLY = 34; |
| CN_PASSED_ARP_REQUEST = 35; |
| CN_PASSED_IPV4_FROM_DHCPV4_SERVER = 36; |
| CN_PASSED_IPV6_NS_DAD = 37; |
| CN_PASSED_IPV6_NS_NO_ADDRESS = 38; |
| CN_PASSED_IPV6_NS_NO_SLLA_OPTION = 39; |
| CN_PASSED_IPV6_NS_TENTATIVE = 40; |
| CN_PASSED_MLD = 41; |
| CN_DROPPED_ETHERTYPE_NOT_ALLOWED = 42; |
| CN_DROPPED_IPV4_NON_DHCP4 = 43; |
| CN_DROPPED_IPV6_NS_INVALID = 44; |
| CN_DROPPED_IPV6_NS_OTHER_HOST = 45; |
| CN_DROPPED_IPV6_NS_REPLIED_NON_DAD = 46; |
| CN_DROPPED_ARP_REQUEST_ANYHOST = 47; |
| CN_DROPPED_ARP_REQUEST_REPLIED = 48; |
| CN_DROPPED_ARP_V6_ONLY = 49; |
| } |
| |
| message NetworkStackEventData { |
| |
| } |
| |