• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_LINUX_IGMP_H
7 #define _UAPI_LINUX_IGMP_H
8 #include <linux/types.h>
9 #include <asm/byteorder.h>
10 struct igmphdr {
11 	__u8 type;
12 	__u8 code;
13 	__sum16 csum;
14 	__be32 group;
15 };
16 #define IGMPV3_MODE_IS_INCLUDE		1
17 #define IGMPV3_MODE_IS_EXCLUDE		2
18 #define IGMPV3_CHANGE_TO_INCLUDE	3
19 #define IGMPV3_CHANGE_TO_EXCLUDE	4
20 #define IGMPV3_ALLOW_NEW_SOURCES	5
21 #define IGMPV3_BLOCK_OLD_SOURCES	6
22 struct igmpv3_grec {
23 	__u8	grec_type;
24 	__u8	grec_auxwords;
25 	__be16	grec_nsrcs;
26 	__be32	grec_mca;
27 	__be32	grec_src[0];
28 };
29 struct igmpv3_report {
30 	__u8 type;
31 	__u8 resv1;
32 	__sum16 csum;
33 	__be16 resv2;
34 	__be16 ngrec;
35 	struct igmpv3_grec grec[0];
36 };
37 struct igmpv3_query {
38 	__u8 type;
39 	__u8 code;
40 	__sum16 csum;
41 	__be32 group;
42 #if defined(__LITTLE_ENDIAN_BITFIELD)
43 	__u8 qrv:3,
44 	     suppress:1,
45 	     resv:4;
46 #elif defined(__BIG_ENDIAN_BITFIELD)
47 	__u8 resv:4,
48 	     suppress:1,
49 	     qrv:3;
50 #else
51 #error "Please fix <asm/byteorder.h>"
52 #endif
53 	__u8 qqic;
54 	__be16 nsrcs;
55 	__be32 srcs[0];
56 };
57 #define IGMP_HOST_MEMBERSHIP_QUERY	0x11
58 #define IGMP_HOST_MEMBERSHIP_REPORT	0x12
59 #define IGMP_DVMRP			0x13
60 #define IGMP_PIM			0x14
61 #define IGMP_TRACE			0x15
62 #define IGMPV2_HOST_MEMBERSHIP_REPORT	0x16
63 #define IGMP_HOST_LEAVE_MESSAGE 	0x17
64 #define IGMPV3_HOST_MEMBERSHIP_REPORT	0x22
65 #define IGMP_MTRACE_RESP		0x1e
66 #define IGMP_MTRACE			0x1f
67 #define IGMP_DELAYING_MEMBER		0x01
68 #define IGMP_IDLE_MEMBER		0x02
69 #define IGMP_LAZY_MEMBER		0x03
70 #define IGMP_SLEEPING_MEMBER		0x04
71 #define IGMP_AWAKENING_MEMBER		0x05
72 #define IGMP_MINLEN			8
73 #define IGMP_MAX_HOST_REPORT_DELAY	10
74 
75 #define IGMP_TIMER_SCALE		10
76 
77 #define IGMP_AGE_THRESHOLD		400
78 
79 
80 #define IGMP_ALL_HOSTS		htonl(0xE0000001L)
81 #define IGMP_ALL_ROUTER 	htonl(0xE0000002L)
82 #define IGMPV3_ALL_MCR	 	htonl(0xE0000016L)
83 #define IGMP_LOCAL_GROUP	htonl(0xE0000000L)
84 #define IGMP_LOCAL_GROUP_MASK	htonl(0xFFFFFF00L)
85 #endif
86