Lines Matching refs:opt

215 	struct inet6_skb_parm *opt = IP6CB(skb);  in ipv6_dest_hao()  local
219 if (opt->dsthao) { in ipv6_dest_hao()
223 opt->dsthao = opt->dst1; in ipv6_dest_hao()
224 opt->dst1 = 0; in ipv6_dest_hao()
284 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
306 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
308 dstbuf = opt->dst1; in ipv6_destopt_rcv()
314 opt = IP6CB(skb); in ipv6_destopt_rcv()
316 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
318 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
358 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_srh_rcv() local
410 opt->srcrt = skb_network_header_len(skb); in ipv6_srh_rcv()
411 opt->lastopt = opt->srcrt; in ipv6_srh_rcv()
413 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv()
483 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rthdr_rcv() local
537 opt->lastopt = opt->srcrt = skb_network_header_len(skb); in ipv6_rthdr_rcv()
539 opt->dst0 = opt->dst1; in ipv6_rthdr_rcv()
540 opt->dst1 = 0; in ipv6_rthdr_rcv()
541 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv()
827 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_parse_hopopts() local
849 opt->flags |= IP6SKB_HOPBYHOP; in ipv6_parse_hopopts()
853 opt = IP6CB(skb); in ipv6_parse_hopopts()
854 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
871 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr0() argument
877 ihdr = (struct rt0_hdr *) opt; in ipv6_push_rthdr0()
896 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr4() argument
902 sr_ihdr = (struct ipv6_sr_hdr *)opt; in ipv6_push_rthdr4()
945 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr() argument
948 switch (opt->type) { in ipv6_push_rthdr()
952 ipv6_push_rthdr0(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
955 ipv6_push_rthdr4(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
962 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt) in ipv6_push_exthdr() argument
964 struct ipv6_opt_hdr *h = skb_push(skb, ipv6_optlen(opt)); in ipv6_push_exthdr()
966 memcpy(h, opt, ipv6_optlen(opt)); in ipv6_push_exthdr()
971 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, in ipv6_push_nfrag_opts() argument
975 if (opt->srcrt) { in ipv6_push_nfrag_opts()
976 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr, saddr); in ipv6_push_nfrag_opts()
981 if (opt->dst0opt) in ipv6_push_nfrag_opts()
982 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt); in ipv6_push_nfrag_opts()
984 if (opt->hopopt) in ipv6_push_nfrag_opts()
985 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt); in ipv6_push_nfrag_opts()
988 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto) in ipv6_push_frag_opts() argument
990 if (opt->dst1opt) in ipv6_push_frag_opts()
991 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt); in ipv6_push_frag_opts()
996 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) in ipv6_dup_options() argument
1000 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1002 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
1003 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1057 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, in ipv6_renew_options() argument
1064 if (opt) { in ipv6_renew_options()
1065 if (newtype != IPV6_HOPOPTS && opt->hopopt) in ipv6_renew_options()
1066 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options()
1067 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt) in ipv6_renew_options()
1068 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options()
1069 if (newtype != IPV6_RTHDR && opt->srcrt) in ipv6_renew_options()
1070 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options()
1071 if (newtype != IPV6_DSTOPTS && opt->dst1opt) in ipv6_renew_options()
1072 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options()
1092 (opt ? opt->hopopt : NULL), in ipv6_renew_options()
1095 (opt ? opt->dst0opt : NULL), in ipv6_renew_options()
1099 (opt ? (struct ipv6_opt_hdr *)opt->srcrt : NULL), in ipv6_renew_options()
1102 (opt ? opt->dst1opt : NULL), in ipv6_renew_options()
1114 struct ipv6_txoptions *opt) in ipv6_fixup_options()
1120 if (opt && opt->dst0opt && !opt->srcrt) { in ipv6_fixup_options()
1121 if (opt_space != opt) { in ipv6_fixup_options()
1122 memcpy(opt_space, opt, sizeof(*opt_space)); in ipv6_fixup_options()
1123 opt = opt_space; in ipv6_fixup_options()
1125 opt->opt_nflen -= ipv6_optlen(opt->dst0opt); in ipv6_fixup_options()
1126 opt->dst0opt = NULL; in ipv6_fixup_options()
1129 return opt; in ipv6_fixup_options()
1145 const struct ipv6_txoptions *opt, in fl6_update_dst() argument
1148 if (!opt || !opt->srcrt) in fl6_update_dst()
1153 switch (opt->srcrt->type) { in fl6_update_dst()
1157 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; in fl6_update_dst()
1161 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt; in fl6_update_dst()