0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _UAPI_LINUX_IGMP_H
0018 #define _UAPI_LINUX_IGMP_H
0019
0020 #include <linux/types.h>
0021 #include <asm/byteorder.h>
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 struct igmphdr {
0032 __u8 type;
0033 __u8 code;
0034 __sum16 csum;
0035 __be32 group;
0036 };
0037
0038
0039 #define IGMPV3_MODE_IS_INCLUDE 1
0040 #define IGMPV3_MODE_IS_EXCLUDE 2
0041 #define IGMPV3_CHANGE_TO_INCLUDE 3
0042 #define IGMPV3_CHANGE_TO_EXCLUDE 4
0043 #define IGMPV3_ALLOW_NEW_SOURCES 5
0044 #define IGMPV3_BLOCK_OLD_SOURCES 6
0045
0046 struct igmpv3_grec {
0047 __u8 grec_type;
0048 __u8 grec_auxwords;
0049 __be16 grec_nsrcs;
0050 __be32 grec_mca;
0051 __be32 grec_src[];
0052 };
0053
0054 struct igmpv3_report {
0055 __u8 type;
0056 __u8 resv1;
0057 __sum16 csum;
0058 __be16 resv2;
0059 __be16 ngrec;
0060 struct igmpv3_grec grec[];
0061 };
0062
0063 struct igmpv3_query {
0064 __u8 type;
0065 __u8 code;
0066 __sum16 csum;
0067 __be32 group;
0068 #if defined(__LITTLE_ENDIAN_BITFIELD)
0069 __u8 qrv:3,
0070 suppress:1,
0071 resv:4;
0072 #elif defined(__BIG_ENDIAN_BITFIELD)
0073 __u8 resv:4,
0074 suppress:1,
0075 qrv:3;
0076 #else
0077 #error "Please fix <asm/byteorder.h>"
0078 #endif
0079 __u8 qqic;
0080 __be16 nsrcs;
0081 __be32 srcs[];
0082 };
0083
0084 #define IGMP_HOST_MEMBERSHIP_QUERY 0x11
0085 #define IGMP_HOST_MEMBERSHIP_REPORT 0x12
0086 #define IGMP_DVMRP 0x13
0087 #define IGMP_PIM 0x14
0088 #define IGMP_TRACE 0x15
0089 #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16
0090 #define IGMP_HOST_LEAVE_MESSAGE 0x17
0091 #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22
0092
0093 #define IGMP_MTRACE_RESP 0x1e
0094 #define IGMP_MTRACE 0x1f
0095
0096 #define IGMP_MRDISC_ADV 0x30
0097
0098
0099
0100
0101
0102 #define IGMP_DELAYING_MEMBER 0x01
0103 #define IGMP_IDLE_MEMBER 0x02
0104 #define IGMP_LAZY_MEMBER 0x03
0105 #define IGMP_SLEEPING_MEMBER 0x04
0106 #define IGMP_AWAKENING_MEMBER 0x05
0107
0108 #define IGMP_MINLEN 8
0109
0110 #define IGMP_MAX_HOST_REPORT_DELAY 10
0111
0112
0113 #define IGMP_TIMER_SCALE 10
0114
0115
0116 #define IGMP_AGE_THRESHOLD 400
0117
0118
0119
0120 #define IGMP_ALL_HOSTS htonl(0xE0000001L)
0121 #define IGMP_ALL_ROUTER htonl(0xE0000002L)
0122 #define IGMPV3_ALL_MCR htonl(0xE0000016L)
0123 #define IGMP_LOCAL_GROUP htonl(0xE0000000L)
0124 #define IGMP_LOCAL_GROUP_MASK htonl(0xFFFFFF00L)
0125
0126
0127
0128
0129
0130 #endif