15 #ifndef _NET_IF_INET6_H
16 #define _NET_IF_INET6_H
19 #include <linux/ipv6.h>
23 #define IF_RA_OTHERCONF 0x80
24 #define IF_RA_MANAGED 0x40
25 #define IF_RA_RCVD 0x20
26 #define IF_RS_SENT 0x10
27 #define IF_READY 0x80000000
30 #define IF_PREFIX_ONLINK 0x01
31 #define IF_PREFIX_AUTOCONF 0x02
69 #ifdef CONFIG_IPV6_PRIVACY
83 #define IP6_SFLSIZE(count) (sizeof(struct ip6_sf_socklist) + \
84 (count) * sizeof(struct in6_addr))
86 #define IP6_SFBLOCK 10
107 #define MAF_TIMER_RUNNING 0x01
108 #define MAF_LAST_REPORTER 0x02
109 #define MAF_LOADED 0x04
110 #define MAF_NOREPORT 0x08
111 #define MAF_GSQUERY 0x10
151 #define IFA_HOST IPV6_ADDR_LOOPBACK
152 #define IFA_LINK IPV6_ADDR_LINKLOCAL
153 #define IFA_SITE IPV6_ADDR_SITELOCAL
184 #ifdef CONFIG_IPV6_PRIVACY
198 static inline void ipv6_eth_mc_map(
const struct in6_addr *
addr,
char *
buf)
209 memcpy(buf + 2, &addr->s6_addr32[3],
sizeof(
__u32));
212 static inline void ipv6_arcnet_mc_map(
const struct in6_addr *
addr,
char *
buf)
217 static inline void ipv6_ib_mc_map(
const struct in6_addr *
addr,
218 const unsigned char *broadcast,
char *
buf)
220 unsigned char scope = broadcast[5] & 0xF;
227 buf[5] = 0x10 |
scope;
230 buf[8] = broadcast[8];
231 buf[9] = broadcast[9];
232 memcpy(buf + 10, addr->s6_addr + 6, 10);
235 static inline int ipv6_ipgre_mc_map(
const struct in6_addr *
addr,
236 const unsigned char *broadcast,
char *
buf)
238 if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) {
239 memcpy(buf, broadcast, 4);
242 if ((addr->s6_addr32[0] | addr->s6_addr32[1] |
243 (addr->s6_addr32[2] ^
htonl(0x0000ffff))) != 0)
245 memcpy(buf, &addr->s6_addr32[3], 4);