8 #define NDISC_ROUTER_SOLICITATION 133
9 #define NDISC_ROUTER_ADVERTISEMENT 134
10 #define NDISC_NEIGHBOUR_SOLICITATION 135
11 #define NDISC_NEIGHBOUR_ADVERTISEMENT 136
12 #define NDISC_REDIRECT 137
18 #define NDISC_NODETYPE_UNSPEC 0
19 #define NDISC_NODETYPE_HOST 1
20 #define NDISC_NODETYPE_NODEFAULT 2
21 #define NDISC_NODETYPE_DEFAULT 3
41 #define MAX_RTR_SOLICITATION_DELAY HZ
43 #define ND_REACHABLE_TIME (30*HZ)
44 #define ND_RETRANS_TIMER HZ
46 #include <linux/compiler.h>
47 #include <linux/icmpv6.h>
48 #include <linux/in6.h>
49 #include <linux/types.h>
50 #include <linux/if_arp.h>
51 #include <linux/netdevice.h>
52 #include <linux/hash.h>
89 #ifdef CONFIG_IPV6_ROUTE_INFO
97 #define nd_opts_src_lladdr nd_opt_array[ND_OPT_SOURCE_LL_ADDR]
98 #define nd_opts_tgt_lladdr nd_opt_array[ND_OPT_TARGET_LL_ADDR]
99 #define nd_opts_pi nd_opt_array[ND_OPT_PREFIX_INFO]
100 #define nd_opts_pi_end nd_opt_array[__ND_OPT_PREFIX_INFO_END]
101 #define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
102 #define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
104 #define NDISC_OPT_SPACE(len) (((len)+2+7)&~7)
115 static int ndisc_addr_option_pad(
unsigned short type)
126 u8 *lladdr = (
u8 *)(p + 1);
128 int prepad = ndisc_addr_option_pad(dev->
type);
131 return lladdr + prepad;
138 return (((p32[0] ^ hash32_ptr(dev)) * hash_rnd[0]) +
139 (p32[1] * hash_rnd[1]) +
140 (p32[2] * hash_rnd[2]) +
141 (p32[3] * hash_rnd[3]));
159 ((n32[0] ^ p32[0]) | (n32[1] ^ p32[1]) |
160 (n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0) {
166 rcu_read_unlock_bh();
222 extern int ndisc_ifinfo_sysctl_change(
struct ctl_table *
ctl,
228 void __user *oldval,
size_t __user *oldlenp,
229 void __user *newval,
size_t newlen);