Lines Matching refs:opt
145 __be32 saddr, __be32 daddr, struct ip_options_rcu *opt) in ip_build_and_send_pkt() argument
153 skb_push(skb, sizeof(struct iphdr) + (opt ? opt->opt.optlen : 0)); in ip_build_and_send_pkt()
160 iph->daddr = (opt && opt->opt.srr ? opt->opt.faddr : daddr); in ip_build_and_send_pkt()
171 if (opt && opt->opt.optlen) { in ip_build_and_send_pkt()
172 iph->ihl += opt->opt.optlen>>2; in ip_build_and_send_pkt()
173 ip_options_build(skb, &opt->opt, daddr, rt, 0); in ip_build_and_send_pkt()
481 if (inet_opt && inet_opt->opt.srr) in __ip_queue_xmit()
482 daddr = inet_opt->opt.faddr; in __ip_queue_xmit()
502 if (inet_opt && inet_opt->opt.is_strictroute && rt->rt_uses_gateway) in __ip_queue_xmit()
506 skb_push(skb, sizeof(struct iphdr) + (inet_opt ? inet_opt->opt.optlen : 0)); in __ip_queue_xmit()
520 if (inet_opt && inet_opt->opt.optlen) { in __ip_queue_xmit()
521 iph->ihl += inet_opt->opt.optlen >> 2; in __ip_queue_xmit()
522 ip_options_build(skb, &inet_opt->opt, inet->inet_daddr, rt, 0); in __ip_queue_xmit()
967 struct ip_options *opt = cork->opt; in __ip_append_data() local
993 fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0); in __ip_append_data()
999 mtu - (opt ? opt->optlen : 0)); in __ip_append_data()
1238 struct ip_options_rcu *opt; in ip_setup_cork() local
1248 opt = ipc->opt; in ip_setup_cork()
1249 if (opt) { in ip_setup_cork()
1250 if (!cork->opt) { in ip_setup_cork()
1251 cork->opt = kmalloc(sizeof(struct ip_options) + 40, in ip_setup_cork()
1253 if (unlikely(!cork->opt)) in ip_setup_cork()
1256 memcpy(cork->opt, &opt->opt, sizeof(struct ip_options) + opt->opt.optlen); in ip_setup_cork()
1328 struct ip_options *opt = NULL; in ip_append_page() local
1348 opt = cork->opt; in ip_append_page()
1356 fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0); in ip_append_page()
1362 mtu - (opt ? opt->optlen : 0)); in ip_append_page()
1455 kfree(cork->opt); in ip_cork_release()
1456 cork->opt = NULL; in ip_cork_release()
1474 struct ip_options *opt = NULL; in __ip_make_skb() local
1515 opt = cork->opt; in __ip_make_skb()
1534 if (opt) { in __ip_make_skb()
1535 iph->ihl += opt->optlen>>2; in __ip_make_skb()
1536 ip_options_build(skb, opt, cork->addr, rt, 0); in __ip_make_skb()
1623 cork->opt = NULL; in ip_make_skb()
1671 if (__ip_options_echo(net, &replyopts.opt.opt, skb, sopt)) in ip_send_unicast_reply()
1678 if (replyopts.opt.opt.optlen) { in ip_send_unicast_reply()
1679 ipc.opt = &replyopts.opt; in ip_send_unicast_reply()
1681 if (replyopts.opt.opt.srr) in ip_send_unicast_reply()
1682 daddr = replyopts.opt.opt.faddr; in ip_send_unicast_reply()