#define IP_PROT_IP 4\r
#define IP_PROT_TCP 6\r
#define IP_PROT_UDP 17\r
+#define IP_PROT_IGMP 2\r
\r
\r
#include <complib/cl_packon.h>\r
*********/\r
#include <complib/cl_packoff.h>\r
\r
+#define IGMP_V2_MEMBERSHIP_QUERY 0x11\r
+#define IGMP_V2_MEMBERSHIP_REPORT 0x16\r
+#define IGMP_V1_MEMBERSHIP_REPORT 0x12 // for backward compatibility with IGMPv1\r
+#define IGMP_V2_LEAVE_GROUP 0x17\r
+#include <complib/cl_packon.h>\r
+/****s* IB Network Drivers/igmp__v2_hdr_t\r
+* NAME\r
+* igmp_v2_hdr_t\r
+*\r
+* DESCRIPTION\r
+* Defines the IGMPv2 header for IP packets.\r
+*\r
+* SYNOPSIS\r
+*/\r
+typedef struct _igmp_v2_hdr\r
+{\r
+ uint8_t type;\r
+ uint8_t max_resp_time;\r
+ net16_t chksum;\r
+ net32_t group_address;\r
+} PACK_SUFFIX igmp_v2_hdr_t;\r
+/*\r
+* FIELDS\r
+* type\r
+* type of IGMPv2 message: query/report/leave\r
+*\r
+* max_resp_time\r
+* The Max Response Time field is meaningful only in Membership Query\r
+* messages, and specifies the maximum allowed time before sending a\r
+* responding report in units of 1/10 second. In all other messages, it\r
+* is set to zero by the sender and ignored by receivers.\r
+*\r
+* checksum\r
+* The checksum is the 16-bit one's complement of the one's complement\r
+* sum of the whole IGMP message (the entire IP payload). \r
+*\r
+* group_address\r
+* In a Membership Query message, the group address field is set to zero\r
+* when sending a General Query, and set to the group address being\r
+* queried when sending a Group-Specific Query.\r
+*\r
+* In a Membership Report or Leave Group message, the group address\r
+* field holds the IP multicast group address of the group being\r
+* reported or left.\r
+*\r
+* SEE ALSO\r
+* IB Network Drivers, eth_hdr_t, arp_pkt_t, ip_hdr_t, tcp_hdr_t\r
+*********/\r
+#include <complib/cl_packoff.h>\r
\r
#define DHCP_PORT_SERVER CL_HTON16(67)\r
#define DHCP_PORT_CLIENT CL_HTON16(68)\r