blob: 438cacc4e3d220c8cfab4b368804adc16db3653c [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 Ferris05d08e92016-02-04 13:16:38 -080023#include <linux/in6.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070024#include <asm/byteorder.h>
25#define IPV6_MIN_MTU 1280
Christopher Ferris05d08e92016-02-04 13:16:38 -080026#if __UAPI_DEF_IN6_PKTINFO
Ben Cheng655a7c02013-10-16 16:09:24 -070027struct in6_pktinfo {
Tao Baod7db5942015-01-28 10:07:51 -080028 struct in6_addr ipi6_addr;
Tao Baod7db5942015-01-28 10:07:51 -080029 int ipi6_ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -070030};
Christopher Ferris05d08e92016-02-04 13:16:38 -080031#endif
32#if __UAPI_DEF_IP6_MTUINFO
Ben Cheng655a7c02013-10-16 16:09:24 -070033struct ip6_mtuinfo {
Tao Baod7db5942015-01-28 10:07:51 -080034 struct sockaddr_in6 ip6m_addr;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u32 ip6m_mtu;
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
Christopher Ferris05d08e92016-02-04 13:16:38 -080037#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070038struct in6_ifreq {
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 struct in6_addr ifr6_addr;
Tao Baod7db5942015-01-28 10:07:51 -080040 __u32 ifr6_prefixlen;
41 int ifr6_ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Christopher Ferris05d08e92016-02-04 13:16:38 -080043#define IPV6_SRCRT_STRICT 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define IPV6_SRCRT_TYPE_0 0
45#define IPV6_SRCRT_TYPE_2 2
Christopher Ferrisaf09c702020-06-01 20:29:29 -070046#define IPV6_SRCRT_TYPE_3 3
Christopher Ferris48af7cb2017-02-21 12:35:09 -080047#define IPV6_SRCRT_TYPE_4 4
Christopher Ferris48af7cb2017-02-21 12:35:09 -080048struct ipv6_rt_hdr {
Christopher Ferris05d08e92016-02-04 13:16:38 -080049 __u8 nexthdr;
Tao Baod7db5942015-01-28 10:07:51 -080050 __u8 hdrlen;
51 __u8 type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080052 __u8 segments_left;
Christopher Ferris05d08e92016-02-04 13:16:38 -080053};
Ben Cheng655a7c02013-10-16 16:09:24 -070054struct ipv6_opt_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080055 __u8 nexthdr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080056 __u8 hdrlen;
Christopher Ferris05d08e92016-02-04 13:16:38 -080057} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070058#define ipv6_destopt_hdr ipv6_opt_hdr
59#define ipv6_hopopt_hdr ipv6_opt_hdr
Christopher Ferris48af7cb2017-02-21 12:35:09 -080060#define IPV6_OPT_ROUTERALERT_MLD 0x0000
Christopher Ferris05d08e92016-02-04 13:16:38 -080061struct rt0_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080062 struct ipv6_rt_hdr rt_hdr;
63 __u32 reserved;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080064 struct in6_addr addr[0];
Christopher Ferris05d08e92016-02-04 13:16:38 -080065#define rt0_type rt_hdr.type
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
67struct rt2_hdr {
Christopher Ferris48af7cb2017-02-21 12:35:09 -080068 struct ipv6_rt_hdr rt_hdr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080069 __u32 reserved;
Tao Baod7db5942015-01-28 10:07:51 -080070 struct in6_addr addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define rt2_type rt_hdr.type
Christopher Ferris48af7cb2017-02-21 12:35:09 -080072};
Christopher Ferris05d08e92016-02-04 13:16:38 -080073struct ipv6_destopt_hao {
Tao Baod7db5942015-01-28 10:07:51 -080074 __u8 type;
75 __u8 length;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080076 struct in6_addr addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080077} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070078struct ipv6hdr {
79#ifdef __LITTLE_ENDIAN_BITFIELD
Christopher Ferris48af7cb2017-02-21 12:35:09 -080080 __u8 priority : 4, version : 4;
Christopher Ferris05d08e92016-02-04 13:16:38 -080081#elif defined(__BIG_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -080082 __u8 version : 4, priority : 4;
83#else
Christopher Ferris48af7cb2017-02-21 12:35:09 -080084#error "Please fix <asm/byteorder.h>"
Christopher Ferris05d08e92016-02-04 13:16:38 -080085#endif
Tao Baod7db5942015-01-28 10:07:51 -080086 __u8 flow_lbl[3];
87 __be16 payload_len;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080088 __u8 nexthdr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080089 __u8 hop_limit;
Tao Baod7db5942015-01-28 10:07:51 -080090 struct in6_addr saddr;
91 struct in6_addr daddr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080092};
Christopher Ferris05d08e92016-02-04 13:16:38 -080093enum {
Tao Baod7db5942015-01-28 10:07:51 -080094 DEVCONF_FORWARDING = 0,
95 DEVCONF_HOPLIMIT,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080096 DEVCONF_MTU6,
Christopher Ferris05d08e92016-02-04 13:16:38 -080097 DEVCONF_ACCEPT_RA,
Tao Baod7db5942015-01-28 10:07:51 -080098 DEVCONF_ACCEPT_REDIRECTS,
99 DEVCONF_AUTOCONF,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800100 DEVCONF_DAD_TRANSMITS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800101 DEVCONF_RTR_SOLICITS,
Tao Baod7db5942015-01-28 10:07:51 -0800102 DEVCONF_RTR_SOLICIT_INTERVAL,
103 DEVCONF_RTR_SOLICIT_DELAY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800104 DEVCONF_USE_TEMPADDR,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800105 DEVCONF_TEMP_VALID_LFT,
Tao Baod7db5942015-01-28 10:07:51 -0800106 DEVCONF_TEMP_PREFERED_LFT,
107 DEVCONF_REGEN_MAX_RETRY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800108 DEVCONF_MAX_DESYNC_FACTOR,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109 DEVCONF_MAX_ADDRESSES,
Tao Baod7db5942015-01-28 10:07:51 -0800110 DEVCONF_FORCE_MLD_VERSION,
111 DEVCONF_ACCEPT_RA_DEFRTR,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800112 DEVCONF_ACCEPT_RA_PINFO,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113 DEVCONF_ACCEPT_RA_RTR_PREF,
Tao Baod7db5942015-01-28 10:07:51 -0800114 DEVCONF_RTR_PROBE_INTERVAL,
115 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800116 DEVCONF_PROXY_NDP,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800117 DEVCONF_OPTIMISTIC_DAD,
Tao Baod7db5942015-01-28 10:07:51 -0800118 DEVCONF_ACCEPT_SOURCE_ROUTE,
119 DEVCONF_MC_FORWARDING,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800120 DEVCONF_DISABLE_IPV6,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800121 DEVCONF_ACCEPT_DAD,
Tao Baod7db5942015-01-28 10:07:51 -0800122 DEVCONF_FORCE_TLLAO,
123 DEVCONF_NDISC_NOTIFY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800124 DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800125 DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL,
Tao Baod7db5942015-01-28 10:07:51 -0800126 DEVCONF_SUPPRESS_FRAG_NDISC,
127 DEVCONF_ACCEPT_RA_FROM_LOCAL,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800128 DEVCONF_USE_OPTIMISTIC,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800129 DEVCONF_ACCEPT_RA_MTU,
130 DEVCONF_STABLE_SECRET,
131 DEVCONF_USE_OIF_ADDRS_ONLY,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800132 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800133 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134 DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
135 DEVCONF_DROP_UNSOLICITED_NA,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800136 DEVCONF_KEEP_ADDR_ON_DOWN,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800137 DEVCONF_RTR_SOLICIT_MAX_INTERVAL,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800138 DEVCONF_SEG6_ENABLED,
139 DEVCONF_SEG6_REQUIRE_HMAC,
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800140 DEVCONF_ENHANCED_DAD,
Christopher Ferris525ce912017-07-26 13:12:53 -0700141 DEVCONF_ADDR_GEN_MODE,
142 DEVCONF_DISABLE_POLICY,
143 DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN,
Christopher Ferris934ec942018-01-31 15:29:16 -0800144 DEVCONF_NDISC_TCLASS,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700145 DEVCONF_RPL_SEG_ENABLED,
Christopher Ferrisa9750ed2021-05-03 14:02:49 -0700146 DEVCONF_RA_DEFRTR_METRIC,
Tao Baod7db5942015-01-28 10:07:51 -0800147 DEVCONF_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700148};
Ben Cheng655a7c02013-10-16 16:09:24 -0700149#endif