4 #define MAX_RTR_SOLICITATIONS 3
5 #define RTR_SOLICITATION_INTERVAL (4*HZ)
7 #define MIN_VALID_LIFETIME (2*3600)
9 #define TEMP_VALID_LIFETIME (7*86400)
10 #define TEMP_PREFERRED_LIFETIME (86400)
11 #define REGEN_MAX_RETRY (3)
12 #define MAX_DESYNC_FACTOR (600)
14 #define ADDR_CHECK_FREQUENCY (120*HZ)
16 #define IPV6_MAX_ADDRESSES 16
19 #include <linux/in6.h>
26 #if defined(__BIG_ENDIAN_BITFIELD)
30 #elif defined(__LITTLE_ENDIAN_BITFIELD)
35 #error "Please fix <asm/byteorder.h>"
45 #include <linux/netdevice.h>
49 #define IN6_ADDR_HSIZE_SHIFT 4
50 #define IN6_ADDR_HSIZE (1 << IN6_ADDR_HSIZE_SHIFT)
67 #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
68 extern int ipv6_chk_home_addr(
struct net *
net,
83 unsigned int srcprefs,
87 unsigned char banned_flags);
89 const struct sock *sk2);
95 static inline unsigned long addrconf_timeout_fixup(
u32 timeout,
98 if (timeout == 0xffffffff)
112 static inline int addrconf_finite_timeout(
unsigned long timeout)
125 int type,
int ifindex);
156 u8 *
opt,
int len,
bool sllao);
209 static inline void in6_dev_put(
struct inet6_dev *idev)
215 static inline void __in6_dev_put(
struct inet6_dev *idev)
220 static inline void in6_dev_hold(
struct inet6_dev *idev)
227 static inline void in6_ifa_put(
struct inet6_ifaddr *ifp)
233 static inline void __in6_ifa_put(
struct inet6_ifaddr *ifp)
238 static inline void in6_ifa_hold(
struct inet6_ifaddr *ifp)
248 static inline void addrconf_addr_solict_mult(
const struct in6_addr *
addr,
251 ipv6_addr_set(solicited,
252 htonl(0xFF020000), 0,
254 htonl(0xFF000000) | addr->s6_addr32[3]);
257 static inline int ipv6_addr_is_multicast(
const struct in6_addr *addr)
259 return (addr->s6_addr32[0] &
htonl(0xFF000000)) ==
htonl(0xFF000000);
262 static inline int ipv6_addr_is_ll_all_nodes(
const struct in6_addr *addr)
264 return ((addr->s6_addr32[0] ^
htonl(0xff020000)) |
265 addr->s6_addr32[1] | addr->s6_addr32[2] |
266 (addr->s6_addr32[3] ^
htonl(0x00000001))) == 0;
269 static inline int ipv6_addr_is_ll_all_routers(
const struct in6_addr *addr)
271 return ((addr->s6_addr32[0] ^
htonl(0xff020000)) |
272 addr->s6_addr32[1] | addr->s6_addr32[2] |
273 (addr->s6_addr32[3] ^
htonl(0x00000002))) == 0;
276 static inline int ipv6_addr_is_isatap(
const struct in6_addr *addr)
278 return (addr->s6_addr32[2] |
htonl(0x02000000)) ==
htonl(0x02005EFE);
281 #ifdef CONFIG_PROC_FS
282 extern int if6_proc_init(
void);
283 extern void if6_proc_exit(
void);