Embedded Software: The Works

Networking is very complex, but anyone involved in embedded software needs to know something about it. Fortunately guys like Dan Schiro, who wrote the 2003 NewBits piece upon which this article is based, deal with technical support. Those guys are used to explaining things. (CW)
In a world that demands information distribution in a quick, seamless manner, IP multicasting has stood out as a method of providing data to a large number of hosts without generating proportionally large traffic loads on network infrastructures. IP multicasting utilizes Internet Group Management Protocol (IGMP) to send information to selected hosts only. The highest level of support for IGMPv1 is level 2. Setting up an application to use multicasting can seem daunting, but it becomes a simple task when broken down into initialization, receiving, and transmitting. Note that many of the details of the implementation of multicasting will be dependent upon the specific networking stack. So, some of the guidance provided in the following sections should be taken as an example.
IP multicasting provides a means for a network application to send a single IP datagram to multiple hosts. Multicasting differs from broadcasting in that every host on a network segment receives a broadcast packet. This can lead to unnecessary interruptions for those hosts that are not interested in the broadcast. With multicasting, only those hosts that have explicitly joined an IP multicasting group will receive a multicast packet to that address/group. The class D IP address space...