blob: 8dd32383d4144ca6d7d3e5247f7066f78ef9712e [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_IN6_H
20#define _UAPI_LINUX_IN6_H
21#include <linux/types.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070022#include <linux/libc-compat.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070023#if __UAPI_DEF_IN6_ADDR
24struct in6_addr {
Tao Baod7db5942015-01-28 10:07:51 -080025 union {
26 __u8 u6_addr8[16];
Christopher Ferris38062f92014-07-09 15:33:25 -070027#if __UAPI_DEF_IN6_ADDR_ALT
Tao Baod7db5942015-01-28 10:07:51 -080028 __be16 u6_addr16[8];
29 __be32 u6_addr32[4];
Christopher Ferris38062f92014-07-09 15:33:25 -070030#endif
Tao Baod7db5942015-01-28 10:07:51 -080031 } in6_u;
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define s6_addr in6_u.u6_addr8
Christopher Ferris38062f92014-07-09 15:33:25 -070033#if __UAPI_DEF_IN6_ADDR_ALT
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define s6_addr16 in6_u.u6_addr16
Christopher Ferris38062f92014-07-09 15:33:25 -070035#define s6_addr32 in6_u.u6_addr32
36#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070037};
Christopher Ferris38062f92014-07-09 15:33:25 -070038#endif
Christopher Ferris38062f92014-07-09 15:33:25 -070039#if __UAPI_DEF_SOCKADDR_IN6
Ben Cheng655a7c02013-10-16 16:09:24 -070040struct sockaddr_in6 {
Tao Baod7db5942015-01-28 10:07:51 -080041 unsigned short int sin6_family;
42 __be16 sin6_port;
Tao Baod7db5942015-01-28 10:07:51 -080043 __be32 sin6_flowinfo;
44 struct in6_addr sin6_addr;
45 __u32 sin6_scope_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
Christopher Ferris38062f92014-07-09 15:33:25 -070047#endif
48#if __UAPI_DEF_IPV6_MREQ
Ben Cheng655a7c02013-10-16 16:09:24 -070049struct ipv6_mreq {
Tao Baod7db5942015-01-28 10:07:51 -080050 struct in6_addr ipv6mr_multiaddr;
Tao Baod7db5942015-01-28 10:07:51 -080051 int ipv6mr_ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
Christopher Ferris38062f92014-07-09 15:33:25 -070053#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070054#define ipv6mr_acaddr ipv6mr_multiaddr
55struct in6_flowlabel_req {
Tao Baod7db5942015-01-28 10:07:51 -080056 struct in6_addr flr_dst;
57 __be32 flr_label;
58 __u8 flr_action;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u8 flr_share;
60 __u16 flr_flags;
61 __u16 flr_expires;
62 __u16 flr_linger;
Tao Baod7db5942015-01-28 10:07:51 -080063 __u32 __flr_pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070064};
65#define IPV6_FL_A_GET 0
Ben Cheng655a7c02013-10-16 16:09:24 -070066#define IPV6_FL_A_PUT 1
67#define IPV6_FL_A_RENEW 2
68#define IPV6_FL_F_CREATE 1
69#define IPV6_FL_F_EXCL 2
Christopher Ferris38062f92014-07-09 15:33:25 -070070#define IPV6_FL_F_REFLECT 4
Christopher Ferris38062f92014-07-09 15:33:25 -070071#define IPV6_FL_F_REMOTE 8
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define IPV6_FL_S_NONE 0
73#define IPV6_FL_S_EXCL 1
74#define IPV6_FL_S_PROCESS 2
Christopher Ferris38062f92014-07-09 15:33:25 -070075#define IPV6_FL_S_USER 3
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define IPV6_FL_S_ANY 255
77#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
78#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
Christopher Ferris38062f92014-07-09 15:33:25 -070079#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define IPV6_PRIORITY_FILLER 0x0100
81#define IPV6_PRIORITY_UNATTENDED 0x0200
82#define IPV6_PRIORITY_RESERVED1 0x0300
Christopher Ferris38062f92014-07-09 15:33:25 -070083#define IPV6_PRIORITY_BULK 0x0400
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define IPV6_PRIORITY_RESERVED2 0x0500
85#define IPV6_PRIORITY_INTERACTIVE 0x0600
86#define IPV6_PRIORITY_CONTROL 0x0700
Christopher Ferris38062f92014-07-09 15:33:25 -070087#define IPV6_PRIORITY_8 0x0800
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define IPV6_PRIORITY_9 0x0900
89#define IPV6_PRIORITY_10 0x0a00
90#define IPV6_PRIORITY_11 0x0b00
Christopher Ferris38062f92014-07-09 15:33:25 -070091#define IPV6_PRIORITY_12 0x0c00
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define IPV6_PRIORITY_13 0x0d00
93#define IPV6_PRIORITY_14 0x0e00
94#define IPV6_PRIORITY_15 0x0f00
Christopher Ferris38062f92014-07-09 15:33:25 -070095#if __UAPI_DEF_IPPROTO_V6
96#define IPPROTO_HOPOPTS 0
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define IPPROTO_ROUTING 43
98#define IPPROTO_FRAGMENT 44
99#define IPPROTO_ICMPV6 58
100#define IPPROTO_NONE 59
Ben Cheng655a7c02013-10-16 16:09:24 -0700101#define IPPROTO_DSTOPTS 60
102#define IPPROTO_MH 135
Christopher Ferris38062f92014-07-09 15:33:25 -0700103#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#define IPV6_TLV_PAD1 0
105#define IPV6_TLV_PADN 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define IPV6_TLV_ROUTERALERT 5
Christopher Ferris49f525c2016-12-12 14:55:36 -0800107#define IPV6_TLV_CALIPSO 7
Ben Cheng655a7c02013-10-16 16:09:24 -0700108#define IPV6_TLV_JUMBO 194
109#define IPV6_TLV_HAO 201
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700110#if __UAPI_DEF_IPV6_OPTIONS
Christopher Ferris49f525c2016-12-12 14:55:36 -0800111#define IPV6_ADDRFORM 1
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700112#define IPV6_2292PKTINFO 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700113#define IPV6_2292HOPOPTS 3
114#define IPV6_2292DSTOPTS 4
Christopher Ferris49f525c2016-12-12 14:55:36 -0800115#define IPV6_2292RTHDR 5
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700116#define IPV6_2292PKTOPTIONS 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#define IPV6_CHECKSUM 7
118#define IPV6_2292HOPLIMIT 8
Christopher Ferris49f525c2016-12-12 14:55:36 -0800119#define IPV6_NEXTHOP 9
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700120#define IPV6_AUTHHDR 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700121#define IPV6_FLOWINFO 11
122#define IPV6_UNICAST_HOPS 16
Christopher Ferris49f525c2016-12-12 14:55:36 -0800123#define IPV6_MULTICAST_IF 17
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700124#define IPV6_MULTICAST_HOPS 18
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#define IPV6_MULTICAST_LOOP 19
126#define IPV6_ADD_MEMBERSHIP 20
Christopher Ferris49f525c2016-12-12 14:55:36 -0800127#define IPV6_DROP_MEMBERSHIP 21
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700128#define IPV6_ROUTER_ALERT 22
Ben Cheng655a7c02013-10-16 16:09:24 -0700129#define IPV6_MTU_DISCOVER 23
130#define IPV6_MTU 24
Christopher Ferris49f525c2016-12-12 14:55:36 -0800131#define IPV6_RECVERR 25
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700132#define IPV6_V6ONLY 26
Ben Cheng655a7c02013-10-16 16:09:24 -0700133#define IPV6_JOIN_ANYCAST 27
134#define IPV6_LEAVE_ANYCAST 28
Christopher Ferris86a48372019-01-10 14:14:59 -0800135#define IPV6_MULTICAST_ALL 29
Christopher Ferris24f97eb2019-05-20 12:58:13 -0700136#define IPV6_ROUTER_ALERT_ISOLATE 30
Christopher Ferris25c18d42020-10-14 17:42:58 -0700137#define IPV6_RECVERR_RFC4884 31
Christopher Ferris49f525c2016-12-12 14:55:36 -0800138#define IPV6_PMTUDISC_DONT 0
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700139#define IPV6_PMTUDISC_WANT 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700140#define IPV6_PMTUDISC_DO 2
141#define IPV6_PMTUDISC_PROBE 3
Christopher Ferris49f525c2016-12-12 14:55:36 -0800142#define IPV6_PMTUDISC_INTERFACE 4
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700143#define IPV6_PMTUDISC_OMIT 5
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700144#define IPV6_FLOWLABEL_MGR 32
Ben Cheng655a7c02013-10-16 16:09:24 -0700145#define IPV6_FLOWINFO_SEND 33
Christopher Ferris49f525c2016-12-12 14:55:36 -0800146#define IPV6_IPSEC_POLICY 34
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700147#define IPV6_XFRM_POLICY 35
Christopher Ferris106b3a82016-08-24 12:15:38 -0700148#define IPV6_HDRINCL 36
Christopher Ferrise01d32f2015-03-31 14:57:48 -0700149#endif
Christopher Ferris49f525c2016-12-12 14:55:36 -0800150#define IPV6_RECVPKTINFO 49
Christopher Ferris106b3a82016-08-24 12:15:38 -0700151#define IPV6_PKTINFO 50
Ben Cheng655a7c02013-10-16 16:09:24 -0700152#define IPV6_RECVHOPLIMIT 51
153#define IPV6_HOPLIMIT 52
Christopher Ferris49f525c2016-12-12 14:55:36 -0800154#define IPV6_RECVHOPOPTS 53
Christopher Ferris106b3a82016-08-24 12:15:38 -0700155#define IPV6_HOPOPTS 54
Ben Cheng655a7c02013-10-16 16:09:24 -0700156#define IPV6_RTHDRDSTOPTS 55
157#define IPV6_RECVRTHDR 56
Christopher Ferris49f525c2016-12-12 14:55:36 -0800158#define IPV6_RTHDR 57
Christopher Ferris106b3a82016-08-24 12:15:38 -0700159#define IPV6_RECVDSTOPTS 58
Ben Cheng655a7c02013-10-16 16:09:24 -0700160#define IPV6_DSTOPTS 59
161#define IPV6_RECVPATHMTU 60
Christopher Ferris49f525c2016-12-12 14:55:36 -0800162#define IPV6_PATHMTU 61
Christopher Ferris106b3a82016-08-24 12:15:38 -0700163#define IPV6_DONTFRAG 62
Ben Cheng655a7c02013-10-16 16:09:24 -0700164#define IPV6_RECVTCLASS 66
165#define IPV6_TCLASS 67
Christopher Ferris49f525c2016-12-12 14:55:36 -0800166#define IPV6_AUTOFLOWLABEL 70
Christopher Ferris106b3a82016-08-24 12:15:38 -0700167#define IPV6_ADDR_PREFERENCES 72
Ben Cheng655a7c02013-10-16 16:09:24 -0700168#define IPV6_PREFER_SRC_TMP 0x0001
169#define IPV6_PREFER_SRC_PUBLIC 0x0002
Christopher Ferris49f525c2016-12-12 14:55:36 -0800170#define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
Christopher Ferris106b3a82016-08-24 12:15:38 -0700171#define IPV6_PREFER_SRC_COA 0x0004
Ben Cheng655a7c02013-10-16 16:09:24 -0700172#define IPV6_PREFER_SRC_HOME 0x0400
173#define IPV6_PREFER_SRC_CGA 0x0008
Christopher Ferris49f525c2016-12-12 14:55:36 -0800174#define IPV6_PREFER_SRC_NONCGA 0x0800
Christopher Ferris106b3a82016-08-24 12:15:38 -0700175#define IPV6_MINHOPCOUNT 73
Ben Cheng655a7c02013-10-16 16:09:24 -0700176#define IPV6_ORIGDSTADDR 74
177#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR
Christopher Ferris49f525c2016-12-12 14:55:36 -0800178#define IPV6_TRANSPARENT 75
Christopher Ferris106b3a82016-08-24 12:15:38 -0700179#define IPV6_UNICAST_IF 76
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800180#define IPV6_RECVFRAGSIZE 77
Christopher Ferris934ec942018-01-31 15:29:16 -0800181#define IPV6_FREEBIND 78
Ben Cheng655a7c02013-10-16 16:09:24 -0700182#endif