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
19 __ND_OPT_PREFIX_INFO_END = 0,
20 ND_OPT_SOURCE_LL_ADDR = 1, /* RFC2461 */
21 ND_OPT_TARGET_LL_ADDR = 2, /* RFC2461 */
22 ND_OPT_PREFIX_INFO = 3, /* RFC2461 */
23 ND_OPT_REDIRECT_HDR = 4, /* RFC2461 */
24 ND_OPT_MTU = 5, /* RFC2461 */
28 #define MAX_RTR_SOLICITATION_DELAY HZ
30 #define ND_REACHABLE_TIME (30*HZ)
31 #define ND_RETRANS_TIMER HZ
33 #define ND_MIN_RANDOM_FACTOR (1/2)
34 #define ND_MAX_RANDOM_FACTOR (3/2)
38 #include <linux/skbuff.h>
39 #include <linux/netdevice.h>
40 #include <linux/icmpv6.h>
41 #include <net/neighbour.h>
42 #include <asm/atomic.h>
44 extern struct neigh_table nd_tbl;
47 struct icmp6hdr icmph;
48 struct in6_addr target;
53 struct icmp6hdr icmph;
58 struct icmp6hdr icmph;
66 } __attribute__((__packed__));
69 extern int ndisc_init(struct net_proto_family *ops);
71 extern void ndisc_cleanup(void);
73 extern int ndisc_rcv(struct sk_buff *skb);
75 extern void ndisc_send_ns(struct net_device *dev,
76 struct neighbour *neigh,
77 struct in6_addr *solicit,
78 struct in6_addr *daddr,
79 struct in6_addr *saddr);
81 extern void ndisc_send_rs(struct net_device *dev,
82 struct in6_addr *saddr,
83 struct in6_addr *daddr);
85 extern void ndisc_forwarding_on(void);
86 extern void ndisc_forwarding_off(void);
88 extern void ndisc_send_redirect(struct sk_buff *skb,
89 struct neighbour *neigh,
90 struct in6_addr *target);
92 extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir);
95 struct rt6_info * dflt_rt_lookup(void);
100 extern int igmp6_init(struct net_proto_family *ops);
102 extern void igmp6_cleanup(void);
104 extern int igmp6_event_query(struct sk_buff *skb);
106 extern int igmp6_event_report(struct sk_buff *skb);
108 extern void igmp6_cleanup(void);
111 extern int ndisc_ifinfo_sysctl_change(ctl_table *ctl,
119 extern void inet6_ifinfo_notify(int event,
120 struct inet6_dev *idev);
122 static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr)
126 return __neigh_lookup(&nd_tbl, addr, dev, 1);
132 #endif /* __KERNEL__ */