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