next up previous contents
Next: IPv6 header Up: Packet construction Previous: ICMP header   Contents

IGMP header

The macro IGMP_HDR builds an IGMP header, as defined in [RFC2236]. The macro IGMP_PCK prepends an IPv4 header to the IGMP header.

\begin{displaymath}
\begin{tabular}{\vert cccccccccccccccccccccccccccccccc\vert}...
...\
\multicolumn{32}{\vert c\vert}{0} \\
\hline
\end{tabular}\end{displaymath}

The default value for $igmp_type (0x11) is the type code for an IGMP membership query message.

Note that $igmp_group is of type ``IPv4 address''.

Example:

#define MC_ALL_ROUTERS 224.0.0.2

send IGMP_PCK($igmp_type=IGMP_V1_MEMBERSHIP_REPORT
  $igmp_group=MC_ALL_ROUTERS)



Martin A. Brown 2003-11-06