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