5 * ICMP codes for neighbour discovery messages
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 ND_OPT_SOURCE_LL_ADDR 1
19 #define ND_OPT_TARGET_LL_ADDR 2
20 #define ND_OPT_PREFIX_INFO 3
21 #define ND_OPT_REDIRECT_HDR 4
24 #define MAX_RTR_SOLICITATION_DELAY HZ
26 #define ND_REACHABLE_TIME (30*HZ)
27 #define ND_RETRANS_TIMER HZ
29 #define ND_MIN_RANDOM_FACTOR (1/2)
30 #define ND_MAX_RANDOM_FACTOR (3/2)
34 #include <linux/skbuff.h>
35 #include <linux/netdevice.h>
36 #include <linux/icmpv6.h>
37 #include <net/neighbour.h>
38 #include <asm/atomic.h>
40 extern struct neigh_table nd_tbl;
43 struct icmp6hdr icmph;
44 struct in6_addr target;
49 struct icmp6hdr icmph;
54 struct icmp6hdr icmph;
62 } __attribute__((__packed__));
65 extern int ndisc_init(struct net_proto_family *ops);
67 extern void ndisc_cleanup(void);
69 extern int ndisc_rcv(struct sk_buff *skb);
71 extern void ndisc_send_ns(struct net_device *dev,
72 struct neighbour *neigh,
73 struct in6_addr *solicit,
74 struct in6_addr *daddr,
75 struct in6_addr *saddr);
77 extern void ndisc_send_rs(struct net_device *dev,
78 struct in6_addr *saddr,
79 struct in6_addr *daddr);
81 extern void ndisc_forwarding_on(void);
82 extern void ndisc_forwarding_off(void);
84 extern void ndisc_send_redirect(struct sk_buff *skb,
85 struct neighbour *neigh,
86 struct in6_addr *target);
88 extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir);
91 struct rt6_info * dflt_rt_lookup(void);
96 extern int igmp6_init(struct net_proto_family *ops);
98 extern void igmp6_cleanup(void);
100 extern int igmp6_event_query(struct sk_buff *skb);
102 extern int igmp6_event_report(struct sk_buff *skb);
104 extern void igmp6_cleanup(void);
107 extern int ndisc_ifinfo_sysctl_change(ctl_table *ctl,
115 extern void inet6_ifinfo_notify(int event,
116 struct inet6_dev *idev);
118 static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr)
122 return __neigh_lookup(&nd_tbl, addr, dev, 1);
128 #endif /* __KERNEL__ */