You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by pq...@apache.org on 2005/01/03 08:37:36 UTC
svn commit: r123950 - /apr/apr/trunk/include/apr_network_io.h /apr/apr/trunk/network_io/unix/multicast.c
Author: pquerna
Date: Sun Jan 2 23:37:34 2005
New Revision: 123950
URL: http://svn.apache.org/viewcvs?view=rev&rev=123950
Log:
Add arguments for Single Source Multicast Support as suggested by Colm
MacCarthaigh on dev@apr.
SSM Support is not implemented, but I added it in the interest of making
a single API that can be used in the future.
Modified:
apr/apr/trunk/include/apr_network_io.h
apr/apr/trunk/network_io/unix/multicast.c
Modified: apr/apr/trunk/include/apr_network_io.h
Url: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr_network_io.h?view=diff&rev=123950&p1=apr/apr/trunk/include/apr_network_io.h&r1=123949&p2=apr/apr/trunk/include/apr_network_io.h&r2=123950
==============================================================================
--- apr/apr/trunk/include/apr_network_io.h (original)
+++ apr/apr/trunk/include/apr_network_io.h Sun Jan 2 23:37:34 2005
@@ -758,10 +758,14 @@
* @param join The address of the multicast group to join
* @param iface Address of the interface to use. If NULL is passed, the
* default multicast interface will be used. (OS Dependent)
+ * @param ssm Single Source Multicast Address to accept transmissions from.
+ * @remark Single Source Multicast is not currently implemented, and you must
+ * pass NULL for the argument.
*/
APR_DECLARE(apr_status_t) apr_mcast_join(apr_socket_t *sock,
apr_sockaddr_t *join,
- apr_sockaddr_t *iface);
+ apr_sockaddr_t *iface,
+ apr_sockaddr_t *ssm);
/**
* Leave a Multicast Group. All arguments must be the same as
@@ -770,10 +774,14 @@
* @param leave The address of the multicast group to leave
* @param iface Address of the interface to use. If NULL is passed, the
* default multicast interface will be used. (OS Dependent)
+ * @param ssm Single Source Multicast Address that transmissions came from.
+ * @remark Single Source Multicast is not currently implemented, and you must
+ * pass NULL for the argument.
*/
APR_DECLARE(apr_status_t) apr_mcast_leave(apr_socket_t *sock,
apr_sockaddr_t *leave,
- apr_sockaddr_t *iface);
+ apr_sockaddr_t *iface,
+ apr_sockaddr_t *ssm);
/**
* Set the Multicast Time to Live (ttl) for a multicast transmission.
Modified: apr/apr/trunk/network_io/unix/multicast.c
Url: http://svn.apache.org/viewcvs/apr/apr/trunk/network_io/unix/multicast.c?view=diff&rev=123950&p1=apr/apr/trunk/network_io/unix/multicast.c&r1=123949&p2=apr/apr/trunk/network_io/unix/multicast.c&r2=123950
==============================================================================
--- apr/apr/trunk/network_io/unix/multicast.c (original)
+++ apr/apr/trunk/network_io/unix/multicast.c Sun Jan 2 23:37:34 2005
@@ -125,7 +125,8 @@
#endif
static apr_status_t do_mcast(int type, apr_socket_t *sock,
- apr_sockaddr_t *mcast, apr_sockaddr_t *iface)
+ apr_sockaddr_t *mcast, apr_sockaddr_t *iface,
+ apr_sockaddr_t *ssm)
{
struct ip_mreq mip4;
apr_status_t rv = APR_SUCCESS;
@@ -133,6 +134,10 @@
struct ipv6_mreq mip6;
#endif
+ /* We do not currently support Single Source Multicast. */
+ if (ssm != NULL)
+ return APR_ENOTIMPL;
+
rv = mcast_check_type(sock);
if (rv != APR_SUCCESS) {
@@ -223,10 +228,11 @@
APR_DECLARE(apr_status_t) apr_mcast_join(apr_socket_t *sock,
apr_sockaddr_t *join,
- apr_sockaddr_t *iface)
+ apr_sockaddr_t *iface,
+ apr_sockaddr_t *ssm)
{
#ifdef IP_ADD_MEMBERSHIP
- return do_mcast(IP_ADD_MEMBERSHIP, sock, join, iface);
+ return do_mcast(IP_ADD_MEMBERSHIP, sock, join, iface, ssm);
#else
return APR_ENOTIMPL;
#endif
@@ -234,10 +240,11 @@
APR_DECLARE(apr_status_t) apr_mcast_leave(apr_socket_t *sock,
apr_sockaddr_t *leave,
- apr_sockaddr_t *iface)
+ apr_sockaddr_t *iface,
+ apr_sockaddr_t *ssm)
{
#ifdef IP_DROP_MEMBERSHIP
- return do_mcast(IP_DROP_MEMBERSHIP, sock, leave, iface);
+ return do_mcast(IP_DROP_MEMBERSHIP, sock, leave, iface, ssm);
#else
return APR_ENOTIMPL;
#endif