• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  */
7 #ifndef _UAPI_LINUX_ICMPV6_H
8 #define _UAPI_LINUX_ICMPV6_H
9 #include <linux/types.h>
10 #include <asm/byteorder.h>
11 struct icmp6hdr {
12   __u8 icmp6_type;
13   __u8 icmp6_code;
14   __sum16 icmp6_cksum;
15   union {
16     __be32 un_data32[1];
17     __be16 un_data16[2];
18     __u8 un_data8[4];
19     struct icmpv6_echo {
20       __be16 identifier;
21       __be16 sequence;
22     } u_echo;
23     struct icmpv6_nd_advt {
24 #ifdef __LITTLE_ENDIAN_BITFIELD
25       __u32 reserved : 5, override : 1, solicited : 1, router : 1, reserved2 : 24;
26 #elif defined(__BIG_ENDIAN_BITFIELD)
27       __u32 router : 1, solicited : 1, override : 1, reserved : 29;
28 #else
29 #error "Please fix <asm/byteorder.h>"
30 #endif
31     } u_nd_advt;
32     struct icmpv6_nd_ra {
33       __u8 hop_limit;
34 #ifdef __LITTLE_ENDIAN_BITFIELD
35       __u8 reserved : 3, router_pref : 2, home_agent : 1, other : 1, managed : 1;
36 #elif defined(__BIG_ENDIAN_BITFIELD)
37       __u8 managed : 1, other : 1, home_agent : 1, router_pref : 2, reserved : 3;
38 #else
39 #error "Please fix <asm/byteorder.h>"
40 #endif
41       __be16 rt_lifetime;
42     } u_nd_ra;
43   } icmp6_dataun;
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]
47 #define icmp6_mtu icmp6_dataun.un_data32[0]
48 #define icmp6_unused icmp6_dataun.un_data32[0]
49 #define icmp6_maxdelay icmp6_dataun.un_data16[0]
50 #define icmp6_datagram_len icmp6_dataun.un_data8[0]
51 #define icmp6_router icmp6_dataun.u_nd_advt.router
52 #define icmp6_solicited icmp6_dataun.u_nd_advt.solicited
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
56 #define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed
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
60 };
61 #define ICMPV6_ROUTER_PREF_LOW 0x3
62 #define ICMPV6_ROUTER_PREF_MEDIUM 0x0
63 #define ICMPV6_ROUTER_PREF_HIGH 0x1
64 #define ICMPV6_ROUTER_PREF_INVALID 0x2
65 #define ICMPV6_DEST_UNREACH 1
66 #define ICMPV6_PKT_TOOBIG 2
67 #define ICMPV6_TIME_EXCEED 3
68 #define ICMPV6_PARAMPROB 4
69 #define ICMPV6_ERRMSG_MAX 127
70 #define ICMPV6_INFOMSG_MASK 0x80
71 #define ICMPV6_ECHO_REQUEST 128
72 #define ICMPV6_ECHO_REPLY 129
73 #define ICMPV6_MGM_QUERY 130
74 #define ICMPV6_MGM_REPORT 131
75 #define ICMPV6_MGM_REDUCTION 132
76 #define ICMPV6_NI_QUERY 139
77 #define ICMPV6_NI_REPLY 140
78 #define ICMPV6_MLD2_REPORT 143
79 #define ICMPV6_DHAAD_REQUEST 144
80 #define ICMPV6_DHAAD_REPLY 145
81 #define ICMPV6_MOBILE_PREFIX_SOL 146
82 #define ICMPV6_MOBILE_PREFIX_ADV 147
83 #define ICMPV6_MRDISC_ADV 151
84 #define ICMPV6_MSG_MAX 255
85 #define ICMPV6_NOROUTE 0
86 #define ICMPV6_ADM_PROHIBITED 1
87 #define ICMPV6_NOT_NEIGHBOUR 2
88 #define ICMPV6_ADDR_UNREACH 3
89 #define ICMPV6_PORT_UNREACH 4
90 #define ICMPV6_POLICY_FAIL 5
91 #define ICMPV6_REJECT_ROUTE 6
92 #define ICMPV6_EXC_HOPLIMIT 0
93 #define ICMPV6_EXC_FRAGTIME 1
94 #define ICMPV6_HDR_FIELD 0
95 #define ICMPV6_UNK_NEXTHDR 1
96 #define ICMPV6_UNK_OPTION 2
97 #define ICMPV6_HDR_INCOMP 3
98 #define ICMPV6_EXT_ECHO_REQUEST 160
99 #define ICMPV6_EXT_ECHO_REPLY 161
100 #define ICMPV6_FILTER 1
101 #define ICMPV6_FILTER_BLOCK 1
102 #define ICMPV6_FILTER_PASS 2
103 #define ICMPV6_FILTER_BLOCKOTHERS 3
104 #define ICMPV6_FILTER_PASSONLY 4
105 struct icmp6_filter {
106   __u32 data[8];
107 };
108 #define MLD2_MODE_IS_INCLUDE 1
109 #define MLD2_MODE_IS_EXCLUDE 2
110 #define MLD2_CHANGE_TO_INCLUDE 3
111 #define MLD2_CHANGE_TO_EXCLUDE 4
112 #define MLD2_ALLOW_NEW_SOURCES 5
113 #define MLD2_BLOCK_OLD_SOURCES 6
114 #define MLD2_ALL_MCR_INIT { { { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x16 } } }
115 #endif
116