summaryrefslogtreecommitdiff
path: root/common/framework/com
diff options
context:
space:
mode:
authorAaron Huang <huangaaron@google.com>2021-03-17 03:16:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-03-17 03:16:56 +0000
commitb789c411f524b51593b1592cea2b9e5e5b1553ad (patch)
tree2b57c447e78dda082ec46bd5fdfb40244e91df7c /common/framework/com
parent4a26aa99782ec02038db2a159b8194de9fbfd1e4 (diff)
parente0152d3458e850366a9d6a9bccb9872a365e0c9f (diff)
downloadnet-b789c411f524b51593b1592cea2b9e5e5b1553ad.tar.gz
Merge "Move some constants from TrafficStatsConstants to NetworkStackConstants" into sc-dev
Diffstat (limited to 'common/framework/com')
-rw-r--r--common/framework/com/android/net/module/util/NetworkStackConstants.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/framework/com/android/net/module/util/NetworkStackConstants.java b/common/framework/com/android/net/module/util/NetworkStackConstants.java
index 499297c9..b7062e76 100644
--- a/common/framework/com/android/net/module/util/NetworkStackConstants.java
+++ b/common/framework/com/android/net/module/util/NetworkStackConstants.java
@@ -186,6 +186,27 @@ public final class NetworkStackConstants {
*/
public static final int VENDOR_SPECIFIC_IE_ID = 0xdd;
+
+ /**
+ * TrafficStats constants.
+ */
+ // These tags are used by the network stack to do traffic for its own purposes. Traffic
+ // tagged with these will be counted toward the network stack and must stay inside the
+ // range defined by
+ // {@link android.net.TrafficStats#TAG_NETWORK_STACK_RANGE_START} and
+ // {@link android.net.TrafficStats#TAG_NETWORK_STACK_RANGE_END}.
+ public static final int TAG_SYSTEM_DHCP = 0xFFFFFE01;
+ public static final int TAG_SYSTEM_NEIGHBOR = 0xFFFFFE02;
+ public static final int TAG_SYSTEM_DHCP_SERVER = 0xFFFFFE03;
+
+ // These tags are used by the network stack to do traffic on behalf of apps. Traffic
+ // tagged with these will be counted toward the app on behalf of which the network
+ // stack is doing this traffic. These values must stay inside the range defined by
+ // {@link android.net.TrafficStats#TAG_NETWORK_STACK_IMPERSONATION_RANGE_START} and
+ // {@link android.net.TrafficStats#TAG_NETWORK_STACK_IMPERSONATION_RANGE_END}.
+ public static final int TAG_SYSTEM_PROBE = 0xFFFFFF81;
+ public static final int TAG_SYSTEM_DNS = 0xFFFFFF82;
+
// TODO: Move to Inet4AddressUtils
// See aosp/1455936: NetworkStackConstants can't depend on it as it causes jarjar-related issues
// for users of both the net-utils-device-common and net-utils-framework-common libraries.