Lines Matching refs:opt
233 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_dest_hao() local
237 if (opt->dsthao) { in ipv6_dest_hao()
241 opt->dsthao = opt->dst1; in ipv6_dest_hao()
242 opt->dst1 = 0; in ipv6_dest_hao()
292 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
314 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
316 dstbuf = opt->dst1; in ipv6_destopt_rcv()
321 opt = IP6CB(skb); in ipv6_destopt_rcv()
323 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
325 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
365 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_srh_rcv() local
418 opt->srcrt = skb_network_header_len(skb); in ipv6_srh_rcv()
419 opt->lastopt = opt->srcrt; in ipv6_srh_rcv()
421 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv()
486 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rpl_srh_rcv() local
535 opt->srcrt = skb_network_header_len(skb); in ipv6_rpl_srh_rcv()
536 opt->lastopt = opt->srcrt; in ipv6_rpl_srh_rcv()
538 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rpl_srh_rcv()
680 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rthdr_rcv() local
741 opt->lastopt = opt->srcrt = skb_network_header_len(skb); in ipv6_rthdr_rcv()
743 opt->dst0 = opt->dst1; in ipv6_rthdr_rcv()
744 opt->dst1 = 0; in ipv6_rthdr_rcv()
745 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv()
1064 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_parse_hopopts() local
1086 opt->flags |= IP6SKB_HOPBYHOP; in ipv6_parse_hopopts()
1089 opt = IP6CB(skb); in ipv6_parse_hopopts()
1090 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
1107 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr0() argument
1113 ihdr = (struct rt0_hdr *) opt; in ipv6_push_rthdr0()
1132 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr4() argument
1138 sr_ihdr = (struct ipv6_sr_hdr *)opt; in ipv6_push_rthdr4()
1181 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr() argument
1184 switch (opt->type) { in ipv6_push_rthdr()
1188 ipv6_push_rthdr0(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
1191 ipv6_push_rthdr4(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
1198 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt) in ipv6_push_exthdr() argument
1200 struct ipv6_opt_hdr *h = skb_push(skb, ipv6_optlen(opt)); in ipv6_push_exthdr()
1202 memcpy(h, opt, ipv6_optlen(opt)); in ipv6_push_exthdr()
1207 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, in ipv6_push_nfrag_opts() argument
1211 if (opt->srcrt) { in ipv6_push_nfrag_opts()
1212 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr, saddr); in ipv6_push_nfrag_opts()
1217 if (opt->dst0opt) in ipv6_push_nfrag_opts()
1218 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt); in ipv6_push_nfrag_opts()
1220 if (opt->hopopt) in ipv6_push_nfrag_opts()
1221 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt); in ipv6_push_nfrag_opts()
1224 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto) in ipv6_push_frag_opts() argument
1226 if (opt->dst1opt) in ipv6_push_frag_opts()
1227 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt); in ipv6_push_frag_opts()
1232 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) in ipv6_dup_options() argument
1236 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1238 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
1239 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1292 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, in ipv6_renew_options() argument
1299 if (opt) { in ipv6_renew_options()
1300 if (newtype != IPV6_HOPOPTS && opt->hopopt) in ipv6_renew_options()
1301 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options()
1302 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt) in ipv6_renew_options()
1303 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options()
1304 if (newtype != IPV6_RTHDR && opt->srcrt) in ipv6_renew_options()
1305 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options()
1306 if (newtype != IPV6_DSTOPTS && opt->dst1opt) in ipv6_renew_options()
1307 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options()
1327 (opt ? opt->hopopt : NULL), in ipv6_renew_options()
1330 (opt ? opt->dst0opt : NULL), in ipv6_renew_options()
1334 (opt ? (struct ipv6_opt_hdr *)opt->srcrt : NULL), in ipv6_renew_options()
1337 (opt ? opt->dst1opt : NULL), in ipv6_renew_options()
1349 struct ipv6_txoptions *opt) in ipv6_fixup_options()
1355 if (opt && opt->dst0opt && !opt->srcrt) { in ipv6_fixup_options()
1356 if (opt_space != opt) { in ipv6_fixup_options()
1357 memcpy(opt_space, opt, sizeof(*opt_space)); in ipv6_fixup_options()
1358 opt = opt_space; in ipv6_fixup_options()
1360 opt->opt_nflen -= ipv6_optlen(opt->dst0opt); in ipv6_fixup_options()
1361 opt->dst0opt = NULL; in ipv6_fixup_options()
1364 return opt; in ipv6_fixup_options()
1380 const struct ipv6_txoptions *opt, in fl6_update_dst() argument
1383 if (!opt || !opt->srcrt) in fl6_update_dst()
1388 switch (opt->srcrt->type) { in fl6_update_dst()
1392 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; in fl6_update_dst()
1396 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt; in fl6_update_dst()