1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 #include <linux/libc-compat.h>
6 #include <linux/types.h>
7 #include <linux/stddef.h>
9 #include <asm/byteorder.h>
11 /* The latest drafts declared increase in minimal mtu up to 1280. */
13 #define IPV6_MIN_MTU 1280
17 * source interface/address selection, source routing, etc...
18 * *under construction*
21 #if __UAPI_DEF_IN6_PKTINFO
23 struct in6_addr ipi6_addr
;
28 #if __UAPI_DEF_IP6_MTUINFO
30 struct sockaddr_in6 ip6m_addr
;
36 struct in6_addr ifr6_addr
;
41 #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */
42 #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */
43 #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */
44 #define IPV6_SRCRT_TYPE_3 3 /* RPL Segment Routing with IPv6 */
45 #define IPV6_SRCRT_TYPE_4 4 /* Segment Routing with IPv6 */
58 * variable length field
67 * TLV encoded option data follows.
69 } __attribute__((packed
)); /* required for some archs */
71 #define ipv6_destopt_hdr ipv6_opt_hdr
72 #define ipv6_hopopt_hdr ipv6_opt_hdr
74 /* Router Alert option values (RFC2711) */
75 #define IPV6_OPT_ROUTERALERT_MLD 0x0000 /* MLD(RFC2710) */
78 * routing header type 0 (used in cmsghdr struct)
82 struct ipv6_rt_hdr rt_hdr
;
84 struct in6_addr addr
[];
86 #define rt0_type rt_hdr.type
90 * routing header type 2
94 struct ipv6_rt_hdr rt_hdr
;
98 #define rt2_type rt_hdr.type
102 * home address option in destination options header
105 struct ipv6_destopt_hao
{
108 struct in6_addr addr
;
109 } __attribute__((packed
));
114 * BEWARE, it is incorrect. The first 4 bits of flow_lbl
115 * are glued to priority now, forming "class".
119 #if defined(__LITTLE_ENDIAN_BITFIELD)
122 #elif defined(__BIG_ENDIAN_BITFIELD)
126 #error "Please fix <asm/byteorder.h>"
134 __struct_group(/* no tag */, addrs
, /* no attrs */,
135 struct in6_addr saddr
;
136 struct in6_addr daddr
;
141 /* index values for the variables in ipv6_devconf */
143 DEVCONF_FORWARDING
= 0,
147 DEVCONF_ACCEPT_REDIRECTS
,
149 DEVCONF_DAD_TRANSMITS
,
150 DEVCONF_RTR_SOLICITS
,
151 DEVCONF_RTR_SOLICIT_INTERVAL
,
152 DEVCONF_RTR_SOLICIT_DELAY
,
153 DEVCONF_USE_TEMPADDR
,
154 DEVCONF_TEMP_VALID_LFT
,
155 DEVCONF_TEMP_PREFERED_LFT
,
156 DEVCONF_REGEN_MAX_RETRY
,
157 DEVCONF_MAX_DESYNC_FACTOR
,
158 DEVCONF_MAX_ADDRESSES
,
159 DEVCONF_FORCE_MLD_VERSION
,
160 DEVCONF_ACCEPT_RA_DEFRTR
,
161 DEVCONF_ACCEPT_RA_PINFO
,
162 DEVCONF_ACCEPT_RA_RTR_PREF
,
163 DEVCONF_RTR_PROBE_INTERVAL
,
164 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN
,
166 DEVCONF_OPTIMISTIC_DAD
,
167 DEVCONF_ACCEPT_SOURCE_ROUTE
,
168 DEVCONF_MC_FORWARDING
,
169 DEVCONF_DISABLE_IPV6
,
172 DEVCONF_NDISC_NOTIFY
,
173 DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL
,
174 DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL
,
175 DEVCONF_SUPPRESS_FRAG_NDISC
,
176 DEVCONF_ACCEPT_RA_FROM_LOCAL
,
177 DEVCONF_USE_OPTIMISTIC
,
178 DEVCONF_ACCEPT_RA_MTU
,
179 DEVCONF_STABLE_SECRET
,
180 DEVCONF_USE_OIF_ADDRS_ONLY
,
181 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT
,
182 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN
,
183 DEVCONF_DROP_UNICAST_IN_L2_MULTICAST
,
184 DEVCONF_DROP_UNSOLICITED_NA
,
185 DEVCONF_KEEP_ADDR_ON_DOWN
,
186 DEVCONF_RTR_SOLICIT_MAX_INTERVAL
,
187 DEVCONF_SEG6_ENABLED
,
188 DEVCONF_SEG6_REQUIRE_HMAC
,
189 DEVCONF_ENHANCED_DAD
,
190 DEVCONF_ADDR_GEN_MODE
,
191 DEVCONF_DISABLE_POLICY
,
192 DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN
,
193 DEVCONF_NDISC_TCLASS
,
194 DEVCONF_RPL_SEG_ENABLED
,
195 DEVCONF_RA_DEFRTR_METRIC
,
196 DEVCONF_IOAM6_ENABLED
,
198 DEVCONF_IOAM6_ID_WIDE
,
199 DEVCONF_NDISC_EVICT_NOCARRIER
,
200 DEVCONF_ACCEPT_UNTRACKED_NA
,
201 DEVCONF_ACCEPT_RA_MIN_LFT
,
206 #endif /* _UAPI_IPV6_H */