Struct:group filter

Jump to: navigation, search
#include <trsocket.h>
 * Structure pointed to by the 3rd parameter of tfIoctl() when
 * the second parameter is either SIOCGMSFILTER, or SIOCSMSFILTER.
struct group_filter
    ttUser32Bit             gf_interface; /* interface index */
    struct sockaddr_storage gf_group;     /* multicast address */
    ttUser32Bit             gf_fmode;     /* filter mode (MCAST_INCLUDE
                                           * or MCAST_EXCLUDE) */
    ttUser32Bit             gf_numsrc;    /* number of sources */
    struct sockaddr_storage gf_slist[1];  /* source address list */

group_filter Parameters

  • gf_interface
    Index of the corresponding configured interface as returned by if_nametoindex(). Note that a zero index is valid if the user has either designated a default multicast interface for the socket via the IP_MULTICAST_IF or IPV6_MULTICAST_IF socket options, or designated a default multicast interface for the system via tfSetMcastInterface() or tf6SetMcastInterface().
  • gf_group
    Destination multicast group address (IPv4 or IPv6).
  • gf_fmode
    Filter mode. Either MCAST_INCLUDE or MCAST_EXCLUDE.
  • gf_numsrc
    Number of source addresses in the gf_slist array.
  • gf_slist
    Points to an array of IPv4 or IPv6 source addresses to include or exclude, based on the value of gf_fmode. The address family (AF_INET or AF_INET6) of all source addresses must match that of gf_group.