Lines Matching defs:opt
104 struct ipv6_txoptions *opt)
107 if (opt &&
114 opt->opt_flen + opt->opt_nflen;
118 opt = unrcu_pointer(xchg(&inet6_sk(sk)->opt, RCU_INITIALIZER(opt)));
121 return opt;
309 struct ipv6_txoptions *opt;
336 opt = rcu_dereference_protected(np->opt, lockdep_sock_is_held(sk));
337 opt = ipv6_renew_options(sk, opt, optname, new);
339 if (IS_ERR(opt))
340 return PTR_ERR(opt);
344 if (optname == IPV6_RTHDR && opt && opt->srcrt) {
345 struct ipv6_rt_hdr *rthdr = opt->srcrt;
356 (struct ipv6_sr_hdr *)opt->srcrt;
368 opt = ipv6_update_options(sk, opt);
370 if (opt) {
371 atomic_sub(opt->tot_len, &sk->sk_omem_alloc);
372 txopt_put(opt);
816 struct ipv6_txoptions *opt = NULL;
835 opt = sock_kmalloc(sk, sizeof(*opt) + optlen, GFP_KERNEL);
837 if (!opt)
840 memset(opt, 0, sizeof(*opt));
841 refcount_set(&opt->refcnt, 1);
842 opt->tot_len = sizeof(*opt) + optlen;
844 if (copy_from_sockptr(opt + 1, optval, optlen))
849 msg.msg_control = (void *)(opt+1);
850 ipc6.opt = opt;
857 opt = ipv6_update_options(sk, opt);
859 if (opt) {
860 atomic_sub(opt->tot_len, &sk->sk_omem_alloc);
861 txopt_put(opt);
984 static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
989 if (!opt)
994 hdr = opt->hopopt;
997 hdr = opt->dst0opt;
1000 hdr = (struct ipv6_opt_hdr *)opt->srcrt;
1003 hdr = opt->dst1opt;
1227 struct ipv6_txoptions *opt;
1230 opt = rcu_dereference_protected(np->opt,
1232 len = ipv6_getsockopt_sticky(sk, opt, optname, optval, len);