1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPI_LINUX_ICMPV6_H 7 #define _UAPI_LINUX_ICMPV6_H 8 #include <linux/types.h> 9 #include <asm/byteorder.h> 10 struct icmp6hdr { 11 __u8 icmp6_type; 12 __u8 icmp6_code; 13 __sum16 icmp6_cksum; 14 union { 15 __be32 un_data32[1]; 16 __be16 un_data16[2]; 17 __u8 un_data8[4]; 18 struct icmpv6_echo { 19 __be16 identifier; 20 __be16 sequence; 21 } u_echo; 22 struct icmpv6_nd_advt { 23 #if defined(__LITTLE_ENDIAN_BITFIELD) 24 __u32 reserved:5, 25 override:1, 26 solicited:1, 27 router:1, 28 reserved2:24; 29 #elif defined(__BIG_ENDIAN_BITFIELD) 30 __u32 router:1, 31 solicited:1, 32 override:1, 33 reserved:29; 34 #else 35 #error "Please fix <asm/byteorder.h>" 36 #endif 37 } u_nd_advt; 38 struct icmpv6_nd_ra { 39 __u8 hop_limit; 40 #if defined(__LITTLE_ENDIAN_BITFIELD) 41 __u8 reserved:3, 42 router_pref:2, 43 home_agent:1, 44 other:1, 45 managed:1; 46 #elif defined(__BIG_ENDIAN_BITFIELD) 47 __u8 managed:1, 48 other:1, 49 home_agent:1, 50 router_pref:2, 51 reserved:3; 52 #else 53 #error "Please fix <asm/byteorder.h>" 54 #endif 55 __be16 rt_lifetime; 56 } u_nd_ra; 57 } icmp6_dataun; 58 #define icmp6_identifier icmp6_dataun.u_echo.identifier 59 #define icmp6_sequence icmp6_dataun.u_echo.sequence 60 #define icmp6_pointer icmp6_dataun.un_data32[0] 61 #define icmp6_mtu icmp6_dataun.un_data32[0] 62 #define icmp6_unused icmp6_dataun.un_data32[0] 63 #define icmp6_maxdelay icmp6_dataun.un_data16[0] 64 #define icmp6_router icmp6_dataun.u_nd_advt.router 65 #define icmp6_solicited icmp6_dataun.u_nd_advt.solicited 66 #define icmp6_override icmp6_dataun.u_nd_advt.override 67 #define icmp6_ndiscreserved icmp6_dataun.u_nd_advt.reserved 68 #define icmp6_hop_limit icmp6_dataun.u_nd_ra.hop_limit 69 #define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed 70 #define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other 71 #define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime 72 #define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref 73 }; 74 #define ICMPV6_ROUTER_PREF_LOW 0x3 75 #define ICMPV6_ROUTER_PREF_MEDIUM 0x0 76 #define ICMPV6_ROUTER_PREF_HIGH 0x1 77 #define ICMPV6_ROUTER_PREF_INVALID 0x2 78 #define ICMPV6_DEST_UNREACH 1 79 #define ICMPV6_PKT_TOOBIG 2 80 #define ICMPV6_TIME_EXCEED 3 81 #define ICMPV6_PARAMPROB 4 82 #define ICMPV6_INFOMSG_MASK 0x80 83 #define ICMPV6_ECHO_REQUEST 128 84 #define ICMPV6_ECHO_REPLY 129 85 #define ICMPV6_MGM_QUERY 130 86 #define ICMPV6_MGM_REPORT 131 87 #define ICMPV6_MGM_REDUCTION 132 88 #define ICMPV6_NI_QUERY 139 89 #define ICMPV6_NI_REPLY 140 90 #define ICMPV6_MLD2_REPORT 143 91 #define ICMPV6_DHAAD_REQUEST 144 92 #define ICMPV6_DHAAD_REPLY 145 93 #define ICMPV6_MOBILE_PREFIX_SOL 146 94 #define ICMPV6_MOBILE_PREFIX_ADV 147 95 #define ICMPV6_NOROUTE 0 96 #define ICMPV6_ADM_PROHIBITED 1 97 #define ICMPV6_NOT_NEIGHBOUR 2 98 #define ICMPV6_ADDR_UNREACH 3 99 #define ICMPV6_PORT_UNREACH 4 100 #define ICMPV6_POLICY_FAIL 5 101 #define ICMPV6_REJECT_ROUTE 6 102 #define ICMPV6_EXC_HOPLIMIT 0 103 #define ICMPV6_EXC_FRAGTIME 1 104 #define ICMPV6_HDR_FIELD 0 105 #define ICMPV6_UNK_NEXTHDR 1 106 #define ICMPV6_UNK_OPTION 2 107 #define ICMPV6_FILTER 1 108 #define ICMPV6_FILTER_BLOCK 1 109 #define ICMPV6_FILTER_PASS 2 110 #define ICMPV6_FILTER_BLOCKOTHERS 3 111 #define ICMPV6_FILTER_PASSONLY 4 112 struct icmp6_filter { 113 __u32 data[8]; 114 }; 115 #define MLD2_MODE_IS_INCLUDE 1 116 #define MLD2_MODE_IS_EXCLUDE 2 117 #define MLD2_CHANGE_TO_INCLUDE 3 118 #define MLD2_CHANGE_TO_EXCLUDE 4 119 #define MLD2_ALLOW_NEW_SOURCES 5 120 #define MLD2_BLOCK_OLD_SOURCES 6 121 #define MLD2_ALL_MCR_INIT { { { 0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,0x16 } } } 122 #endif 123