Advanced API Usage A part of a sample application code if ((gf = malloc(GROUP_FILTER_SIZE(numsrc))) == NULL) perror("memory allocation error"); bzero(gf, GROUP_FILTER_SIZE(numsrc)); gf->gf_interface = index; gf->gf_fmode = mode; gf->gf_numsrc = numsrc; bcopy(&grp, &gf->gf_group, grp.sin6_len); for (i = 0; i < numsrc; i++) bcopy(&src[i], &gf->gf_slist[i], src[i].sin6_len); if (ioctl(socket, SIOCSMSFILTER, gf) != 0) perror("cannot listen group");