• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package com.android.internal.util;
18 
19 /**
20  * Constants for traffic stats.
21  * @hide
22  */
23 public class TrafficStatsConstants {
24     // These tags are used by the network stack to do traffic for its own purposes. Traffic
25     // tagged with these will be counted toward the network stack and must stay inside the
26     // range defined by
27     // {@link android.net.TrafficStats#TAG_NETWORK_STACK_RANGE_START} and
28     // {@link android.net.TrafficStats#TAG_NETWORK_STACK_RANGE_END}.
29     public static final int TAG_SYSTEM_DHCP = 0xFFFFFE01;
30     public static final int TAG_SYSTEM_NEIGHBOR = 0xFFFFFE02;
31     public static final int TAG_SYSTEM_DHCP_SERVER = 0xFFFFFE03;
32 
33     public static final int TAG_SYSTEM_NTP = 0xFFFFFF41;
34     public static final int TAG_SYSTEM_GPS = 0xFFFFFF44;
35     public static final int TAG_SYSTEM_PAC = 0xFFFFFF45;
36 
37     // These tags are used by the network stack to do traffic on behalf of apps. Traffic
38     // tagged with these will be counted toward the app on behalf of which the network
39     // stack is doing this traffic. These values must stay inside the range defined by
40     // {@link android.net.TrafficStats#TAG_NETWORK_STACK_IMPERSONATION_RANGE_START} and
41     // {@link android.net.TrafficStats#TAG_NETWORK_STACK_IMPERSONATION_RANGE_END}.
42     public static final int TAG_SYSTEM_PROBE = 0xFFFFFF81;
43 }
44