Lines Matching refs:optname
121 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument
123 switch (optname) { in setsockopt_needs_rtnl()
164 static int do_ipv6_mcast_group_source(struct sock *sk, int optname, in do_ipv6_mcast_group_source() argument
179 if (optname == MCAST_BLOCK_SOURCE) { in do_ipv6_mcast_group_source()
182 } else if (optname == MCAST_UNBLOCK_SOURCE) { in do_ipv6_mcast_group_source()
185 } else if (optname == MCAST_JOIN_SOURCE_GROUP) { in do_ipv6_mcast_group_source()
280 static int ipv6_mcast_join_leave(struct sock *sk, int optname, in ipv6_mcast_join_leave() argument
294 if (optname == MCAST_JOIN_GROUP) in ipv6_mcast_join_leave()
300 static int compat_ipv6_mcast_join_leave(struct sock *sk, int optname, in compat_ipv6_mcast_join_leave() argument
314 if (optname == MCAST_JOIN_GROUP) in compat_ipv6_mcast_join_leave()
320 static int ipv6_set_opt_hdr(struct sock *sk, int optname, sockptr_t optval, in ipv6_set_opt_hdr() argument
330 if (optname != IPV6_RTHDR && !ns_capable(net->user_ns, CAP_NET_RAW)) in ipv6_set_opt_hdr()
354 opt = ipv6_renew_options(sk, opt, optname, new); in ipv6_set_opt_hdr()
361 if (optname == IPV6_RTHDR && opt && opt->srcrt) { in ipv6_set_opt_hdr()
394 static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, in do_ipv6_setsockopt() argument
401 bool needs_rtnl = setsockopt_needs_rtnl(optname); in do_ipv6_setsockopt()
415 if (ip6_mroute_opt(optname)) in do_ipv6_setsockopt()
416 return ip6_mroute_setsockopt(sk, optname, optval, optlen); in do_ipv6_setsockopt()
422 switch (optname) { in do_ipv6_setsockopt()
659 retv = ipv6_set_opt_hdr(sk, optname, optval, optlen); in do_ipv6_setsockopt()
840 if (optname == IPV6_ADD_MEMBERSHIP) in do_ipv6_setsockopt()
858 if (optname == IPV6_JOIN_ANYCAST) in do_ipv6_setsockopt()
874 retv = compat_ipv6_mcast_join_leave(sk, optname, optval, in do_ipv6_setsockopt()
877 retv = ipv6_mcast_join_leave(sk, optname, optval, in do_ipv6_setsockopt()
884 retv = do_ipv6_mcast_group_source(sk, optname, optval, optlen); in do_ipv6_setsockopt()
942 retv = xfrm_user_policy(sk, optname, optval, optlen); in do_ipv6_setsockopt()
1001 int ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in ipv6_setsockopt() argument
1007 return udp_prot.setsockopt(sk, level, optname, optval, optlen); in ipv6_setsockopt()
1012 err = do_ipv6_setsockopt(sk, level, optname, optval, optlen); in ipv6_setsockopt()
1015 if (err == -ENOPROTOOPT && optname != IPV6_IPSEC_POLICY && in ipv6_setsockopt()
1016 optname != IPV6_XFRM_POLICY) in ipv6_setsockopt()
1017 err = nf_setsockopt(sk, PF_INET6, optname, optval, optlen); in ipv6_setsockopt()
1024 int optname, char __user *optval, int len) in ipv6_getsockopt_sticky() argument
1031 switch (optname) { in ipv6_getsockopt_sticky()
1126 static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, in do_ipv6_getsockopt() argument
1133 if (ip6_mroute_opt(optname)) in do_ipv6_getsockopt()
1134 return ip6_mroute_getsockopt(sk, optname, optval, optlen); in do_ipv6_getsockopt()
1138 switch (optname) { in do_ipv6_getsockopt()
1261 len = ipv6_getsockopt_sticky(sk, opt, optname, optval, len); in do_ipv6_getsockopt()
1345 if (optname == IPV6_UNICAST_HOPS) in do_ipv6_getsockopt()
1475 int ipv6_getsockopt(struct sock *sk, int level, int optname, in ipv6_getsockopt() argument
1481 return udp_prot.getsockopt(sk, level, optname, optval, optlen); in ipv6_getsockopt()
1486 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen, 0); in ipv6_getsockopt()
1489 if (err == -ENOPROTOOPT && optname != IPV6_2292PKTOPTIONS) { in ipv6_getsockopt()
1495 err = nf_getsockopt(sk, PF_INET6, optname, optval, &len); in ipv6_getsockopt()