icmp6.h - add captive portal and pref64 nd opts
Test: builds
Bug: 150648313
Change-Id: I41bcd4d46c0736b613870dba382ebc079e5759d7
diff --git a/libc/include/netinet/icmp6.h b/libc/include/netinet/icmp6.h
index 43ec521..2b237a8 100644
--- a/libc/include/netinet/icmp6.h
+++ b/libc/include/netinet/icmp6.h
@@ -280,6 +280,8 @@
#define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */
#define ND_OPT_RDNSS 25 /* RFC 6016 */
#define ND_OPT_DNSSL 31 /* RFC 6016 */
+#define ND_OPT_CAPTIVE_PORTAL 37 /* RFC 7710 */
+#define ND_OPT_PREF64 38 /* RFC-ietf-6man-ra-pref64-09 */
struct nd_opt_route_info { /* route info */
u_int8_t nd_opt_rti_type;
@@ -335,6 +337,19 @@
/* followed by list of IP prefixes */
} __packed;
+struct nd_opt_captive_portal { /* CAPTIVE PORTAL option RFC 7710 */
+ u_int8_t nd_opt_captive_portal_type; // ND_OPT_CAPTIVE_PORTAL
+ u_int8_t nd_opt_captive_portal_len; // in 8 byte units
+ u_int8_t nd_opt_captive_portal_uri[]; // 6 + n*8 bytes
+} __packed;
+
+struct nd_opt_pref64 { /* PREF64 option RFC-ietf-6man-ra-pref64-09 */
+ u_int8_t nd_opt_pref64_type; // ND_OPT_PREF64
+ u_int8_t nd_opt_pref64_len; // 8 byte units, thus '2'
+ u_int16_t nd_opt_pref64_lifetime_plc; // net endian, 13 + 3 bits
+ u_int8_t nd_opt_pref64_prefix[12]; // top 96 bits
+} __packed;
+
/*
* icmp6 namelookup
*/