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