Lines Matching refs:opt
211 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_dest_hao() local
215 if (opt->dsthao) { in ipv6_dest_hao()
219 opt->dsthao = opt->dst1; in ipv6_dest_hao()
220 opt->dst1 = 0; in ipv6_dest_hao()
280 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
302 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
304 dstbuf = opt->dst1; in ipv6_destopt_rcv()
310 opt = IP6CB(skb); in ipv6_destopt_rcv()
312 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
314 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
354 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_srh_rcv() local
406 opt->srcrt = skb_network_header_len(skb); in ipv6_srh_rcv()
407 opt->lastopt = opt->srcrt; in ipv6_srh_rcv()
409 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv()
474 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rpl_srh_rcv() local
523 opt->srcrt = skb_network_header_len(skb); in ipv6_rpl_srh_rcv()
524 opt->lastopt = opt->srcrt; in ipv6_rpl_srh_rcv()
526 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rpl_srh_rcv()
668 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rthdr_rcv() local
729 opt->lastopt = opt->srcrt = skb_network_header_len(skb); in ipv6_rthdr_rcv()
731 opt->dst0 = opt->dst1; in ipv6_rthdr_rcv()
732 opt->dst1 = 0; in ipv6_rthdr_rcv()
733 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv()
1019 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_parse_hopopts() local
1041 opt->flags |= IP6SKB_HOPBYHOP; in ipv6_parse_hopopts()
1045 opt = IP6CB(skb); in ipv6_parse_hopopts()
1046 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
1063 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr0() argument
1069 ihdr = (struct rt0_hdr *) opt; in ipv6_push_rthdr0()
1088 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr4() argument
1094 sr_ihdr = (struct ipv6_sr_hdr *)opt; in ipv6_push_rthdr4()
1137 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr() argument
1140 switch (opt->type) { in ipv6_push_rthdr()
1144 ipv6_push_rthdr0(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
1147 ipv6_push_rthdr4(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
1154 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt) in ipv6_push_exthdr() argument
1156 struct ipv6_opt_hdr *h = skb_push(skb, ipv6_optlen(opt)); in ipv6_push_exthdr()
1158 memcpy(h, opt, ipv6_optlen(opt)); in ipv6_push_exthdr()
1163 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, in ipv6_push_nfrag_opts() argument
1167 if (opt->srcrt) { in ipv6_push_nfrag_opts()
1168 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr, saddr); in ipv6_push_nfrag_opts()
1173 if (opt->dst0opt) in ipv6_push_nfrag_opts()
1174 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt); in ipv6_push_nfrag_opts()
1176 if (opt->hopopt) in ipv6_push_nfrag_opts()
1177 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt); in ipv6_push_nfrag_opts()
1180 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto) in ipv6_push_frag_opts() argument
1182 if (opt->dst1opt) in ipv6_push_frag_opts()
1183 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt); in ipv6_push_frag_opts()
1188 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) in ipv6_dup_options() argument
1192 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1194 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
1195 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1248 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, in ipv6_renew_options() argument
1255 if (opt) { in ipv6_renew_options()
1256 if (newtype != IPV6_HOPOPTS && opt->hopopt) in ipv6_renew_options()
1257 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options()
1258 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt) in ipv6_renew_options()
1259 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options()
1260 if (newtype != IPV6_RTHDR && opt->srcrt) in ipv6_renew_options()
1261 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options()
1262 if (newtype != IPV6_DSTOPTS && opt->dst1opt) in ipv6_renew_options()
1263 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options()
1283 (opt ? opt->hopopt : NULL), in ipv6_renew_options()
1286 (opt ? opt->dst0opt : NULL), in ipv6_renew_options()
1290 (opt ? (struct ipv6_opt_hdr *)opt->srcrt : NULL), in ipv6_renew_options()
1293 (opt ? opt->dst1opt : NULL), in ipv6_renew_options()
1305 struct ipv6_txoptions *opt) in ipv6_fixup_options()
1311 if (opt && opt->dst0opt && !opt->srcrt) { in ipv6_fixup_options()
1312 if (opt_space != opt) { in ipv6_fixup_options()
1313 memcpy(opt_space, opt, sizeof(*opt_space)); in ipv6_fixup_options()
1314 opt = opt_space; in ipv6_fixup_options()
1316 opt->opt_nflen -= ipv6_optlen(opt->dst0opt); in ipv6_fixup_options()
1317 opt->dst0opt = NULL; in ipv6_fixup_options()
1320 return opt; in ipv6_fixup_options()
1336 const struct ipv6_txoptions *opt, in fl6_update_dst() argument
1339 if (!opt || !opt->srcrt) in fl6_update_dst()
1344 switch (opt->srcrt->type) { in fl6_update_dst()
1348 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; in fl6_update_dst()
1352 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt; in fl6_update_dst()