summaryrefslogtreecommitdiffstats
path: root/include/linux/igmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/igmp.h')
-rw-r--r--include/linux/igmp.h62
1 files changed, 36 insertions, 26 deletions
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index b4a16b565..8be2d1b87 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -38,7 +38,7 @@ struct igmphdr
#define IGMP_PIM 0x14 /* PIM routing */
#define IGMP_TRACE 0x15
#define IGMP_HOST_NEW_MEMBERSHIP_REPORT 0x16 /* New version of 0x11 */
-#define IGMP_HOST_LEAVE_MESSAGE 0x17 /* An extra BSD seems to send */
+#define IGMP_HOST_LEAVE_MESSAGE 0x17
#define IGMP_MTRACE_RESP 0x1e
#define IGMP_MTRACE 0x1f
@@ -54,9 +54,6 @@ struct igmphdr
#define IGMP_SLEEPING_MEMBER 0x04
#define IGMP_AWAKENING_MEMBER 0x05
-#define IGMP_OLD_ROUTER 0x00
-#define IGMP_NEW_ROUTER 0x01
-
#define IGMP_MINLEN 8
#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
@@ -65,7 +62,7 @@ struct igmphdr
#define IGMP_TIMER_SCALE 10 /* denotes that the igmphdr->timer field */
/* specifies time in 10th of seconds */
-#define IGMP_AGE_THRESHOLD 540 /* If this host don't hear any IGMP V1 */
+#define IGMP_AGE_THRESHOLD 400 /* If this host don't hear any IGMP V1 */
/* message in this period of time, */
/* revert to IGMP v2 router. */
@@ -79,40 +76,53 @@ struct igmphdr
*/
#ifdef __KERNEL__
+
+/* ip_mc_socklist is real list now. Speed is not argument;
+ this list never used in fast path code
+ */
+
struct ip_mc_socklist
{
- unsigned long multiaddr[IP_MAX_MEMBERSHIPS]; /* This is a speed trade off */
- struct device *multidev[IP_MAX_MEMBERSHIPS];
+ struct ip_mc_socklist *next;
+ int count;
+ struct ip_mreqn multi;
};
struct ip_mc_list
{
- struct device *interface;
- unsigned long multiaddr;
- struct ip_mc_list *next;
- struct timer_list timer;
- int users;
- char tm_running;
- char reporter;
+ struct in_device *interface;
+ unsigned long multiaddr;
+ struct ip_mc_list *next;
+ struct timer_list timer;
+ int users;
+ char tm_running;
+ char reporter;
+ char unsolicit_count;
};
-struct ip_router_info
+extern __inline__ int ip_check_mc(struct device *dev, u32 mc_addr)
{
- struct device *dev;
- int type; /* type of router which is querier on this interface */
- int time; /* # of slow timeouts since last old query */
- struct timer_list timer;
- struct ip_router_info *next;
-};
-
-extern struct ip_mc_list *ip_mc_head;
+ struct in_device *in_dev = dev->ip_ptr;
+ struct ip_mc_list *im;
+ if (in_dev) {
+ for (im=in_dev->mc_list; im; im=im->next)
+ if (im->multiaddr == mc_addr)
+ return 1;
+ }
+ return 0;
+}
extern int igmp_rcv(struct sk_buff *, unsigned short);
-extern void ip_mc_drop_device(struct device *dev);
-extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
-extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
+extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr);
+extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
extern void ip_mc_drop_socket(struct sock *sk);
extern void ip_mr_init(void);
+extern void ip_mc_init_dev(struct in_device *);
+extern void ip_mc_destroy_dev(struct in_device *);
+extern void ip_mc_up(struct in_device *);
+extern void ip_mc_down(struct in_device *);
+extern int ip_mc_dec_group(struct in_device *in_dev, u32 addr);
+extern void ip_mc_inc_group(struct in_device *in_dev, u32 addr);
#endif
#endif