Tuesday, November 08, 2005

Multicasting

I have once assumed a bit too much and not really explained what IP multicasting is. The basic idea is to send a single message, which is targeted to multiple receivers. This is that sender uses special IP multicast address, which those who want to receive the messages are joined to.

Difference to broadcasting is that in broadcasting message is targeted to all hosts and in multicasting message is targeted only to those who have subscribed (joined) the multicast group.

Wikipeda link about IP multicasting http://en.wikipedia.org/wiki/Multicasting

Multicast address assignments by Iana (http://www.iana.org/assignments/multicast-addresses)
 You can try e.g. multicast addresses in range of 239.255.000.000-239.255.255.255 in your own programs as they are defined to be in site-local scope.

How to join to a multicast group?
setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));

1 Comments:

Anonymous Anonymous said...

Some more info about Multicast at The Linux Documentation Project webpage:

http://www.tldp.org/HOWTO/Multicast-HOWTO.html

6:39 PM  

Post a Comment

<< Home