diff options
| author | David Stevens <dlstevens@us.ibm.com> | 2003-04-15 11:46:01 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-04-15 11:46:01 -0700 |
| commit | 06da9228364cafd7d5e8229a8f210f1151c32ef9 (patch) | |
| tree | 15024daa8b7148ed34ad91b7716191febc8b7508 /include/net | |
| parent | 98fab1e40cc093ab9ebb64aa6c4c1a0359b409ec (diff) | |
[IPV6]: Add MLDv2 support.
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/addrconf.h | 67 | ||||
| -rw-r--r-- | include/net/icmp.h | 1 | ||||
| -rw-r--r-- | include/net/if_inet6.h | 42 |
3 files changed, 71 insertions, 39 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 3a63c42022cf..ff3cf48bf7ee 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -76,49 +76,38 @@ extern void addrconf_leave_solict(struct net_device *dev, /* * multicast prototypes (mcast.c) */ -extern int ipv6_sock_mc_join(struct sock *sk, - int ifindex, - struct in6_addr *addr); -extern int ipv6_sock_mc_drop(struct sock *sk, - int ifindex, - struct in6_addr *addr); -extern void ipv6_sock_mc_close(struct sock *sk); -extern int inet6_mc_check(struct sock *sk, struct in6_addr *addr); - -extern int ipv6_dev_mc_inc(struct net_device *dev, - struct in6_addr *addr); -extern int ipv6_dev_mc_dec(struct net_device *dev, - struct in6_addr *addr); -extern void ipv6_mc_up(struct inet6_dev *idev); -extern void ipv6_mc_down(struct inet6_dev *idev); -extern void ipv6_mc_init_dev(struct inet6_dev *idev); -extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); -extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); - -extern int ipv6_chk_mcast_addr(struct net_device *dev, - struct in6_addr *addr); - -extern void addrconf_prefix_rcv(struct net_device *dev, - u8 *opt, int len); +extern int ipv6_sock_mc_join(struct sock *sk, int ifindex, + struct in6_addr *addr); +extern int ipv6_sock_mc_drop(struct sock *sk, int ifindex, + struct in6_addr *addr); +extern void ipv6_sock_mc_close(struct sock *sk); +extern int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr, + struct in6_addr *src_addr); + +extern int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr); +extern int ipv6_dev_mc_dec(struct net_device *dev, struct in6_addr *addr); +extern void ipv6_mc_up(struct inet6_dev *idev); +extern void ipv6_mc_down(struct inet6_dev *idev); +extern void ipv6_mc_init_dev(struct inet6_dev *idev); +extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); +extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); + +extern int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group, + struct in6_addr *src_addr); + +extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len); /* * anycast prototypes (anycast.c) */ -extern int ipv6_sock_ac_join(struct sock *sk, - int ifindex, - struct in6_addr *addr); -extern int ipv6_sock_ac_drop(struct sock *sk, - int ifindex, - struct in6_addr *addr); -extern void ipv6_sock_ac_close(struct sock *sk); -extern int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex); - -extern int ipv6_dev_ac_inc(struct net_device *dev, - struct in6_addr *addr); -extern int ipv6_dev_ac_dec(struct net_device *dev, - struct in6_addr *addr); -extern int ipv6_chk_acast_addr(struct net_device *dev, - struct in6_addr *addr); +extern int ipv6_sock_ac_join(struct sock *sk,int ifindex,struct in6_addr *addr); +extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex,struct in6_addr *addr); +extern void ipv6_sock_ac_close(struct sock *sk); +extern int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex); + +extern int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr); +extern int ipv6_dev_ac_dec(struct net_device *dev, struct in6_addr *addr); +extern int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr); /* Device notifier */ diff --git a/include/net/icmp.h b/include/net/icmp.h index 81c6a6c84e02..edefb1387c95 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -18,6 +18,7 @@ #ifndef _ICMP_H #define _ICMP_H +#include <linux/config.h> #include <linux/icmp.h> #include <linux/skbuff.h> diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index edf4185f9e7e..59d5a888c921 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h @@ -52,27 +52,58 @@ struct inet6_ifaddr int dead; }; +struct ip6_sf_socklist +{ + unsigned int sl_max; + unsigned int sl_count; + struct in6_addr sl_addr[0]; +}; + +#define IP6_SFLSIZE(count) (sizeof(struct ip6_sf_socklist) + \ + (count) * sizeof(struct in6_addr)) + +#define IP6_SFBLOCK 10 /* allocate this many at once */ + struct ipv6_mc_socklist { struct in6_addr addr; int ifindex; struct ipv6_mc_socklist *next; + unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ + struct ip6_sf_socklist *sflist; +}; + +struct ip6_sf_list +{ + struct ip6_sf_list *sf_next; + struct in6_addr sf_addr; + unsigned long sf_count[2]; /* include/exclude counts */ + unsigned char sf_gsresp; /* include in g & s response? */ + unsigned char sf_oldin; /* change state */ + unsigned char sf_crcount; /* retrans. left to send */ }; #define MAF_TIMER_RUNNING 0x01 #define MAF_LAST_REPORTER 0x02 #define MAF_LOADED 0x04 +#define MAF_NOREPORT 0x08 +#define MAF_GSQUERY 0x10 struct ifmcaddr6 { struct in6_addr mca_addr; struct inet6_dev *idev; struct ifmcaddr6 *next; + struct ip6_sf_list *mca_sources; + struct ip6_sf_list *mca_tomb; + unsigned int mca_sfmode; + unsigned long mca_sfcount[2]; struct timer_list mca_timer; unsigned mca_flags; int mca_users; atomic_t mca_refcnt; spinlock_t mca_lock; + unsigned char mca_crcount; }; /* Anycast stuff */ @@ -126,7 +157,18 @@ struct inet6_dev struct net_device *dev; struct inet6_ifaddr *addr_list; + struct ifmcaddr6 *mc_list; + struct ifmcaddr6 *mc_tomb; + rwlock_t mc_lock; + unsigned long mc_v1_seen; + unsigned long mc_maxdelay; + unsigned char mc_qrv; + unsigned char mc_gq_running; + unsigned char mc_ifc_count; + struct timer_list mc_gq_timer; /* general query timer */ + struct timer_list mc_ifc_timer; /* interface change timer */ + struct ifacaddr6 *ac_list; rwlock_t lock; atomic_t refcnt; |
