Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 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 1 2 3 4 5 6


igmp.h
001: /*
002:  *      Linux NET3:     Internet Group Management Protocol  [IGMP]
003:  *
004:  *      Authors:
005:  *              Alan Cox <alan@lxorguk.ukuu.org.uk>
006:  *
007:  *      Extended to talk the BSD extended IGMP protocol of mrouted 3.6
008:  *
009:  *
010:  *      This program is free software; you can redistribute it and/or
011:  *      modify it under the terms of the GNU General Public License
012:  *      as published by the Free Software Foundation; either version
013:  *      2 of the License, or (at your option) any later version.
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:  *      IGMP protocol structures
024:  */
025: 
026: /*
027:  *      Header in on cable format
028:  */
029: 
030: struct igmphdr {
031:         __u8 type;
032:         __u8 code;              /* For newer IGMP */
033:         __sum16 csum;
034:         __be32 group;
035: };
036: 
037: /* V3 group record types [grec_type] */
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    /* From RFC1112 */
084: #define IGMP_HOST_MEMBERSHIP_REPORT     0x12    /* Ditto */
085: #define IGMP_DVMRP                      0x13    /* DVMRP routing */
086: #define IGMP_PIM                        0x14    /* PIM routing */
087: #define IGMP_TRACE                      0x15
088: #define IGMPV2_HOST_MEMBERSHIP_REPORT   0x16    /* V2 version of 0x12 */
089: #define IGMP_HOST_LEAVE_MESSAGE         0x17
090: #define IGMPV3_HOST_MEMBERSHIP_REPORT   0x22    /* V3 version of 0x12 */
091: 
092: #define IGMP_MTRACE_RESP                0x1e
093: #define IGMP_MTRACE                     0x1f
094: 
095: 
096: /*
097:  *      Use the BSD names for these for compatibility
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      /* max delay for response to */
109:                                                 /* query (in seconds)   */
110: 
111: #define IGMP_TIMER_SCALE                10      /* denotes that the igmphdr->timer field */
112:                                                 /* specifies time in 10th of seconds     */
113: 
114: #define IGMP_AGE_THRESHOLD              400     /* If this host don't hear any IGMP V1  */
115:                                                 /* message in this period of time,      */
116:                                                 /* revert to IGMP v2 router.            */
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:  * struct for keeping the multicast list in
126:  */
127: 
128: #endif
129: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/