Lines Matching refs:mreq

533 			struct ip_mreqn mreq;  in ip_setsockopt()  local
544 if (copy_from_user(&mreq,optval,sizeof(mreq))) in ip_setsockopt()
547 memset(&mreq, 0, sizeof(mreq)); in ip_setsockopt()
549 copy_from_user(&mreq.imr_address,optval,sizeof(struct in_addr))) in ip_setsockopt()
553 if (!mreq.imr_ifindex) { in ip_setsockopt()
554 if (mreq.imr_address.s_addr == INADDR_ANY) { in ip_setsockopt()
560 dev = ip_dev_find(mreq.imr_address.s_addr); in ip_setsockopt()
562 mreq.imr_ifindex = dev->ifindex; in ip_setsockopt()
566 dev = __dev_get_by_index(mreq.imr_ifindex); in ip_setsockopt()
574 if (sk->bound_dev_if && mreq.imr_ifindex != sk->bound_dev_if) in ip_setsockopt()
577 sk->protinfo.af_inet.mc_index = mreq.imr_ifindex; in ip_setsockopt()
578 sk->protinfo.af_inet.mc_addr = mreq.imr_address.s_addr; in ip_setsockopt()
586 struct ip_mreqn mreq; in ip_setsockopt() local
592 if(copy_from_user(&mreq,optval,sizeof(mreq))) in ip_setsockopt()
595 memset(&mreq, 0, sizeof(mreq)); in ip_setsockopt()
596 if (copy_from_user(&mreq,optval,sizeof(struct ip_mreq))) in ip_setsockopt()
601 err = ip_mc_join_group(sk, &mreq); in ip_setsockopt()
603 err = ip_mc_leave_group(sk, &mreq); in ip_setsockopt()
665 struct ip_mreqn mreq; in ip_setsockopt() local
667 mreq.imr_multiaddr.s_addr = mreqs.imr_multiaddr; in ip_setsockopt()
668 mreq.imr_address.s_addr = mreqs.imr_interface; in ip_setsockopt()
669 mreq.imr_ifindex = 0; in ip_setsockopt()
670 err = ip_mc_join_group(sk, &mreq); in ip_setsockopt()
687 struct ip_mreqn mreq; in ip_setsockopt() local
697 memset(&mreq, 0, sizeof(mreq)); in ip_setsockopt()
698 mreq.imr_multiaddr = psin->sin_addr; in ip_setsockopt()
699 mreq.imr_ifindex = greq.gr_interface; in ip_setsockopt()
702 err = ip_mc_join_group(sk, &mreq); in ip_setsockopt()
704 err = ip_mc_leave_group(sk, &mreq); in ip_setsockopt()
741 struct ip_mreqn mreq; in ip_setsockopt() local
744 mreq.imr_multiaddr = psin->sin_addr; in ip_setsockopt()
745 mreq.imr_address.s_addr = 0; in ip_setsockopt()
746 mreq.imr_ifindex = greqs.gsr_interface; in ip_setsockopt()
747 err = ip_mc_join_group(sk, &mreq); in ip_setsockopt()
750 greqs.gsr_interface = mreq.imr_ifindex; in ip_setsockopt()