igmp.h
001:
002:
003:
004:
005: <alan@lxorguk.ukuu.org.uk>
006:
007:
008:
009:
010:
011:
012:
013:
014:
015:
016: #ifndef _LINUX_IGMP_H
017: #define _LINUX_IGMP_H
018:
019: #include <linux/types.h>
020: #include <asm/byteorder.h>
021:
022:
023:
024:
025:
026:
027:
028:
029:
030: struct igmphdr {
031: __u8 type;
032: __u8 code;
033: __sum16 csum;
034: __be32 group;
035: };
036:
037:
038: #define IGMPV3_MODE_IS_INCLUDE 1
039: #define IGMPV3_MODE_IS_EXCLUDE 2
040: #define IGMPV3_CHANGE_TO_INCLUDE 3
041: #define IGMPV3_CHANGE_TO_EXCLUDE 4
042: #define IGMPV3_ALLOW_NEW_SOURCES 5
043: #define IGMPV3_BLOCK_OLD_SOURCES 6
044:
045: struct igmpv3_grec {
046: __u8 grec_type;
047: __u8 grec_auxwords;
048: __be16 grec_nsrcs;
049: __be32 grec_mca;
050: __be32 grec_src[0];
051: };
052:
053: struct igmpv3_report {
054: __u8 type;
055: __u8 resv1;
056: __be16 csum;
057: __be16 resv2;
058: __be16 ngrec;
059: struct igmpv3_grec grec[0];
060: };
061:
062: struct igmpv3_query {
063: __u8 type;
064: __u8 code;
065: __be16 csum;
066: __be32 group;
067: #if defined(__LITTLE_ENDIAN_BITFIELD)
068: __u8 qrv:3,
069: suppress:1,
070: resv:4;
071: #elif defined(__BIG_ENDIAN_BITFIELD)
072: __u8 resv:4,
073: suppress:1,
074: qrv:3;
075: #else
076: #error "Please fix <asm/byteorder.h>"
077: #endif
078: __u8 qqic;
079: __be16 nsrcs;
080: __be32 srcs[0];
081: };
082:
083: #define IGMP_HOST_MEMBERSHIP_QUERY 0x11
084: #define IGMP_HOST_MEMBERSHIP_REPORT 0x12
085: #define IGMP_DVMRP 0x13
086: #define IGMP_PIM 0x14
087: #define IGMP_TRACE 0x15
088: #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16
089: #define IGMP_HOST_LEAVE_MESSAGE 0x17
090: #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22
091:
092: #define IGMP_MTRACE_RESP 0x1e
093: #define IGMP_MTRACE 0x1f
094:
095:
096:
097:
098:
099:
100: #define IGMP_DELAYING_MEMBER 0x01
101: #define IGMP_IDLE_MEMBER 0x02
102: #define IGMP_LAZY_MEMBER 0x03
103: #define IGMP_SLEEPING_MEMBER 0x04
104: #define IGMP_AWAKENING_MEMBER 0x05
105:
106: #define IGMP_MINLEN 8
107:
108: #define IGMP_MAX_HOST_REPORT_DELAY 10
109:
110:
111: #define IGMP_TIMER_SCALE 10
112:
113:
114: #define IGMP_AGE_THRESHOLD 400
115:
116:
117:
118: #define IGMP_ALL_HOSTS htonl(0xE0000001L)
119: #define IGMP_ALL_ROUTER htonl(0xE0000002L)
120: #define IGMPV3_ALL_MCR htonl(0xE0000016L)
121: #define IGMP_LOCAL_GROUP htonl(0xE0000000L)
122: #define IGMP_LOCAL_GROUP_MASK htonl(0xFFFFFF00L)
123:
124:
125:
126:
127:
128: #endif
129:
© Andrew Scott 2006 -
2025,
All Rights Reserved