Lines Matching full:opt
231 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_dest_hao() local
236 if (opt->dsthao) { in ipv6_dest_hao()
240 opt->dsthao = opt->dst1; in ipv6_dest_hao()
241 opt->dst1 = 0; in ipv6_dest_hao()
295 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
317 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
319 dstbuf = opt->dst1; in ipv6_destopt_rcv()
324 opt = IP6CB(skb); in ipv6_destopt_rcv()
326 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
328 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
368 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_srh_rcv() local
417 opt->srcrt = skb_network_header_len(skb); in ipv6_srh_rcv()
418 opt->lastopt = opt->srcrt; in ipv6_srh_rcv()
420 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv()
483 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rpl_srh_rcv() local
527 opt->srcrt = skb_network_header_len(skb); in ipv6_rpl_srh_rcv()
528 opt->lastopt = opt->srcrt; in ipv6_rpl_srh_rcv()
530 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rpl_srh_rcv()
649 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_rthdr_rcv() local
708 opt->lastopt = opt->srcrt = skb_network_header_len(skb); in ipv6_rthdr_rcv()
710 opt->dst0 = opt->dst1; in ipv6_rthdr_rcv()
711 opt->dst1 = 0; in ipv6_rthdr_rcv()
712 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv()
969 net_dbg_ratelimited("ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n", in ipv6_hop_jumbo()
1027 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_parse_hopopts() local
1049 opt->flags |= IP6SKB_HOPBYHOP; in ipv6_parse_hopopts()
1052 opt = IP6CB(skb); in ipv6_parse_hopopts()
1053 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
1070 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr0() argument
1076 ihdr = (struct rt0_hdr *) opt; in ipv6_push_rthdr0()
1095 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr4() argument
1101 sr_ihdr = (struct ipv6_sr_hdr *)opt; in ipv6_push_rthdr4()
1144 struct ipv6_rt_hdr *opt, in ipv6_push_rthdr() argument
1147 switch (opt->type) { in ipv6_push_rthdr()
1151 ipv6_push_rthdr0(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
1154 ipv6_push_rthdr4(skb, proto, opt, addr_p, saddr); in ipv6_push_rthdr()
1161 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt) in ipv6_push_exthdr() argument
1163 struct ipv6_opt_hdr *h = skb_push(skb, ipv6_optlen(opt)); in ipv6_push_exthdr()
1165 memcpy(h, opt, ipv6_optlen(opt)); in ipv6_push_exthdr()
1170 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, in ipv6_push_nfrag_opts() argument
1174 if (opt->srcrt) { in ipv6_push_nfrag_opts()
1175 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr, saddr); in ipv6_push_nfrag_opts()
1180 if (opt->dst0opt) in ipv6_push_nfrag_opts()
1181 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt); in ipv6_push_nfrag_opts()
1183 if (opt->hopopt) in ipv6_push_nfrag_opts()
1184 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt); in ipv6_push_nfrag_opts()
1187 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto) in ipv6_push_frag_opts() argument
1189 if (opt->dst1opt) in ipv6_push_frag_opts()
1190 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt); in ipv6_push_frag_opts()
1195 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) in ipv6_dup_options() argument
1199 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1201 long dif = (char *)opt2 - (char *)opt; in ipv6_dup_options()
1202 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1238 * @opt: original options
1239 * @newtype: option type to replace in @opt
1242 * Returns a new set of options which is a copy of @opt with the
1245 * @opt may be NULL, in which case a new set of options is returned
1255 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, in ipv6_renew_options() argument
1262 if (opt) { in ipv6_renew_options()
1263 if (newtype != IPV6_HOPOPTS && opt->hopopt) in ipv6_renew_options()
1264 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options()
1265 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt) in ipv6_renew_options()
1266 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options()
1267 if (newtype != IPV6_RTHDR && opt->srcrt) in ipv6_renew_options()
1268 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options()
1269 if (newtype != IPV6_DSTOPTS && opt->dst1opt) in ipv6_renew_options()
1270 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options()
1290 (opt ? opt->hopopt : NULL), in ipv6_renew_options()
1293 (opt ? opt->dst0opt : NULL), in ipv6_renew_options()
1297 (opt ? (struct ipv6_opt_hdr *)opt->srcrt : NULL), in ipv6_renew_options()
1300 (opt ? opt->dst1opt : NULL), in ipv6_renew_options()
1312 struct ipv6_txoptions *opt) in __ipv6_fixup_options()
1318 if (opt->dst0opt && !opt->srcrt) { in __ipv6_fixup_options()
1319 if (opt_space != opt) { in __ipv6_fixup_options()
1320 memcpy(opt_space, opt, sizeof(*opt_space)); in __ipv6_fixup_options()
1321 opt = opt_space; in __ipv6_fixup_options()
1323 opt->opt_nflen -= ipv6_optlen(opt->dst0opt); in __ipv6_fixup_options()
1324 opt->dst0opt = NULL; in __ipv6_fixup_options()
1327 return opt; in __ipv6_fixup_options()
1336 * @opt: struct ipv6_txoptions in which to look for srcrt opt
1343 const struct ipv6_txoptions *opt, in fl6_update_dst() argument
1346 if (!opt || !opt->srcrt) in fl6_update_dst()
1351 switch (opt->srcrt->type) { in fl6_update_dst()
1355 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; in fl6_update_dst()
1359 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt; in fl6_update_dst()