87 lines
5.8 KiB
HTML
87 lines
5.8 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="concept" />
|
||
|
<meta name="DC.Title" content="IP multicasting" />
|
||
|
<meta name="abstract" content="IP multicasting allows an application to send a single IP datagram that a group of hosts in a network can receive." />
|
||
|
<meta name="description" content="IP multicasting allows an application to send a single IP datagram that a group of hosts in a network can receive." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="aconcepts.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/ssocko.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="xmulticast.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="cmulticast" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>IP multicasting</title>
|
||
|
</head>
|
||
|
<body id="cmulticast"><a name="cmulticast"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">IP multicasting</h1>
|
||
|
<div><p>IP multicasting allows an application to send a single IP datagram
|
||
|
that a group of hosts in a network can receive.</p>
|
||
|
<p><img src="./delta.gif" alt="Start of change" />The 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 <a href="ftp://ftp.isi.edu/in-notes/rfc3513.txt" target="_blank">RFC 3513: "Internet Protocol Version 6 (IPv6) Addressing
|
||
|
Architecture"</a> for more information.<img src="./deltaend.gif" alt="End of change" /></p>
|
||
|
<p><img src="./delta.gif" alt="Start of change" />You can currently use IP multicasting with AF_INET and
|
||
|
AF_INET6 address families.<img src="./deltaend.gif" alt="End of change" /></p>
|
||
|
<div class="p"><img src="./delta.gif" alt="Start of change" />An 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 <span class="apiname">setsockopt()</span> function
|
||
|
to control the multicast characteristics associated with that socket. The <span class="apiname">setsockopt()</span> function
|
||
|
accepts the following IPPROTO_IP level flags: <img src="./delta.gif" alt="Start of change" /><ul><li>IP_ADD_MEMBERSHIP: Joins the multicast group specified</li>
|
||
|
<li>IP_DROP_MEMBERSHIP: Leaves the multicast group specified </li>
|
||
|
<li>IP_MULTICAST_IF: Sets the interface over which outgoing multicast datagrams
|
||
|
should be sent</li>
|
||
|
<li>IP_MULTICAST_TTL: Sets the Time To Live (TTL) in the IP header for outgoing
|
||
|
multicast datagrams</li>
|
||
|
<li>IP_MULTICAST_LOOP: Specifies whether a copy of an outgoing multicast datagram
|
||
|
should be delivered to the sending host as long as it is a member of the
|
||
|
multicast group </li>
|
||
|
</ul><img src="./deltaend.gif" alt="End of change" />
|
||
|
<img src="./deltaend.gif" alt="End of change" /></div>
|
||
|
<div class="p"><img src="./delta.gif" alt="Start of change" />The <span class="apiname">setsockopt()</span> function also accepts
|
||
|
the following IPPROTO_IPv6 level flags: <ul><li>IPv6_MULTICAST_IF: Sets the interface over which outgoing multicast datagrams
|
||
|
are sent</li>
|
||
|
<li>IPv6_MULTICAST_HOPS: Sets the hop limit values that are used for subsequent
|
||
|
multicast packets sent by a socket</li>
|
||
|
<li>IPv6_MULTICAST_LOOP: Specifies whether a copy of an outgoing multicast
|
||
|
datagram should be delivered to the sending host as long as it is a member
|
||
|
of the multicast group</li>
|
||
|
<li>IPv6_JOIN_GROUP: Joins the multicast group specified</li>
|
||
|
<li>IPv6_LEAVE_GROUP: Leaves the multicast group specified</li>
|
||
|
</ul>
|
||
|
<img src="./deltaend.gif" alt="End of change" /></div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="aconcepts.htm" title="Advanced socket concepts go beyond a general discussion of what sockets are and how they work. They provide ways to design socket applications for larger and more complex networks.">Advanced socket concepts</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="xmulticast.htm" title="IP multicasting provides the capability for an application to send a single IP datagram that a group of hosts in a network can receive.">Examples: Use multicasting with AF_INET</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../apis/ssocko.htm">setsockopt()</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|