RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / arm-brcm-linux-uclibcgnueabi / sysroot / usr / include / linux / ipv6.h
blob1d842cd448db6203bc54e2045cc3146ef807f46a
1 #ifndef _IPV6_H
2 #define _IPV6_H
4 #include <linux/types.h>
5 #include <linux/in6.h>
6 #include <asm/byteorder.h>
8 /* The latest drafts declared increase in minimal mtu up to 1280. */
10 #define IPV6_MIN_MTU 1280
13 * Advanced API
14 * source interface/address selection, source routing, etc...
15 * *under construction*
19 struct in6_pktinfo {
20 struct in6_addr ipi6_addr;
21 int ipi6_ifindex;
24 struct ip6_mtuinfo {
25 struct sockaddr_in6 ip6m_addr;
26 __u32 ip6m_mtu;
29 struct in6_ifreq {
30 struct in6_addr ifr6_addr;
31 __u32 ifr6_prefixlen;
32 int ifr6_ifindex;
35 #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */
36 #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */
37 #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */
40 * routing header
42 struct ipv6_rt_hdr {
43 __u8 nexthdr;
44 __u8 hdrlen;
45 __u8 type;
46 __u8 segments_left;
49 * type specific data
50 * variable length field
55 struct ipv6_opt_hdr {
56 __u8 nexthdr;
57 __u8 hdrlen;
58 /*
59 * TLV encoded option data follows.
61 } __attribute__((packed)); /* required for some archs */
63 #define ipv6_destopt_hdr ipv6_opt_hdr
64 #define ipv6_hopopt_hdr ipv6_opt_hdr
68 * routing header type 0 (used in cmsghdr struct)
71 struct rt0_hdr {
72 struct ipv6_rt_hdr rt_hdr;
73 __u32 reserved;
74 struct in6_addr addr[0];
76 #define rt0_type rt_hdr.type
80 * routing header type 2
83 struct rt2_hdr {
84 struct ipv6_rt_hdr rt_hdr;
85 __u32 reserved;
86 struct in6_addr addr;
88 #define rt2_type rt_hdr.type
92 * home address option in destination options header
95 struct ipv6_destopt_hao {
96 __u8 type;
97 __u8 length;
98 struct in6_addr addr;
99 } __attribute__((packed));
102 * IPv6 fixed header
104 * BEWARE, it is incorrect. The first 4 bits of flow_lbl
105 * are glued to priority now, forming "class".
108 struct ipv6hdr {
109 #if defined(__LITTLE_ENDIAN_BITFIELD)
110 __u8 priority:4,
111 version:4;
112 #elif defined(__BIG_ENDIAN_BITFIELD)
113 __u8 version:4,
114 priority:4;
115 #else
116 #error "Please fix <asm/byteorder.h>"
117 #endif
118 __u8 flow_lbl[3];
120 __be16 payload_len;
121 __u8 nexthdr;
122 __u8 hop_limit;
124 struct in6_addr saddr;
125 struct in6_addr daddr;
129 /* index values for the variables in ipv6_devconf */
130 enum {
131 DEVCONF_FORWARDING = 0,
132 DEVCONF_HOPLIMIT,
133 DEVCONF_MTU6,
134 DEVCONF_ACCEPT_RA,
135 DEVCONF_ACCEPT_REDIRECTS,
136 DEVCONF_AUTOCONF,
137 DEVCONF_DAD_TRANSMITS,
138 DEVCONF_RTR_SOLICITS,
139 DEVCONF_RTR_SOLICIT_INTERVAL,
140 DEVCONF_RTR_SOLICIT_DELAY,
141 DEVCONF_USE_TEMPADDR,
142 DEVCONF_TEMP_VALID_LFT,
143 DEVCONF_TEMP_PREFERED_LFT,
144 DEVCONF_REGEN_MAX_RETRY,
145 DEVCONF_MAX_DESYNC_FACTOR,
146 DEVCONF_MAX_ADDRESSES,
147 DEVCONF_FORCE_MLD_VERSION,
148 DEVCONF_ACCEPT_RA_DEFRTR,
149 DEVCONF_ACCEPT_RA_PINFO,
150 DEVCONF_ACCEPT_RA_RTR_PREF,
151 DEVCONF_RTR_PROBE_INTERVAL,
152 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
153 DEVCONF_PROXY_NDP,
154 DEVCONF_OPTIMISTIC_DAD,
155 DEVCONF_ACCEPT_SOURCE_ROUTE,
156 DEVCONF_MC_FORWARDING,
157 DEVCONF_DISABLE_IPV6,
158 DEVCONF_ACCEPT_DAD,
159 DEVCONF_FORCE_TLLAO,
160 DEVCONF_MAX
164 #endif /* _IPV6_H */