| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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_IPV6_H | 
|  | 20 | #define _UAPI_IPV6_H | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 21 | #include <linux/libc-compat.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 22 | #include <linux/types.h> | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 23 | #include <linux/in6.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 24 | #include <asm/byteorder.h> | 
|  | 25 | #define IPV6_MIN_MTU 1280 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 26 | #if __UAPI_DEF_IN6_PKTINFO | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | struct in6_pktinfo { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | struct in6_addr ipi6_addr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | int ipi6_ifindex; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 31 | #endif | 
|  | 32 | #if __UAPI_DEF_IP6_MTUINFO | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | struct ip6_mtuinfo { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 34 | struct sockaddr_in6 ip6m_addr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u32 ip6m_mtu; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 37 | #endif | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | struct in6_ifreq { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 39 | struct in6_addr ifr6_addr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 | __u32 ifr6_prefixlen; | 
|  | 41 | int ifr6_ifindex; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 | #define IPV6_SRCRT_STRICT 0x01 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | #define IPV6_SRCRT_TYPE_0 0 | 
|  | 45 | #define IPV6_SRCRT_TYPE_2 2 | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 46 | #define IPV6_SRCRT_TYPE_4 4 | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 47 | struct ipv6_rt_hdr { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 48 | __u8 nexthdr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 49 | __u8 hdrlen; | 
|  | 50 | __u8 type; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 51 | __u8 segments_left; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 52 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | struct ipv6_opt_hdr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | __u8 nexthdr; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 55 | __u8 hdrlen; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 56 | } __attribute__((packed)); | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | #define ipv6_destopt_hdr ipv6_opt_hdr | 
|  | 58 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 59 | #define IPV6_OPT_ROUTERALERT_MLD 0x0000 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 60 | struct rt0_hdr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 61 | struct ipv6_rt_hdr rt_hdr; | 
|  | 62 | __u32 reserved; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 63 | struct in6_addr addr[0]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 64 | #define rt0_type rt_hdr.type | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 65 | }; | 
|  | 66 | struct rt2_hdr { | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 67 | struct ipv6_rt_hdr rt_hdr; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 68 | __u32 reserved; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | struct in6_addr addr; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | #define rt2_type rt_hdr.type | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 71 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 72 | struct ipv6_destopt_hao { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 73 | __u8 type; | 
|  | 74 | __u8 length; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 75 | struct in6_addr addr; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 76 | } __attribute__((packed)); | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 77 | struct ipv6hdr { | 
|  | 78 | #ifdef __LITTLE_ENDIAN_BITFIELD | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 79 | __u8 priority : 4, version : 4; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 80 | #elif defined(__BIG_ENDIAN_BITFIELD) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 81 | __u8 version : 4, priority : 4; | 
|  | 82 | #else | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 83 | #error "Please fix <asm/byteorder.h>" | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 84 | #endif | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 85 | __u8 flow_lbl[3]; | 
|  | 86 | __be16 payload_len; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 87 | __u8 nexthdr; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 88 | __u8 hop_limit; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 89 | struct in6_addr saddr; | 
|  | 90 | struct in6_addr daddr; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 91 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 92 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 93 | DEVCONF_FORWARDING = 0, | 
|  | 94 | DEVCONF_HOPLIMIT, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 95 | DEVCONF_MTU6, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 96 | DEVCONF_ACCEPT_RA, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 97 | DEVCONF_ACCEPT_REDIRECTS, | 
|  | 98 | DEVCONF_AUTOCONF, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 99 | DEVCONF_DAD_TRANSMITS, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 100 | DEVCONF_RTR_SOLICITS, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 101 | DEVCONF_RTR_SOLICIT_INTERVAL, | 
|  | 102 | DEVCONF_RTR_SOLICIT_DELAY, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 103 | DEVCONF_USE_TEMPADDR, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 104 | DEVCONF_TEMP_VALID_LFT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 105 | DEVCONF_TEMP_PREFERED_LFT, | 
|  | 106 | DEVCONF_REGEN_MAX_RETRY, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 107 | DEVCONF_MAX_DESYNC_FACTOR, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 108 | DEVCONF_MAX_ADDRESSES, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 109 | DEVCONF_FORCE_MLD_VERSION, | 
|  | 110 | DEVCONF_ACCEPT_RA_DEFRTR, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 111 | DEVCONF_ACCEPT_RA_PINFO, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 112 | DEVCONF_ACCEPT_RA_RTR_PREF, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 113 | DEVCONF_RTR_PROBE_INTERVAL, | 
|  | 114 | DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 115 | DEVCONF_PROXY_NDP, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 116 | DEVCONF_OPTIMISTIC_DAD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 117 | DEVCONF_ACCEPT_SOURCE_ROUTE, | 
|  | 118 | DEVCONF_MC_FORWARDING, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 119 | DEVCONF_DISABLE_IPV6, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 120 | DEVCONF_ACCEPT_DAD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 121 | DEVCONF_FORCE_TLLAO, | 
|  | 122 | DEVCONF_NDISC_NOTIFY, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 123 | DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 124 | DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 125 | DEVCONF_SUPPRESS_FRAG_NDISC, | 
|  | 126 | DEVCONF_ACCEPT_RA_FROM_LOCAL, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 127 | DEVCONF_USE_OPTIMISTIC, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 128 | DEVCONF_ACCEPT_RA_MTU, | 
|  | 129 | DEVCONF_STABLE_SECRET, | 
|  | 130 | DEVCONF_USE_OIF_ADDRS_ONLY, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 131 | DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 132 | DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 133 | DEVCONF_DROP_UNICAST_IN_L2_MULTICAST, | 
|  | 134 | DEVCONF_DROP_UNSOLICITED_NA, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 135 | DEVCONF_KEEP_ADDR_ON_DOWN, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 136 | DEVCONF_RTR_SOLICIT_MAX_INTERVAL, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 137 | DEVCONF_SEG6_ENABLED, | 
|  | 138 | DEVCONF_SEG6_REQUIRE_HMAC, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 139 | DEVCONF_ENHANCED_DAD, | 
| Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 140 | DEVCONF_ADDR_GEN_MODE, | 
|  | 141 | DEVCONF_DISABLE_POLICY, | 
|  | 142 | DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN, | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 143 | DEVCONF_NDISC_TCLASS, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 144 | DEVCONF_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 145 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | #endif |