blob: d8fe3cdec28da4930dc98e18fa9ddef67e5ad68b [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_IPV6_H
20#define _UAPI_IPV6_H
Christopher Ferris05d08e92016-02-04 13:16:38 -080021#include <linux/libc-compat.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/types.h>
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080023#include <linux/stddef.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080024#include <linux/in6.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070025#include <asm/byteorder.h>
26#define IPV6_MIN_MTU 1280
Christopher Ferris05d08e92016-02-04 13:16:38 -080027#if __UAPI_DEF_IN6_PKTINFO
Ben Cheng655a7c02013-10-16 16:09:24 -070028struct in6_pktinfo {
Tao Baod7db5942015-01-28 10:07:51 -080029 struct in6_addr ipi6_addr;
Tao Baod7db5942015-01-28 10:07:51 -080030 int ipi6_ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -070031};
Christopher Ferris05d08e92016-02-04 13:16:38 -080032#endif
33#if __UAPI_DEF_IP6_MTUINFO
Ben Cheng655a7c02013-10-16 16:09:24 -070034struct ip6_mtuinfo {
Tao Baod7db5942015-01-28 10:07:51 -080035 struct sockaddr_in6 ip6m_addr;
Tao Baod7db5942015-01-28 10:07:51 -080036 __u32 ip6m_mtu;
Ben Cheng655a7c02013-10-16 16:09:24 -070037};
Christopher Ferris05d08e92016-02-04 13:16:38 -080038#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070039struct in6_ifreq {
Christopher Ferris05d08e92016-02-04 13:16:38 -080040 struct in6_addr ifr6_addr;
Tao Baod7db5942015-01-28 10:07:51 -080041 __u32 ifr6_prefixlen;
42 int ifr6_ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
Christopher Ferris05d08e92016-02-04 13:16:38 -080044#define IPV6_SRCRT_STRICT 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define IPV6_SRCRT_TYPE_0 0
46#define IPV6_SRCRT_TYPE_2 2
Christopher Ferrisaf09c702020-06-01 20:29:29 -070047#define IPV6_SRCRT_TYPE_3 3
Christopher Ferris48af7cb2017-02-21 12:35:09 -080048#define IPV6_SRCRT_TYPE_4 4
Christopher Ferris48af7cb2017-02-21 12:35:09 -080049struct ipv6_rt_hdr {
Christopher Ferris05d08e92016-02-04 13:16:38 -080050 __u8 nexthdr;
Tao Baod7db5942015-01-28 10:07:51 -080051 __u8 hdrlen;
52 __u8 type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080053 __u8 segments_left;
Christopher Ferris05d08e92016-02-04 13:16:38 -080054};
Ben Cheng655a7c02013-10-16 16:09:24 -070055struct ipv6_opt_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080056 __u8 nexthdr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080057 __u8 hdrlen;
Christopher Ferris05d08e92016-02-04 13:16:38 -080058} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define ipv6_destopt_hdr ipv6_opt_hdr
60#define ipv6_hopopt_hdr ipv6_opt_hdr
Christopher Ferris48af7cb2017-02-21 12:35:09 -080061#define IPV6_OPT_ROUTERALERT_MLD 0x0000
Christopher Ferris05d08e92016-02-04 13:16:38 -080062struct rt0_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080063 struct ipv6_rt_hdr rt_hdr;
64 __u32 reserved;
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070065 struct in6_addr addr[];
Christopher Ferris05d08e92016-02-04 13:16:38 -080066#define rt0_type rt_hdr.type
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
68struct rt2_hdr {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080069 struct ipv6_rt_hdr rt_hdr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080070 __u32 reserved;
Tao Baod7db5942015-01-28 10:07:51 -080071 struct in6_addr addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define rt2_type rt_hdr.type
Christopher Ferris48af7cb2017-02-21 12:35:09 -080073};
Christopher Ferris05d08e92016-02-04 13:16:38 -080074struct ipv6_destopt_hao {
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 type;
76 __u8 length;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080077 struct in6_addr addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080078} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070079struct ipv6hdr {
80#ifdef __LITTLE_ENDIAN_BITFIELD
Christopher Ferris48af7cb2017-02-21 12:35:09 -080081 __u8 priority : 4, version : 4;
Christopher Ferris05d08e92016-02-04 13:16:38 -080082#elif defined(__BIG_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -080083 __u8 version : 4, priority : 4;
84#else
Christopher Ferris48af7cb2017-02-21 12:35:09 -080085#error "Please fix <asm/byteorder.h>"
Christopher Ferris05d08e92016-02-04 13:16:38 -080086#endif
Tao Baod7db5942015-01-28 10:07:51 -080087 __u8 flow_lbl[3];
88 __be16 payload_len;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080089 __u8 nexthdr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080090 __u8 hop_limit;
Christopher Ferris6cd53a52022-12-12 23:39:16 +000091 __struct_group(, addrs,, struct in6_addr saddr;
Tao Baod7db5942015-01-28 10:07:51 -080092 struct in6_addr daddr;
Christopher Ferris6cd53a52022-12-12 23:39:16 +000093 );
Christopher Ferris48af7cb2017-02-21 12:35:09 -080094};
Christopher Ferris05d08e92016-02-04 13:16:38 -080095enum {
Tao Baod7db5942015-01-28 10:07:51 -080096 DEVCONF_FORWARDING = 0,
97 DEVCONF_HOPLIMIT,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080098 DEVCONF_MTU6,
Christopher Ferris05d08e92016-02-04 13:16:38 -080099 DEVCONF_ACCEPT_RA,
Tao Baod7db5942015-01-28 10:07:51 -0800100 DEVCONF_ACCEPT_REDIRECTS,
101 DEVCONF_AUTOCONF,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800102 DEVCONF_DAD_TRANSMITS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103 DEVCONF_RTR_SOLICITS,
Tao Baod7db5942015-01-28 10:07:51 -0800104 DEVCONF_RTR_SOLICIT_INTERVAL,
105 DEVCONF_RTR_SOLICIT_DELAY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800106 DEVCONF_USE_TEMPADDR,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800107 DEVCONF_TEMP_VALID_LFT,
Tao Baod7db5942015-01-28 10:07:51 -0800108 DEVCONF_TEMP_PREFERED_LFT,
109 DEVCONF_REGEN_MAX_RETRY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800110 DEVCONF_MAX_DESYNC_FACTOR,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800111 DEVCONF_MAX_ADDRESSES,
Tao Baod7db5942015-01-28 10:07:51 -0800112 DEVCONF_FORCE_MLD_VERSION,
113 DEVCONF_ACCEPT_RA_DEFRTR,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800114 DEVCONF_ACCEPT_RA_PINFO,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115 DEVCONF_ACCEPT_RA_RTR_PREF,
Tao Baod7db5942015-01-28 10:07:51 -0800116 DEVCONF_RTR_PROBE_INTERVAL,
117 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800118 DEVCONF_PROXY_NDP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119 DEVCONF_OPTIMISTIC_DAD,
Tao Baod7db5942015-01-28 10:07:51 -0800120 DEVCONF_ACCEPT_SOURCE_ROUTE,
121 DEVCONF_MC_FORWARDING,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800122 DEVCONF_DISABLE_IPV6,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123 DEVCONF_ACCEPT_DAD,
Tao Baod7db5942015-01-28 10:07:51 -0800124 DEVCONF_FORCE_TLLAO,
125 DEVCONF_NDISC_NOTIFY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800126 DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800127 DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL,
Tao Baod7db5942015-01-28 10:07:51 -0800128 DEVCONF_SUPPRESS_FRAG_NDISC,
129 DEVCONF_ACCEPT_RA_FROM_LOCAL,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800130 DEVCONF_USE_OPTIMISTIC,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800131 DEVCONF_ACCEPT_RA_MTU,
132 DEVCONF_STABLE_SECRET,
133 DEVCONF_USE_OIF_ADDRS_ONLY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800134 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800135 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700136 DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
137 DEVCONF_DROP_UNSOLICITED_NA,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800138 DEVCONF_KEEP_ADDR_ON_DOWN,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800139 DEVCONF_RTR_SOLICIT_MAX_INTERVAL,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800140 DEVCONF_SEG6_ENABLED,
141 DEVCONF_SEG6_REQUIRE_HMAC,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800142 DEVCONF_ENHANCED_DAD,
Christopher Ferris525ce912017-07-26 13:12:53 -0700143 DEVCONF_ADDR_GEN_MODE,
144 DEVCONF_DISABLE_POLICY,
145 DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN,
Christopher Ferris934ec942018-01-31 15:29:16 -0800146 DEVCONF_NDISC_TCLASS,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700147 DEVCONF_RPL_SEG_ENABLED,
Christopher Ferrisa9750ed2021-05-03 14:02:49 -0700148 DEVCONF_RA_DEFRTR_METRIC,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700149 DEVCONF_IOAM6_ENABLED,
150 DEVCONF_IOAM6_ID,
151 DEVCONF_IOAM6_ID_WIDE,
Christopher Ferrisa4792612022-01-10 13:51:15 -0800152 DEVCONF_NDISC_EVICT_NOCARRIER,
Christopher Ferris80ae69d2022-08-02 16:32:21 -0700153 DEVCONF_ACCEPT_UNTRACKED_NA,
Tao Baod7db5942015-01-28 10:07:51 -0800154 DEVCONF_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700155};
Ben Cheng655a7c02013-10-16 16:09:24 -0700156#endif