Lines Matching refs:optval
699 sockptr_t optval, int optlen) in copy_group_source_from_sockptr() argument
706 if (copy_from_sockptr(&gr32, optval, sizeof(gr32))) in copy_group_source_from_sockptr()
714 if (copy_from_sockptr(greqs, optval, sizeof(*greqs))) in copy_group_source_from_sockptr()
722 sockptr_t optval, int optlen) in do_mcast_group_source() argument
729 err = copy_group_source_from_sockptr(&greqs, optval, optlen); in do_mcast_group_source()
769 static int ip_set_mcast_msfilter(struct sock *sk, sockptr_t optval, int optlen) in ip_set_mcast_msfilter() argument
779 gsf = memdup_sockptr(optval, optlen); in ip_set_mcast_msfilter()
801 static int compat_ip_set_mcast_msfilter(struct sock *sk, sockptr_t optval, in compat_ip_set_mcast_msfilter() argument
821 if (copy_from_sockptr(gf32, optval, optlen)) in compat_ip_set_mcast_msfilter()
846 sockptr_t optval, int optlen) in ip_mcast_join_leave() argument
854 if (copy_from_sockptr(&greq, optval, sizeof(greq))) in ip_mcast_join_leave()
868 sockptr_t optval, int optlen) in compat_ip_mcast_join_leave() argument
876 if (copy_from_sockptr(&greq, optval, sizeof(greq))) in compat_ip_mcast_join_leave()
893 sockptr_t optval, unsigned int optlen) in do_ip_setsockopt() argument
928 if (copy_from_sockptr(&val, optval, sizeof(val))) in do_ip_setsockopt()
933 if (copy_from_sockptr(&ucval, optval, sizeof(ucval))) in do_ip_setsockopt()
948 return ip_mroute_setsockopt(sk, optname, optval, optlen); in do_ip_setsockopt()
1087 err = ip_options_get(sock_net(sk), &opt, optval, optlen); in do_ip_setsockopt()
1176 if (copy_from_sockptr(&mreq, optval, sizeof(mreq))) in do_ip_setsockopt()
1181 if (copy_from_sockptr(&mreq, optval, in do_ip_setsockopt()
1185 if (copy_from_sockptr(&mreq.imr_address, optval, in do_ip_setsockopt()
1238 if (copy_from_sockptr(&mreq, optval, sizeof(mreq))) in do_ip_setsockopt()
1242 if (copy_from_sockptr(&mreq, optval, in do_ip_setsockopt()
1263 msf = memdup_sockptr(optval, optlen); in do_ip_setsockopt()
1294 if (copy_from_sockptr(&mreqs, optval, sizeof(mreqs))) { in do_ip_setsockopt()
1325 err = compat_ip_mcast_join_leave(sk, optname, optval, in do_ip_setsockopt()
1328 err = ip_mcast_join_leave(sk, optname, optval, optlen); in do_ip_setsockopt()
1334 err = do_mcast_group_source(sk, optname, optval, optlen); in do_ip_setsockopt()
1338 err = compat_ip_set_mcast_msfilter(sk, optval, optlen); in do_ip_setsockopt()
1340 err = ip_set_mcast_msfilter(sk, optval, optlen); in do_ip_setsockopt()
1347 err = xfrm_user_policy(sk, optname, optval, optlen); in do_ip_setsockopt()
1409 int ip_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in ip_setsockopt() argument
1417 err = do_ip_setsockopt(sk, level, optname, optval, optlen); in ip_setsockopt()
1424 err = nf_setsockopt(sk, PF_INET, optname, optval, optlen); in ip_setsockopt()
1445 static int ip_get_mcast_msfilter(struct sock *sk, sockptr_t optval, in ip_get_mcast_msfilter() argument
1455 if (copy_from_sockptr(&gsf, optval, size0)) in ip_get_mcast_msfilter()
1459 err = ip_mc_gsfget(sk, &gsf, optval, in ip_get_mcast_msfilter()
1467 copy_to_sockptr(optval, &gsf, size0)) in ip_get_mcast_msfilter()
1472 static int compat_ip_get_mcast_msfilter(struct sock *sk, sockptr_t optval, in compat_ip_get_mcast_msfilter() argument
1483 if (copy_from_sockptr(&gf32, optval, size0)) in compat_ip_get_mcast_msfilter()
1491 err = ip_mc_gsfget(sk, &gf, optval, in compat_ip_get_mcast_msfilter()
1499 copy_to_sockptr_offset(optval, offsetof(struct compat_group_filter, gf_fmode), in compat_ip_get_mcast_msfilter()
1501 copy_to_sockptr_offset(optval, offsetof(struct compat_group_filter, gf_numsrc), in compat_ip_get_mcast_msfilter()
1508 sockptr_t optval, sockptr_t optlen) in do_ip_getsockopt() argument
1519 return ip_mroute_getsockopt(sk, optname, optval, optlen); in do_ip_getsockopt()
1627 if (copy_to_sockptr(optval, opt->__data, len)) in do_ip_getsockopt()
1651 if (optval.is_kernel) { in do_ip_getsockopt()
1653 msg.msg_control = optval.kernel; in do_ip_getsockopt()
1656 msg.msg_control_user = optval.user; in do_ip_getsockopt()
1692 if (copy_to_sockptr(optval, &addr, len)) in do_ip_getsockopt()
1714 if (copy_from_sockptr(&msf, optval, IP_MSFILTER_SIZE(0))) { in do_ip_getsockopt()
1718 err = ip_mc_msfget(sk, &msf, optval, optlen); in do_ip_getsockopt()
1723 err = compat_ip_get_mcast_msfilter(sk, optval, optlen, in do_ip_getsockopt()
1726 err = ip_get_mcast_msfilter(sk, optval, optlen, len); in do_ip_getsockopt()
1742 if (copy_to_sockptr(optval, &ucval, 1)) in do_ip_getsockopt()
1748 if (copy_to_sockptr(optval, &val, len)) in do_ip_getsockopt()
1761 int optname, char __user *optval, int __user *optlen) in ip_getsockopt() argument
1766 USER_SOCKPTR(optval), USER_SOCKPTR(optlen)); in ip_getsockopt()
1777 err = nf_getsockopt(sk, PF_INET, optname, optval, &len); in ip_getsockopt()