Lines Matching defs:opt2
739 struct ipv6_txoptions *opt2;
741 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
742 if (opt2) {
743 long dif = (char*)opt2 - (char*)opt;
744 memcpy(opt2, opt, opt->tot_len);
745 if (opt2->hopopt)
746 *((char**)&opt2->hopopt) += dif;
747 if (opt2->dst0opt)
748 *((char**)&opt2->dst0opt) += dif;
749 if (opt2->dst1opt)
750 *((char**)&opt2->dst1opt) += dif;
751 if (opt2->srcrt)
752 *((char**)&opt2->srcrt) += dif;
754 return opt2;
791 struct ipv6_txoptions *opt2;
811 tot_len += sizeof(*opt2);
812 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
813 if (!opt2)
816 memset(opt2, 0, tot_len);
818 opt2->tot_len = tot_len;
819 p = (char *)(opt2 + 1);
823 &opt2->hopopt, &p);
829 &opt2->dst0opt, &p);
835 (struct ipv6_opt_hdr **)&opt2->srcrt, &p);
841 &opt2->dst1opt, &p);
845 opt2->opt_nflen = (opt2->hopopt ? ipv6_optlen(opt2->hopopt) : 0) +
846 (opt2->dst0opt ? ipv6_optlen(opt2->dst0opt) : 0) +
847 (opt2->srcrt ? ipv6_optlen(opt2->srcrt) : 0);
848 opt2->opt_flen = (opt2->dst1opt ? ipv6_optlen(opt2->dst1opt) : 0);
850 return opt2;
852 sock_kfree_s(sk, opt2, opt2->tot_len);