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