Watt-32 tcp/ip  2.2 dev-rel.10
pcigmp.h
Go to the documentation of this file.
1 
3 #ifndef _w32_PCMULTI_H
4 #define _w32_PCMULTI_H
5 
10 typedef struct IGMPv0_packet {
11  BYTE type;
12  BYTE code;
13  WORD checksum;
14  WORD ident;
15  DWORD address;
16  DWORD access_key;
17  } IGMPv0_packet;
18 
23 typedef struct IGMPv1_packet {
24 #if defined(USE_BIGENDIAN)
25  int version : 4;
26  int type : 4;
27 #else
28  int type : 4;
29  int version : 4;
30 #endif
31  BYTE unused;
32  WORD checksum;
33  DWORD address;
34  } IGMPv1_packet;
35 
40 typedef struct IGMPv2_packet {
41  BYTE type;
42  BYTE max_resp;
43  WORD checksum;
44  DWORD address;
45  } IGMPv2_packet;
46 
51 typedef struct IGMPv3_packet {
52  BYTE type;
53  BYTE max_resp;
54  WORD checksum;
55  DWORD address;
56 #if defined(USE_BIGENDIAN)
57  int resv : 4;
58  int s_bit : 1;
59  int QRV : 3;
60 #else
61  int QRV : 3;
62  int s_bit : 1;
63  int resv : 4;
64 #endif
65  BYTE QQIC;
66  WORD num_src;
67  DWORD src_addr; /* \todo: Fixme; array of IPs */
68  } IGMPv3_packet;
69 
70 
71 #define IGMP_VERSION_1 1
72 #define IGMP_VERSION_2 2
73 
74 /* 'type' field for IGMP v0 */
75 #define IGMPv0_CG_REQUEST 1
76 #define IGMPv0_CG_REPORT 2
77 #define IGMPv0_JG_REQUEST 3
78 #define IGMPv0_JG_REPLY 4
79 #define IGMPv0_LG_REQUEST 5
80 #define IGMPv0_LG_REPLY 6
81 #define IGMPv0_CONFIRM_REQUEST 7
82 #define IGMPv0_CONFIRM_REPLY 8
83 
84 /* 'type' field for IGMP v1 */
85 #define IGMPv1_QUERY 1
86 #define IGMPv1_REPORT 2
87 #define IGMPv1_DVMRP 3
88 
89 /* 'type' field for IGMP v2 */
90 #define IGMPv2_MEMB_QUERY 0x11
91 #define IGMPv2_MEMB_v1_REPORT 0x12
92 #define IGMPv2_DVMRP 0x13
93 #define IGMPv2_PIMv1 0x14
94 
95 /* etc, etc... */
96 
97 /* 'type' field for IGMP v3 */
98 #define IGMPv3_QUERY 0x11
99 #define IGMPv3_REPORT 0x22
100 #define IGMPv3_MEMB_v1_REPORT 0x12
101 #define IGMPv3_MEMB_v2_REPORT 0x16
102 #define IGMPv3_LEAVE 0x17
103 
104 #if defined(USE_MULTICAST)
105 
108  #define IPMULTI_SIZE 20
109  #define MCAST_ALL_SYST 0xE0000001UL
115  struct MultiCast {
116  DWORD ip;
117  eth_address ethaddr;
118  BYTE processes;
119  DWORD reply_timer;
120  BOOL active;
121  };
122 
123  extern void igmp_handler (const in_Header *ip, BOOL brdcast);
124 #endif
125 #endif
eth_address ethaddr
Ethernet address of group.
Definition: pcigmp.h:117
DWORD ip
IP address of group.
Definition: pcigmp.h:116
Definition: ip.h:67
BYTE processes
number of interested processes
Definition: pcigmp.h:118
Definition: zinftree.h:24
DWORD reply_timer
IGMP query reply timer.
Definition: pcigmp.h:119
BOOL active
is this an active entry
Definition: pcigmp.h:120