blob: 6ca7e019cad9c8b8d8af3afb9204d2dc13e8b5ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/*
* Linux NET3: Internet Gateway Management Protocol [IGMP]
*
* Authors:
* Alan Cox <Alan.Cox@linux.org>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _LINUX_IGMP_H
#define _LINUX_IGMP_H
/*
* IGMP protocol structures
*/
struct igmphdr
{
unsigned char type;
unsigned char unused;
unsigned short csum;
unsigned long group;
};
#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */
#define IGMP_HOST_MEMBERSHIP_REPORT 0x12 /* Ditto */
#define IGMP_HOST_LEAVE_MESSAGE 0x17 /* An extra BSD seems to send */
/* 224.0.0.1 */
#define IGMP_ALL_HOSTS htonl(0xE0000001L)
/*
* struct for keeping the multicast list in
*/
#ifdef __KERNEL__
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_list
{
struct device *interface;
unsigned long multiaddr;
struct ip_mc_list *next;
struct timer_list timer;
int tm_running;
int users;
};
extern struct ip_mc_list *ip_mc_head;
extern int igmp_rcv(struct sk_buff *, struct device *, struct options *, unsigned long, unsigned short,
unsigned long, int , struct inet_protocol *);
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 void ip_mc_drop_socket(struct sock *sk);
#endif
#endif
|