IP multicasting

IP multicasting allows an application to send a single IP datagram that a group of hosts in a network can receive.

Start of changeThe hosts that are in the group can reside on a single subnet or on different subnets that multicast-capable routers connect. Hosts can join and leave groups at any time. There are no restrictions on the location or number of members in a host group. For AF_INET, a class D IP address in the range 224.0.0.1 to 239.255.255.255 identifies a host group. For AF_INET6, an IPv6 address starting with FF00::/8 identifies the address as a multicast address. Refer to RFC 3513: "Internet Protocol Version 6 (IPv6) Addressing Architecture" for more information.End of change

Start of changeYou can currently use IP multicasting with AF_INET and AF_INET6 address families.End of change

Start of changeAn application program can send or receive multicast datagrams using the Sockets API and connectionless, SOCK_DGRAM type sockets. Multicasting is a one-to-many transmission method. Connection-oriented sockets of type SOCK_STREAM cannot be used for multicasting. When a socket of type SOCK_DGRAM is created, an application can use the setsockopt() function to control the multicast characteristics associated with that socket. The setsockopt() function accepts the following IPPROTO_IP level flags: Start of changeEnd of change End of change
Start of changeThe setsockopt() function also accepts the following IPPROTO_IPv6 level flags: End of change
Related reference
Examples: Use multicasting with AF_INET
Related information
setsockopt()