1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef _LINUX_IGMP_H
15 #define _LINUX_IGMP_H
16
17
18
19
20
21 struct igmphdr
22 {
23 unsigned char type;
24 unsigned char unused;
25 unsigned short csum;
26 unsigned long group;
27 };
28
29 #define IGMP_HOST_MEMBERSHIP_QUERY 0x11
30 #define IGMP_HOST_MEMBERSHIP_REPORT 0x12
31 #define IGMP_HOST_LEAVE_MESSAGE 0x17
32
33
34 #define IGMP_ALL_HOSTS htonl(0xE0000001L)
35
36
37
38
39
40 #ifdef __KERNEL__
41 struct ip_mc_socklist
42 {
43 unsigned long multiaddr[IP_MAX_MEMBERSHIPS];
44 struct device *multidev[IP_MAX_MEMBERSHIPS];
45 };
46
47 struct ip_mc_list
48 {
49 struct device *interface;
50 unsigned long multiaddr;
51 struct ip_mc_list *next;
52 struct timer_list timer;
53 int tm_running;
54 int users;
55 };
56
57 extern struct ip_mc_list *ip_mc_head;
58
59
60 extern int igmp_rcv(struct sk_buff *, struct device *, struct options *, unsigned long, unsigned short,
61 unsigned long, int , struct inet_protocol *);
62 extern void ip_mc_drop_device(struct device *dev);
63 extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
64 extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
65 extern void ip_mc_drop_socket(struct sock *sk);
66 #endif
67 #endif