Lines Matching refs:opt
181 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_dest_hao() local
186 if (opt->dsthao) { in ipv6_dest_hao()
190 opt->dsthao = opt->dst1; in ipv6_dest_hao()
191 opt->dst1 = 0; in ipv6_dest_hao()
252 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
267 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
269 dstbuf = opt->dst1; in ipv6_destopt_rcv()
274 opt = IP6CB(skb); in ipv6_destopt_rcv()
276 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
278 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
295 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rthdr_rcv() local
348 opt->lastopt = opt->srcrt = skb_network_header_len(skb); in ipv6_rthdr_rcv()
350 opt->dst0 = opt->dst1; in ipv6_rthdr_rcv()
351 opt->dst1 = 0; in ipv6_rthdr_rcv()
352 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv()
620 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_parse_hopopts() local
635 opt->flags |= IP6SKB_HOPBYHOP; in ipv6_parse_hopopts()
638 opt = IP6CB(skb); in ipv6_parse_hopopts()
639 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
656 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr() argument
662 ihdr = (struct rt0_hdr *) opt; in ipv6_push_rthdr()
680 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt) in ipv6_push_exthdr() argument
682 struct ipv6_opt_hdr *h = (struct ipv6_opt_hdr *)skb_push(skb, ipv6_optlen(opt)); in ipv6_push_exthdr()
684 memcpy(h, opt, ipv6_optlen(opt)); in ipv6_push_exthdr()
689 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, in ipv6_push_nfrag_opts() argument
693 if (opt->srcrt) { in ipv6_push_nfrag_opts()
694 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr); in ipv6_push_nfrag_opts()
699 if (opt->dst0opt) in ipv6_push_nfrag_opts()
700 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt); in ipv6_push_nfrag_opts()
702 if (opt->hopopt) in ipv6_push_nfrag_opts()
703 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt); in ipv6_push_nfrag_opts()
707 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto) in ipv6_push_frag_opts() argument
709 if (opt->dst1opt) in ipv6_push_frag_opts()
710 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt); in ipv6_push_frag_opts()
714 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) in ipv6_dup_options() argument
718 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
720 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
721 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
762 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, in ipv6_renew_options() argument
771 if (opt) { in ipv6_renew_options()
772 if (newtype != IPV6_HOPOPTS && opt->hopopt) in ipv6_renew_options()
773 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options()
774 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt) in ipv6_renew_options()
775 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options()
776 if (newtype != IPV6_RTHDR && opt->srcrt) in ipv6_renew_options()
777 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options()
778 if (newtype != IPV6_DSTOPTS && opt->dst1opt) in ipv6_renew_options()
779 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options()
798 err = ipv6_renew_option(opt ? opt->hopopt : NULL, newopt, newoptlen, in ipv6_renew_options()
804 err = ipv6_renew_option(opt ? opt->dst0opt : NULL, newopt, newoptlen, in ipv6_renew_options()
810 err = ipv6_renew_option(opt ? opt->srcrt : NULL, newopt, newoptlen, in ipv6_renew_options()
816 err = ipv6_renew_option(opt ? opt->dst1opt : NULL, newopt, newoptlen, in ipv6_renew_options()
834 struct ipv6_txoptions *opt) in ipv6_fixup_options()
840 if (opt && opt->dst0opt && !opt->srcrt) { in ipv6_fixup_options()
841 if (opt_space != opt) { in ipv6_fixup_options()
842 memcpy(opt_space, opt, sizeof(*opt_space)); in ipv6_fixup_options()
843 opt = opt_space; in ipv6_fixup_options()
845 opt->opt_nflen -= ipv6_optlen(opt->dst0opt); in ipv6_fixup_options()
846 opt->dst0opt = NULL; in ipv6_fixup_options()
849 return opt; in ipv6_fixup_options()
865 const struct ipv6_txoptions *opt, in fl6_update_dst() argument
868 if (!opt || !opt->srcrt) in fl6_update_dst()
872 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; in fl6_update_dst()