Lines Matching refs:msf
2438 int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) in ip_mc_msfilter() argument
2442 __be32 addr = msf->imsf_multiaddr; in ip_mc_msfilter()
2452 if (msf->imsf_fmode != MCAST_INCLUDE && in ip_mc_msfilter()
2453 msf->imsf_fmode != MCAST_EXCLUDE) in ip_mc_msfilter()
2458 imr.imr_multiaddr.s_addr = msf->imsf_multiaddr; in ip_mc_msfilter()
2459 imr.imr_address.s_addr = msf->imsf_interface; in ip_mc_msfilter()
2469 if (msf->imsf_fmode == MCAST_INCLUDE && msf->imsf_numsrc == 0) { in ip_mc_msfilter()
2475 if (pmc->multi.imr_multiaddr.s_addr == msf->imsf_multiaddr && in ip_mc_msfilter()
2483 if (msf->imsf_numsrc) { in ip_mc_msfilter()
2484 newpsl = sock_kmalloc(sk, IP_SFLSIZE(msf->imsf_numsrc), in ip_mc_msfilter()
2490 newpsl->sl_max = newpsl->sl_count = msf->imsf_numsrc; in ip_mc_msfilter()
2491 memcpy(newpsl->sl_addr, msf->imsf_slist, in ip_mc_msfilter()
2492 msf->imsf_numsrc * sizeof(msf->imsf_slist[0])); in ip_mc_msfilter()
2493 err = ip_mc_add_src(in_dev, &msf->imsf_multiaddr, in ip_mc_msfilter()
2494 msf->imsf_fmode, newpsl->sl_count, newpsl->sl_addr, 0); in ip_mc_msfilter()
2501 (void) ip_mc_add_src(in_dev, &msf->imsf_multiaddr, in ip_mc_msfilter()
2502 msf->imsf_fmode, 0, NULL, 0); in ip_mc_msfilter()
2506 (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, in ip_mc_msfilter()
2511 (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, in ip_mc_msfilter()
2517 pmc->sfmode = msf->imsf_fmode; in ip_mc_msfilter()
2525 int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, in ip_mc_msfget() argument
2530 __be32 addr = msf->imsf_multiaddr; in ip_mc_msfget()
2542 imr.imr_multiaddr.s_addr = msf->imsf_multiaddr; in ip_mc_msfget()
2543 imr.imr_address.s_addr = msf->imsf_interface; in ip_mc_msfget()
2554 if (pmc->multi.imr_multiaddr.s_addr == msf->imsf_multiaddr && in ip_mc_msfget()
2560 msf->imsf_fmode = pmc->sfmode; in ip_mc_msfget()
2568 copycount = count < msf->imsf_numsrc ? count : msf->imsf_numsrc; in ip_mc_msfget()
2570 msf->imsf_numsrc = count; in ip_mc_msfget()
2572 copy_to_user(optval, msf, IP_MSFILTER_SIZE(0))) { in ip_mc_msfget()