Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_ICMPV6_H |
| 8 | #define _UAPI_LINUX_ICMPV6_H |
| 9 | #include <linux/types.h> |
| 10 | #include <asm/byteorder.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | struct icmp6hdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | __u8 icmp6_type; |
| 13 | __u8 icmp6_code; |
| 14 | __sum16 icmp6_cksum; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | union { |
| 16 | __be32 un_data32[1]; |
| 17 | __be16 un_data16[2]; |
| 18 | __u8 un_data8[4]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | struct icmpv6_echo { |
| 20 | __be16 identifier; |
| 21 | __be16 sequence; |
| 22 | } u_echo; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | struct icmpv6_nd_advt { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 24 | #ifdef __LITTLE_ENDIAN_BITFIELD |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 25 | __u32 reserved : 5, override : 1, solicited : 1, router : 1, reserved2 : 24; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | #elif defined(__BIG_ENDIAN_BITFIELD) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __u32 router : 1, solicited : 1, override : 1, reserved : 29; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #else |
| 29 | #error "Please fix <asm/byteorder.h>" |
| 30 | #endif |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | } u_nd_advt; |
| 32 | struct icmpv6_nd_ra { |
| 33 | __u8 hop_limit; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #ifdef __LITTLE_ENDIAN_BITFIELD |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u8 reserved : 3, router_pref : 2, home_agent : 1, other : 1, managed : 1; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | #elif defined(__BIG_ENDIAN_BITFIELD) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | __u8 managed : 1, other : 1, home_agent : 1, router_pref : 2, reserved : 3; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | #else |
| 39 | #error "Please fix <asm/byteorder.h>" |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | #endif |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | __be16 rt_lifetime; |
| 42 | } u_nd_ra; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | } icmp6_dataun; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | #define icmp6_identifier icmp6_dataun.u_echo.identifier |
| 45 | #define icmp6_sequence icmp6_dataun.u_echo.sequence |
| 46 | #define icmp6_pointer icmp6_dataun.un_data32[0] |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | #define icmp6_mtu icmp6_dataun.un_data32[0] |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | #define icmp6_unused icmp6_dataun.un_data32[0] |
| 49 | #define icmp6_maxdelay icmp6_dataun.un_data16[0] |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 50 | #define icmp6_datagram_len icmp6_dataun.un_data8[0] |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define icmp6_router icmp6_dataun.u_nd_advt.router |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 | #define icmp6_solicited icmp6_dataun.u_nd_advt.solicited |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | #define icmp6_override icmp6_dataun.u_nd_advt.override |
| 54 | #define icmp6_ndiscreserved icmp6_dataun.u_nd_advt.reserved |
| 55 | #define icmp6_hop_limit icmp6_dataun.u_nd_ra.hop_limit |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | #define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | #define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other |
| 58 | #define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime |
| 59 | #define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | #define ICMPV6_ROUTER_PREF_LOW 0x3 |
| 62 | #define ICMPV6_ROUTER_PREF_MEDIUM 0x0 |
| 63 | #define ICMPV6_ROUTER_PREF_HIGH 0x1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 | #define ICMPV6_ROUTER_PREF_INVALID 0x2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 65 | #define ICMPV6_DEST_UNREACH 1 |
| 66 | #define ICMPV6_PKT_TOOBIG 2 |
| 67 | #define ICMPV6_TIME_EXCEED 3 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 68 | #define ICMPV6_PARAMPROB 4 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 69 | #define ICMPV6_ERRMSG_MAX 127 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | #define ICMPV6_INFOMSG_MASK 0x80 |
| 71 | #define ICMPV6_ECHO_REQUEST 128 |
| 72 | #define ICMPV6_ECHO_REPLY 129 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 73 | #define ICMPV6_MGM_QUERY 130 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | #define ICMPV6_MGM_REPORT 131 |
| 75 | #define ICMPV6_MGM_REDUCTION 132 |
| 76 | #define ICMPV6_NI_QUERY 139 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 | #define ICMPV6_NI_REPLY 140 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | #define ICMPV6_MLD2_REPORT 143 |
| 79 | #define ICMPV6_DHAAD_REQUEST 144 |
| 80 | #define ICMPV6_DHAAD_REPLY 145 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 81 | #define ICMPV6_MOBILE_PREFIX_SOL 146 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | #define ICMPV6_MOBILE_PREFIX_ADV 147 |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 83 | #define ICMPV6_MRDISC_ADV 151 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 84 | #define ICMPV6_MSG_MAX 255 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 85 | #define ICMPV6_NOROUTE 0 |
| 86 | #define ICMPV6_ADM_PROHIBITED 1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | #define ICMPV6_NOT_NEIGHBOUR 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | #define ICMPV6_ADDR_UNREACH 3 |
| 89 | #define ICMPV6_PORT_UNREACH 4 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 90 | #define ICMPV6_POLICY_FAIL 5 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | #define ICMPV6_REJECT_ROUTE 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 92 | #define ICMPV6_EXC_HOPLIMIT 0 |
| 93 | #define ICMPV6_EXC_FRAGTIME 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | #define ICMPV6_HDR_FIELD 0 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | #define ICMPV6_UNK_NEXTHDR 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 96 | #define ICMPV6_UNK_OPTION 2 |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 97 | #define ICMPV6_HDR_INCOMP 3 |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame] | 98 | #define ICMPV6_EXT_ECHO_REQUEST 160 |
| 99 | #define ICMPV6_EXT_ECHO_REPLY 161 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 100 | #define ICMPV6_FILTER 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 101 | #define ICMPV6_FILTER_BLOCK 1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 102 | #define ICMPV6_FILTER_PASS 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | #define ICMPV6_FILTER_BLOCKOTHERS 3 |
| 104 | #define ICMPV6_FILTER_PASSONLY 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 105 | struct icmp6_filter { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 106 | __u32 data[8]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | }; |
| 108 | #define MLD2_MODE_IS_INCLUDE 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | #define MLD2_MODE_IS_EXCLUDE 2 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 | #define MLD2_CHANGE_TO_INCLUDE 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | #define MLD2_CHANGE_TO_EXCLUDE 4 |
| 112 | #define MLD2_ALLOW_NEW_SOURCES 5 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 113 | #define MLD2_BLOCK_OLD_SOURCES 6 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 114 | #define MLD2_ALL_MCR_INIT { { { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x16 } } } |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 115 | #endif |