Lines Matching defs:opt
103 struct ipv6_txoptions *opt)
106 if (opt &&
110 icsk->icsk_ext_hdr_len = opt->opt_flen + opt->opt_nflen;
114 opt = xchg((__force struct ipv6_txoptions **)&inet6_sk(sk)->opt,
115 opt);
118 return opt;
326 struct ipv6_txoptions *opt;
353 opt = rcu_dereference_protected(np->opt, lockdep_sock_is_held(sk));
354 opt = ipv6_renew_options(sk, opt, optname, new);
356 if (IS_ERR(opt))
357 return PTR_ERR(opt);
361 if (optname == IPV6_RTHDR && opt && opt->srcrt) {
362 struct ipv6_rt_hdr *rthdr = opt->srcrt;
373 (struct ipv6_sr_hdr *)opt->srcrt;
385 opt = ipv6_update_options(sk, opt);
387 if (opt) {
388 atomic_sub(opt->tot_len, &sk->sk_omem_alloc);
389 txopt_put(opt);
835 struct ipv6_txoptions *opt = NULL;
854 opt = sock_kmalloc(sk, sizeof(*opt) + optlen, GFP_KERNEL);
856 if (!opt)
859 memset(opt, 0, sizeof(*opt));
860 refcount_set(&opt->refcnt, 1);
861 opt->tot_len = sizeof(*opt) + optlen;
863 if (copy_from_sockptr(opt + 1, optval, optlen))
868 msg.msg_control = (void *)(opt+1);
869 ipc6.opt = opt;
876 opt = ipv6_update_options(sk, opt);
878 if (opt) {
879 atomic_sub(opt->tot_len, &sk->sk_omem_alloc);
880 txopt_put(opt);
1005 static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
1010 if (!opt)
1015 hdr = opt->hopopt;
1018 hdr = opt->dst0opt;
1021 hdr = (struct ipv6_opt_hdr *)opt->srcrt;
1024 hdr = opt->dst1opt;
1248 struct ipv6_txoptions *opt;
1251 opt = rcu_dereference_protected(np->opt,
1253 len = ipv6_getsockopt_sticky(sk, opt, optname, optval, len);