|
NAMEsourcefilter —
advanced multicast group membership API
SYNOPSIS#include <sys/socket.h>
#include <netinet/in.h>
int
int
int
int
DESCRIPTIONThesourcefilter functions implement the advanced,
full-state multicast API defined in RFC 3678. An application may use these
functions to atomically set and retrieve the multicast source address filters
associated with a socket s and a multicast
group.
The functions The kernel will always return the number of source filter entries on the socket for that group in *numsrc. If the *numsrc argument is non-zero, the kernel will attempt to return up to *numsrc filter entries in the array pointed to by slist. The *numsrc argument may be set to 0, in which case the slist argument will be ignored. For the The protocol-independent function
Any changes made by these functions will be communicated to IGMPv3 and/or MLDv2 routers on the local network as appropriate. If no IGMPv3 or MLDv2 routers are present, changes in the source filter lists made by these functions will not cause state changes to be transmitted, with the exception of any change which causes a group to be joined or left. The kernel will continue to maintain the source filter state regardless of the IGMP or MLD version in use on the link. IMPLEMENTATION NOTESThe IPv4 specific versions of these functions are implemented in terms of the protocol-independent functions. Application writers are encouraged to use the protocol-independent functions for efficiency, and forwards compatibility with IPv6 networks.For the protocol-independent functions
Currently FreeBSD does not support source address selection for the IPv4 protocol family, therefore the use of multicast APIs with an unnumbered IPv4 interface is not recommended. In all cases, the first assigned IPv4 address on the interface will be used as the source address of IGMP control traffic. If this address is removed or changed, the results are undefined. RETURN VALUESThegetsourcefilter (),
getipv4sourcefilter (),
setsourcefilter (), and
setipv4sourcefilter () functions return the
value 0 if successful; otherwise the value -1 is returned and
the global variable errno is set to indicate the error.
ERRORSThesourcefilter functions may fail because of:
SEE ALSOip(4), ip6(4), multicast(4), ifmcstat(8)D. Thaler, B. Fenner, and B. Quinn, Socket Interface Extensions for Multicast Source Filters, RFC 3678, Jan 2004. HISTORYThesourcefilter functions first appeared in
FreeBSD 7.0.
AUTHORSBruce M. Simpson <bms@FreeBSD.org>
Visit the GSP FreeBSD Man Page Interface. |