setipv4sourcefilter.3n (2010 09)

s
setipv4sourcefilter(3N) setipv4sourcefilter(3N)
NAME
setipv4sourcefilter() - set IPv4 multicast source filter state
SYNOPSIS
#include <netinet/in.h>
int setipv4sourcefilter(
int s,
struct in_addr interface,
struct in_addr group,
uint32_t fmode,
uint32_t numsrc,
struct in_addr *slist
);
DESCRIPTION
This function sets the multicast source filter state for an IPv4 multicast group on a given socket. This
function can be used to join a multicast group by specifying a filter mode of
MCAST_EXCLUDE
(with or
without a source list), or by specifying a filter mode of
MCAST_INCLUDE
with a non-empty source list. If
the multicast group is already joined, this function replaces the existing filter mode and source list with
the ones provided. This function can be used to leave a multicast group by specifying a filter mode of
MCAST_INCLUDE and an empty source list.
Parameters
s Specifies the descriptor identifying the socket. The socket address family must be
AF_INET
,
and the socket type must be
SOCK_DGRAM.
interface Holds the IPv4 address of a local interface, or
INADDR_ANY. If set to
INADDR_ANY, the sys-
tem chooses a multicast group by matching the multicast address only; or when joining a
group, the system chooses the interface that datagrams for the group would be sent from,
based on the routing configuration.
group Holds the IPv4 multicast address of the group.
fmode Identifies the filter mode. The value of this field must be either
MCAST_INCLUDE or
MCAST_EXCLUDE, which are defined in <netinet/in.h>
.
numsrc Holds the number of source addresses in the slist array.
slist Points to an array of IPv4 addresses of sources to include or exclude depending on the filter
mode.
RETURN VALUES
setipv4sourcefilter()
returns the following values:
0 Successful completion.
-1 Failure. errno is set to indicate the error.
ERRORS
If
setipv4sourcefilter() fails, errno is set to one of the following values:
[EBADF] The argument s is not a valid descriptor.
[EOPNOTSUPP] This function is not supported by the socket type.
[ENOMEM] Insufcient memory is available for internal system data structures.
[ENOBUFS] numsrc exceeds the maximum number of sources allowed, as determined by
the ndd tunable parameters
ip_ipc_mcast_maxsrc and
ip_igmp_maxsrc.
[EADDRNOTAVAIL] The specified IP address is not a local interface address; or trying to leave
an unjoined group.
[EINVAL] group is not an IPv4 multicast address; or slist contains an invalid source
address; or the specified filter mode is not valid.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)