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