blob: 06c66fab5babcaf1ec9749b179c9f01602ab2315 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct icmp6hdr {
Tao Baod7db5942015-01-28 10:07:51 -080025 __u8 icmp6_type;
26 __u8 icmp6_code;
27 __sum16 icmp6_cksum;
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 union {
30 __be32 un_data32[1];
31 __be16 un_data16[2];
32 __u8 un_data8[4];
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 struct icmpv6_echo {
35 __be16 identifier;
36 __be16 sequence;
37 } u_echo;
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 struct icmpv6_nd_advt {
Ben Cheng655a7c02013-10-16 16:09:24 -070040#ifdef __LITTLE_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -080041 __u32 reserved : 5, override : 1, solicited : 1, router : 1, reserved2 : 24;
Ben Cheng655a7c02013-10-16 16:09:24 -070042#elif defined(__BIG_ENDIAN_BITFIELD)
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 __u32 router : 1, solicited : 1, override : 1, reserved : 29;
Ben Cheng655a7c02013-10-16 16:09:24 -070045#else
46#error "Please fix <asm/byteorder.h>"
47#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 } u_nd_advt;
50 struct icmpv6_nd_ra {
51 __u8 hop_limit;
Ben Cheng655a7c02013-10-16 16:09:24 -070052#ifdef __LITTLE_ENDIAN_BITFIELD
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 __u8 reserved : 3, router_pref : 2, home_agent : 1, other : 1, managed : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -070055#elif defined(__BIG_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -080056 __u8 managed : 1, other : 1, home_agent : 1, router_pref : 2, reserved : 3;
Ben Cheng655a7c02013-10-16 16:09:24 -070057#else
Tao Baod7db5942015-01-28 10:07:51 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070059#error "Please fix <asm/byteorder.h>"
Ben Cheng655a7c02013-10-16 16:09:24 -070060#endif
Tao Baod7db5942015-01-28 10:07:51 -080061 __be16 rt_lifetime;
62 } u_nd_ra;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 } icmp6_dataun;
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define icmp6_identifier icmp6_dataun.u_echo.identifier
66#define icmp6_sequence icmp6_dataun.u_echo.sequence
67#define icmp6_pointer icmp6_dataun.un_data32[0]
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069#define icmp6_mtu icmp6_dataun.un_data32[0]
Ben Cheng655a7c02013-10-16 16:09:24 -070070#define icmp6_unused icmp6_dataun.un_data32[0]
71#define icmp6_maxdelay icmp6_dataun.un_data16[0]
72#define icmp6_router icmp6_dataun.u_nd_advt.router
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074#define icmp6_solicited icmp6_dataun.u_nd_advt.solicited
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define icmp6_override icmp6_dataun.u_nd_advt.override
76#define icmp6_ndiscreserved icmp6_dataun.u_nd_advt.reserved
77#define icmp6_hop_limit icmp6_dataun.u_nd_ra.hop_limit
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079#define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other
81#define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime
82#define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084};
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define ICMPV6_ROUTER_PREF_LOW 0x3
86#define ICMPV6_ROUTER_PREF_MEDIUM 0x0
87#define ICMPV6_ROUTER_PREF_HIGH 0x1
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089#define ICMPV6_ROUTER_PREF_INVALID 0x2
Ben Cheng655a7c02013-10-16 16:09:24 -070090#define ICMPV6_DEST_UNREACH 1
91#define ICMPV6_PKT_TOOBIG 2
92#define ICMPV6_TIME_EXCEED 3
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094#define ICMPV6_PARAMPROB 4
Ben Cheng655a7c02013-10-16 16:09:24 -070095#define ICMPV6_INFOMSG_MASK 0x80
96#define ICMPV6_ECHO_REQUEST 128
97#define ICMPV6_ECHO_REPLY 129
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099#define ICMPV6_MGM_QUERY 130
Ben Cheng655a7c02013-10-16 16:09:24 -0700100#define ICMPV6_MGM_REPORT 131
101#define ICMPV6_MGM_REDUCTION 132
102#define ICMPV6_NI_QUERY 139
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104#define ICMPV6_NI_REPLY 140
Ben Cheng655a7c02013-10-16 16:09:24 -0700105#define ICMPV6_MLD2_REPORT 143
106#define ICMPV6_DHAAD_REQUEST 144
107#define ICMPV6_DHAAD_REPLY 145
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109#define ICMPV6_MOBILE_PREFIX_SOL 146
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define ICMPV6_MOBILE_PREFIX_ADV 147
111#define ICMPV6_NOROUTE 0
112#define ICMPV6_ADM_PROHIBITED 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114#define ICMPV6_NOT_NEIGHBOUR 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700115#define ICMPV6_ADDR_UNREACH 3
116#define ICMPV6_PORT_UNREACH 4
Christopher Ferris38062f92014-07-09 15:33:25 -0700117#define ICMPV6_POLICY_FAIL 5
Christopher Ferris38062f92014-07-09 15:33:25 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119#define ICMPV6_REJECT_ROUTE 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700120#define ICMPV6_EXC_HOPLIMIT 0
121#define ICMPV6_EXC_FRAGTIME 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define ICMPV6_HDR_FIELD 0
Christopher Ferris38062f92014-07-09 15:33:25 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124#define ICMPV6_UNK_NEXTHDR 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#define ICMPV6_UNK_OPTION 2
126#define ICMPV6_FILTER 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700127#define ICMPV6_FILTER_BLOCK 1
Christopher Ferris38062f92014-07-09 15:33:25 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129#define ICMPV6_FILTER_PASS 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define ICMPV6_FILTER_BLOCKOTHERS 3
131#define ICMPV6_FILTER_PASSONLY 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700132struct icmp6_filter {
Christopher Ferris38062f92014-07-09 15:33:25 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 __u32 data[8];
Ben Cheng655a7c02013-10-16 16:09:24 -0700135};
136#define MLD2_MODE_IS_INCLUDE 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700137#define MLD2_MODE_IS_EXCLUDE 2
Christopher Ferris38062f92014-07-09 15:33:25 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139#define MLD2_CHANGE_TO_INCLUDE 3
Ben Cheng655a7c02013-10-16 16:09:24 -0700140#define MLD2_CHANGE_TO_EXCLUDE 4
141#define MLD2_ALLOW_NEW_SOURCES 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700142#define MLD2_BLOCK_OLD_SOURCES 6
Christopher Ferris38062f92014-07-09 15:33:25 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144#define MLD2_ALL_MCR_INIT { { { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x16 } } }
Ben Cheng655a7c02013-10-16 16:09:24 -0700145#endif