diff options
author | Xiao Ma <xiaom@google.com> | 2020-12-23 07:55:44 +0000 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2020-12-23 08:01:45 +0000 |
commit | 8231241936890a936f1efb64f4df8df64fea8811 (patch) | |
tree | 01b6d8e5bd2b5bb41fb5a62aec2180fd4164e8bb /common/framework/com/android/net/module/util/NetworkStackConstants.java | |
parent | 761fe627e76de440606660bbee884419c3614550 (diff) | |
download | net-8231241936890a936f1efb64f4df8df64fea8811.tar.gz |
Add ETHER_BROADCAST and DEFAULT_LINK_MTU constants.
ETHER_BROADCAST is used to fill the destination mac address of ether
header, it was defined in the DhcpPacket.java, move it to a common
place for other usecases.
Also have a link mtu constant(default value is 1500 bytes), irrelevant
to specific link-layer type.
Bug: 175830307
Test: m
Change-Id: I422d284cd8fa943bd745ad29229a54515135a3c4
Diffstat (limited to 'common/framework/com/android/net/module/util/NetworkStackConstants.java')
-rw-r--r-- | common/framework/com/android/net/module/util/NetworkStackConstants.java | 6 |
1 files changed, 6 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 1572fe04..a2275054 100644 --- a/common/framework/com/android/net/module/util/NetworkStackConstants.java +++ b/common/framework/com/android/net/module/util/NetworkStackConstants.java @@ -46,6 +46,12 @@ public final class NetworkStackConstants { public static final int ETHER_TYPE_IPV6 = 0x86dd; public static final int ETHER_HEADER_LEN = 14; public static final int ETHER_MTU = 1500; + public static final byte[] ETHER_BROADCAST = new byte[] { + (byte) 0xff, (byte) 0xff, (byte) 0xff, + (byte) 0xff, (byte) 0xff, (byte) 0xff, + }; + + public static final int DEFAULT_LINK_MTU = 1500; /** * ARP constants. |