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 ****************************************************************************
11 ****************************************************************************/
12#ifndef _IPV6_H
13#define _IPV6_H
14
15#include <linux/types.h>
16#include <linux/in6.h>
17#include <asm/byteorder.h>
18
19#define IPV6_MIN_MTU 1280
20
21struct in6_pktinfo {
22 struct in6_addr ipi6_addr;
23 int ipi6_ifindex;
24};
25
26struct ip6_mtuinfo {
27 struct sockaddr_in6 ip6m_addr;
28 __u32 ip6m_mtu;
29};
30
31struct in6_ifreq {
32 struct in6_addr ifr6_addr;
33 __u32 ifr6_prefixlen;
34 int ifr6_ifindex;
35};
36
37#define IPV6_SRCRT_STRICT 0x01
38#define IPV6_SRCRT_TYPE_0 0
39#define IPV6_SRCRT_TYPE_2 2
40
41struct ipv6_rt_hdr {
42 __u8 nexthdr;
43 __u8 hdrlen;
44 __u8 type;
45 __u8 segments_left;
46
47};
48
49struct ipv6_opt_hdr {
50 __u8 nexthdr;
51 __u8 hdrlen;
52
53} __attribute__((packed));
54
55#define ipv6_destopt_hdr ipv6_opt_hdr
56#define ipv6_hopopt_hdr ipv6_opt_hdr
57
58struct rt0_hdr {
59 struct ipv6_rt_hdr rt_hdr;
60 __u32 reserved;
61 struct in6_addr addr[0];
62
63#define rt0_type rt_hdr.type
64};
65
66struct rt2_hdr {
67 struct ipv6_rt_hdr rt_hdr;
68 __u32 reserved;
69 struct in6_addr addr;
70
71#define rt2_type rt_hdr.type
72};
73
74struct ipv6_destopt_hao {
75 __u8 type;
76 __u8 length;
77 struct in6_addr addr;
78} __attribute__((packed));
79
80struct ipv6hdr {
81#ifdef __LITTLE_ENDIAN_BITFIELD
82 __u8 priority:4,
83 version:4;
84#elif defined(__BIG_ENDIAN_BITFIELD)
85 __u8 version:4,
86 priority:4;
87#else
88#error "Please fix <asm/byteorder.h>"
89#endif
90 __u8 flow_lbl[3];
91
92 __be16 payload_len;
93 __u8 nexthdr;
94 __u8 hop_limit;
95
96 struct in6_addr saddr;
97 struct in6_addr daddr;
98};
99
100enum {
101 DEVCONF_FORWARDING = 0,
102 DEVCONF_HOPLIMIT,
103 DEVCONF_MTU6,
104 DEVCONF_ACCEPT_RA,
105 DEVCONF_ACCEPT_REDIRECTS,
106 DEVCONF_AUTOCONF,
107 DEVCONF_DAD_TRANSMITS,
108 DEVCONF_RTR_SOLICITS,
109 DEVCONF_RTR_SOLICIT_INTERVAL,
110 DEVCONF_RTR_SOLICIT_DELAY,
111 DEVCONF_USE_TEMPADDR,
112 DEVCONF_TEMP_VALID_LFT,
113 DEVCONF_TEMP_PREFERED_LFT,
114 DEVCONF_REGEN_MAX_RETRY,
115 DEVCONF_MAX_DESYNC_FACTOR,
116 DEVCONF_MAX_ADDRESSES,
117 DEVCONF_FORCE_MLD_VERSION,
118 DEVCONF_ACCEPT_RA_DEFRTR,
119 DEVCONF_ACCEPT_RA_PINFO,
120 DEVCONF_ACCEPT_RA_RTR_PREF,
121 DEVCONF_RTR_PROBE_INTERVAL,
122 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
123 DEVCONF_PROXY_NDP,
124 DEVCONF_OPTIMISTIC_DAD,
125 DEVCONF_ACCEPT_SOURCE_ROUTE,
126 DEVCONF_MC_FORWARDING,
127 DEVCONF_DISABLE_IPV6,
128 DEVCONF_ACCEPT_DAD,
129 DEVCONF_FORCE_TLLAO,
130 DEVCONF_MAX
131};
132
133#endif
134