diff options
author | Aaron Huang <huangaaron@google.com> | 2021-03-17 03:16:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-03-17 03:16:56 +0000 |
commit | b789c411f524b51593b1592cea2b9e5e5b1553ad (patch) | |
tree | 2b57c447e78dda082ec46bd5fdfb40244e91df7c /common | |
parent | 4a26aa99782ec02038db2a159b8194de9fbfd1e4 (diff) | |
parent | e0152d3458e850366a9d6a9bccb9872a365e0c9f (diff) | |
download | net-b789c411f524b51593b1592cea2b9e5e5b1553ad.tar.gz |
Merge "Move some constants from TrafficStatsConstants to NetworkStackConstants" into sc-dev
Diffstat (limited to 'common')
-rw-r--r-- | common/framework/com/android/net/module/util/NetworkStackConstants.java | 21 |
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. |