diff options
author | Xiao Ma <xiaom@google.com> | 2021-03-04 15:08:16 +0000 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2021-03-08 02:44:56 +0000 |
commit | 4d60ef22b683f305842186fa436c1c3ef36adc06 (patch) | |
tree | e6512a100a1ff1092acd4bcdab5e8a3224fa089c /common/framework | |
parent | 7c875aafbd20dde24e4d306d1782852693027565 (diff) | |
download | net-4d60ef22b683f305842186fa436c1c3ef36adc06.tar.gz |
Add bit mask constants for the flags used in the ND packet.
Bug: 168868607
Test: atest NetworkStackIntegrationTest
Change-Id: I6e7ed431f175e911eeff71fdf3f1e651533d3364
Diffstat (limited to 'common/framework')
-rw-r--r-- | common/framework/com/android/net/module/util/NetworkStackConstants.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/framework/com/android/net/module/util/NetworkStackConstants.java b/common/framework/com/android/net/module/util/NetworkStackConstants.java index 5f621863..499297c9 100644 --- a/common/framework/com/android/net/module/util/NetworkStackConstants.java +++ b/common/framework/com/android/net/module/util/NetworkStackConstants.java @@ -148,9 +148,18 @@ public final class NetworkStackConstants { public static final int ICMPV6_ND_OPTION_RDNSS = 25; public static final int ICMPV6_ND_OPTION_PREF64 = 38; - public static final int ICMPV6_RA_HEADER_LEN = 16; + public static final int NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER = 1 << 31; + public static final int NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED = 1 << 30; + public static final int NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE = 1 << 29; + + public static final byte ROUTER_ADVERTISEMENT_FLAG_MANAGED_ADDRESS = (byte) (1 << 7); + public static final byte ROUTER_ADVERTISEMENT_FLAG_OTHER = (byte) (1 << 6); + + public static final byte PIO_FLAG_ON_LINK = (byte) (1 << 7); + public static final byte PIO_FLAG_AUTONOMOUS = (byte) (1 << 6); + /** * UDP constants. * |