Multicasting

A ``multicast'' packet is a network packet meant to be received by more than one host, but not by all hosts.

This functionality is obtained by assigning special hardware addresses to groups of hosts. Packets directed to one of the special addresses should be received by all the hosts in that group. In the case of Ethernet, a multicast address has the least significant bit of the first address octet set in the destination address, while every device board has the bit clear in its own hardware address.

The tricky part of dealing with host-groups and hardware addresses is performed by applications and the kernel, and the interface driver doesn’t need to deal with these problems.

Transmission of multicast packets is a simple problem because they look exactly like any other packet. The interface transmits them over the communication medium without looking at the destination address. It’s the kernel that has to assign a correct hardware destination address; the rebuild_header device method, if defined, doesn’t need to look in the data it arranges.

Receiving multicast packets, on the other hand, needs some cooperation from the device. The hardware should notify the operating system whenever an ``interesting'' multicast packet is received, i.e., a packet whose destination address identifies a group of hosts that includes this interface. This means that the hardware filter should be programmed to tell some multicast destination addresses from the others. The filter is the unit ...

Get Linux Device Drivers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.