Apache Portable Runtime
Functions

Functions

apr_status_t apr_mcast_join (apr_socket_t *sock, apr_sockaddr_t *join, apr_sockaddr_t *iface, apr_sockaddr_t *source)
 
apr_status_t apr_mcast_leave (apr_socket_t *sock, apr_sockaddr_t *addr, apr_sockaddr_t *iface, apr_sockaddr_t *source)
 
apr_status_t apr_mcast_hops (apr_socket_t *sock, apr_byte_t ttl)
 
apr_status_t apr_mcast_loopback (apr_socket_t *sock, apr_byte_t opt)
 
apr_status_t apr_mcast_interface (apr_socket_t *sock, apr_sockaddr_t *iface)
 

Detailed Description

Function Documentation

apr_status_t apr_mcast_hops ( apr_socket_t sock,
apr_byte_t  ttl 
)

Set the Multicast Time to Live (ttl) for a multicast transmission.

Parameters
sockThe socket to set the multicast ttl
ttlTime to live to Assign. 0-255, default=1
Remarks
If the TTL is 0, packets will only be seen by sockets on the local machine, and only when multicast loopback is enabled.
apr_status_t apr_mcast_interface ( apr_socket_t sock,
apr_sockaddr_t iface 
)

Set the Interface to be used for outgoing Multicast Transmissions.

Parameters
sockThe socket to set the multicast interface on
ifaceAddress of the interface to use for Multicast
apr_status_t apr_mcast_join ( apr_socket_t sock,
apr_sockaddr_t join,
apr_sockaddr_t iface,
apr_sockaddr_t source 
)

Join a Multicast Group

Parameters
sockThe socket to join a multicast group
joinThe address of the multicast group to join
ifaceAddress of the interface to use. If NULL is passed, the default multicast interface will be used. (OS Dependent)
sourceSource Address to accept transmissions from (non-NULL implies Source-Specific Multicast)
apr_status_t apr_mcast_leave ( apr_socket_t sock,
apr_sockaddr_t addr,
apr_sockaddr_t iface,
apr_sockaddr_t source 
)

Leave a Multicast Group. All arguments must be the same as apr_mcast_join.

Parameters
sockThe socket to leave a multicast group
addrThe address of the multicast group to leave
ifaceAddress of the interface to use. If NULL is passed, the default multicast interface will be used. (OS Dependent)
sourceSource Address to accept transmissions from (non-NULL implies Source-Specific Multicast)
apr_status_t apr_mcast_loopback ( apr_socket_t sock,
apr_byte_t  opt 
)

Toggle IP Multicast Loopback

Parameters
sockThe socket to set multicast loopback
opt0=disable, 1=enable