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
22
23
24
25 struct igmphdr
26 {
27 unsigned char type;
28 unsigned char unused;
29 unsigned short csum;
30 unsigned long group;
31 };
32
33
34
35
36
37 struct igmp_header
38 {
39 unsigned char type;
40 unsigned char unused;
41 unsigned short csum;
42 unsigned long group;
43 };
44
45
46 #define IGMP_HOST_MEMBERSHIP_QUERY 0x11
47 #define IGMP_HOST_MEMBERSHIP_REPORT 0x12
48 #define IGMP_HOST_LEAVE_MESSAGE 0x17
49
50
51 #define IGMP_ALL_HOSTS htonl(0xE0000001L)
52
53
54
55
56
57 #ifdef __KERNEL__
58 struct ip_mc_socklist
59 {
60 unsigned long multiaddr[IP_MAX_MEMBERSHIPS];
61 struct device *multidev[IP_MAX_MEMBERSHIPS];
62 };
63
64 struct ip_mc_list
65 {
66 struct device *interface;
67 unsigned long multiaddr;
68 struct ip_mc_list *next;
69 struct timer_list timer;
70 int tm_running;
71 int users;
72 };
73
74 extern struct ip_mc_list *ip_mc_head;
75
76
77 extern int igmp_rcv(struct sk_buff *, struct device *, struct options *, unsigned long, unsigned short,
78 unsigned long, int , struct inet_protocol *);
79 extern void ip_mc_drop_device(struct device *dev);
80 extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr);
81 extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr);
82 extern void ip_mc_drop_socket(struct sock *sk);
83 #endif
84 #endif