/net/ipv4/netfilter/ |
D | nf_reject_ipv4.c | 47 struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, in nf_reject_iphdr_put() 51 struct iphdr *niph, *oiph = ip_hdr(oldskb); in nf_reject_iphdr_put() 54 niph = (struct iphdr *)skb_put(nskb, sizeof(struct iphdr)); in nf_reject_iphdr_put() 56 niph->ihl = sizeof(struct iphdr) / 4; in nf_reject_iphdr_put() 75 struct iphdr *niph = ip_hdr(nskb); in nf_reject_ip_tcphdr_put() 107 const struct iphdr *oiph; in nf_send_reset() 108 struct iphdr *niph; in nf_send_reset() 121 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct tcphdr) + in nf_send_reset() 175 struct iphdr *iph = ip_hdr(skb_in); in nf_send_unreach()
|
D | nf_log_ipv4.c | 42 struct iphdr _iph; in dump_ipv4_packet() 43 const struct iphdr *ih; in dump_ipv4_packet() 80 ih->ihl * 4 > sizeof(struct iphdr)) { in dump_ipv4_packet() 82 unsigned char _opt[4 * 15 - sizeof(struct iphdr)]; in dump_ipv4_packet() 85 optsize = ih->ihl * 4 - sizeof(struct iphdr); in dump_ipv4_packet() 120 = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 122 = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 124 = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 127 = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 129 = 8 + sizeof(struct iphdr), in dump_ipv4_packet()
|
D | nf_nat_l3proto_ipv4.c | 84 struct iphdr *iph; in nf_nat_ipv4_manip_pkt() 113 struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff); in nf_nat_ipv4_csum_update() 131 const struct iphdr *iph = ip_hdr(skb); in nf_nat_ipv4_csum_recalc() 184 struct iphdr ip; in nf_nat_icmp_reply_translation() 365 if (skb->len < sizeof(struct iphdr) || in nf_nat_ipv4_out() 366 ip_hdrlen(skb) < sizeof(struct iphdr)) in nf_nat_ipv4_out() 405 if (skb->len < sizeof(struct iphdr) || in nf_nat_ipv4_local_fn() 406 ip_hdrlen(skb) < sizeof(struct iphdr)) in nf_nat_ipv4_local_fn()
|
D | nft_chain_route_ipv4.c | 33 const struct iphdr *iph; in nf_route_table_hook() 37 if (skb->len < sizeof(struct iphdr) || in nf_route_table_hook() 38 ip_hdrlen(skb) < sizeof(struct iphdr)) in nf_route_table_hook()
|
D | ipt_SYNPROXY.c | 20 static struct iphdr * 24 struct iphdr *iph; in synproxy_build_ip() 27 iph = (struct iphdr *)skb_put(skb, sizeof(*iph)); in synproxy_build_ip() 46 struct iphdr *niph, struct tcphdr *nth, in synproxy_send_tcp() 78 struct iphdr *iph, *niph; in synproxy_send_client_synack() 121 struct iphdr *iph, *niph; in synproxy_send_server_syn() 166 struct iphdr *iph, *niph; in synproxy_send_server_ack() 204 struct iphdr *iph, *niph; in synproxy_send_client_ack()
|
D | iptable_mangle.c | 46 const struct iphdr *iph; in ipt_mangle_out() 53 if (skb->len < sizeof(struct iphdr) || in ipt_mangle_out() 54 ip_hdrlen(skb) < sizeof(struct iphdr)) in ipt_mangle_out()
|
D | nf_conntrack_l3proto_ipv4.c | 39 ap = skb_header_pointer(skb, nhoff + offsetof(struct iphdr, saddr), in ipv4_pkt_to_tuple() 69 const struct iphdr *iph; in ipv4_get_l4proto() 70 struct iphdr _iph; in ipv4_get_l4proto() 158 if (skb->len < sizeof(struct iphdr) || in ipv4_conntrack_local() 159 ip_hdrlen(skb) < sizeof(struct iphdr)) in ipv4_conntrack_local()
|
/net/ipv4/ |
D | ah4.c | 78 static int ip_clear_mutable_options(const struct iphdr *iph, __be32 *daddr) in ip_clear_mutable_options() 81 int l = iph->ihl*4 - sizeof(struct iphdr); in ip_clear_mutable_options() 121 struct iphdr *iph; in ah_output_done() 125 struct iphdr *top_iph = ip_hdr(skb); in ah_output_done() 138 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done() 155 struct iphdr *iph, *top_iph; in ah_output() 198 memcpy(iph+1, top_iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output() 254 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output() 267 struct iphdr *work_iph; in ah_input_done() 313 struct iphdr *iph, *work_iph; in ah_input() [all …]
|
D | xfrm4_mode_beet.c | 22 struct iphdr *iph = ip_hdr(skb); in xfrm4_beet_make_header() 42 struct iphdr *top_iph; in xfrm4_beet_output() 55 offsetof(struct iphdr, protocol); in xfrm4_beet_output() 75 top_iph->ihl = sizeof(struct iphdr) / 4; in xfrm4_beet_output() 86 struct iphdr *iph; in xfrm4_beet_input()
|
D | ip_gre.c | 138 const struct iphdr *iph; in ipgre_err() 179 iph = (const struct iphdr *)(icmp_hdr(skb) + 1); in ipgre_err() 223 const struct iphdr *iph = (struct iphdr *)skb->data; in gre_err() 253 const struct iphdr *iph; in __ipgre_rcv() 341 const struct iphdr *tnl_params, in __gre_xmit() 413 + tunnel_hlen + sizeof(struct iphdr); in gre_fb_xmit() 467 const struct iphdr *tnl_params; in ipgre_xmit() 477 (tunnel->hlen + sizeof(struct iphdr)))) in ipgre_xmit() 480 tnl_params = (const struct iphdr *)skb->data; in ipgre_xmit() 485 skb_pull(skb, tunnel->hlen + sizeof(struct iphdr)); in ipgre_xmit() [all …]
|
D | xfrm4_mode_tunnel.c | 20 struct iphdr *inner_iph = ipip_hdr(skb); in ipip_ecn_decapsulate() 33 struct iphdr *top_iph; in xfrm4_mode_tunnel_output() 38 offsetof(struct iphdr, protocol); in xfrm4_mode_tunnel_output() 78 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in xfrm4_mode_tunnel_input()
|
D | ip_options.c | 49 memcpy(iph+sizeof(struct iphdr), opt->__data, opt->optlen); in ip_options_build() 107 dopt->rr = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 121 dopt->ts = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 185 dopt->srr = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 192 dopt->cipso = dopt->optlen+sizeof(struct iphdr); in __ip_options_echo() 212 unsigned char *optptr = skb_network_header(skb) + sizeof(struct iphdr); in ip_options_fragment() 271 iph = optptr - sizeof(struct iphdr); in ip_options_compile() 487 unsigned char *optptr = opt->__data+opt->srr-sizeof(struct iphdr); in ip_options_undo() 492 unsigned char *optptr = opt->__data+opt->rr-sizeof(struct iphdr); in ip_options_undo() 497 unsigned char *optptr = opt->__data+opt->ts-sizeof(struct iphdr); in ip_options_undo() [all …]
|
D | icmp.c | 449 const struct iphdr *iph = ip_hdr(skb); in icmp_multipath_hash_skb() 463 const struct iphdr *iph, in icmp_route_lookup() 572 struct iphdr *iph; in icmp_send() 719 room -= sizeof(struct iphdr) + icmp_param->replyopts.opt.opt.optlen; in icmp_send() 741 const struct iphdr *iph = (const struct iphdr *) skb->data; in icmp_socket_deliver() 777 const struct iphdr *iph; in icmp_unreach() 790 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in icmp_unreach() 794 iph = (const struct iphdr *)skb->data; in icmp_unreach() 890 if (skb->len < sizeof(struct iphdr)) { in icmp_redirect() 895 if (!pskb_may_pull(skb, sizeof(struct iphdr))) { in icmp_redirect() [all …]
|
D | netfilter.c | 22 const struct iphdr *iph = ip_hdr(skb); in ip_route_me_harder() 101 const struct iphdr *iph = ip_hdr(skb); in nf_ip_saveroute() 116 const struct iphdr *iph = ip_hdr(skb); in nf_ip_reroute() 130 const struct iphdr *iph = ip_hdr(skb); in nf_ip_checksum() 162 const struct iphdr *iph = ip_hdr(skb); in nf_ip_checksum_partial()
|
D | ip_vti.c | 56 const struct iphdr *iph = ip_hdr(skb); in vti_input() 80 XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr); in vti_rcv() 286 const struct iphdr *iph = (const struct iphdr *)skb->data; in vti4_err() 394 struct iphdr *iph = &tunnel->parms.iph; in vti_tunnel_init() 399 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); in vti_tunnel_init() 412 struct iphdr *iph = &tunnel->parms.iph; in vti_fb_tunnel_init() 555 [IFLA_VTI_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) }, 556 [IFLA_VTI_REMOTE] = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
|
D | xfrm4_input.c | 29 const struct iphdr *iph = ip_hdr(skb); in xfrm4_rcv_encap_finish() 43 struct iphdr *iph = ip_hdr(skb); in xfrm4_transport_finish() 73 struct iphdr *iph; in xfrm4_udp_encap_rcv()
|
D | ip_input.c | 265 const struct iphdr *iph; in ip_rcv_options() 282 opt->optlen = iph->ihl*4 - sizeof(struct iphdr); in ip_rcv_options() 313 const struct iphdr *iph = ip_hdr(skb); in ip_rcv_finish() 408 const struct iphdr *iph; in ip_rcv() 428 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in ip_rcv()
|
D | ip_tunnel.c | 312 const struct iphdr *iph; in ip_tunnel_bind_dev() 315 int t_hlen = tunnel->hlen + sizeof(struct iphdr); in ip_tunnel_bind_dev() 380 const struct iphdr *iph = ip_hdr(skb); in ip_tunnel_rcv() 503 const struct iphdr *inner_iph) in tnl_update_pmtu() 511 - sizeof(struct iphdr) - tunnel->hlen; in tnl_update_pmtu() 554 u32 headroom = sizeof(struct iphdr); in ip_md_tunnel_xmit() 557 const struct iphdr *inner_iph; in ip_md_tunnel_xmit() 569 inner_iph = (const struct iphdr *)skb_inner_network_header(skb); in ip_md_tunnel_xmit() 627 const struct iphdr *tnl_params, u8 protocol) in ip_tunnel_xmit() 630 const struct iphdr *inner_iph; in ip_tunnel_xmit() [all …]
|
D | xfrm4_mode_transport.c | 23 struct iphdr *iph = ip_hdr(skb); in xfrm4_transport_output() 28 offsetof(struct iphdr, protocol); in xfrm4_transport_output()
|
D | ipcomp.c | 30 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipcomp4_err() 131 x->props.header_len += sizeof(struct iphdr); in ipcomp4_init_state()
|
/net/netfilter/ |
D | xt_DSCP.c | 37 if (!skb_make_writable(skb, sizeof(struct iphdr))) in dscp_tg() 80 struct iphdr *iph = ip_hdr(skb); in tos_tg() 87 if (!skb_make_writable(skb, sizeof(struct iphdr))) in tos_tg() 107 if (!skb_make_writable(skb, sizeof(struct iphdr))) in tos_tg6()
|
/net/bridge/netfilter/ |
D | nft_reject_bridge.c | 41 struct iphdr *iph; in nft_bridge_iphdr_validate() 44 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in nft_bridge_iphdr_validate() 72 struct iphdr *niph; in nft_reject_br_send_v4_tcp_reset() 83 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct tcphdr) + in nft_reject_br_send_v4_tcp_reset() 107 struct iphdr *niph; in nft_reject_br_send_v4_unreach() 140 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct icmphdr) + in nft_reject_br_send_v4_unreach() 271 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct icmp6hdr) + in nft_reject_br_send_v6_unreach()
|
D | ebt_among.c | 73 const struct iphdr *ih; in get_ip_dst() 74 struct iphdr _iph; in get_ip_dst() 104 const struct iphdr *ih; in get_ip_src() 105 struct iphdr _iph; in get_ip_src()
|
/net/tipc/ |
D | udp_media.c | 316 struct iphdr *iphdr = ip_hdr(skb); in tipc_udp_rcast_disc() local 319 src.ipv4.s_addr = iphdr->saddr; in tipc_udp_rcast_disc() 320 if (ipv4_is_multicast(iphdr->daddr)) in tipc_udp_rcast_disc() 324 struct ipv6hdr *iphdr = ipv6_hdr(skb); in tipc_udp_rcast_disc() local 327 src.ipv6 = iphdr->saddr; in tipc_udp_rcast_disc() 328 if (ipv6_addr_is_multicast(&iphdr->daddr)) in tipc_udp_rcast_disc() 696 if (tipc_mtu_bad(dev, sizeof(struct iphdr) + in tipc_udp_enable() 701 b->mtu = dev->mtu - sizeof(struct iphdr) in tipc_udp_enable()
|
/net/batman-adv/ |
D | gateway_client.c | 589 struct iphdr *iphdr; in batadv_gw_dhcp_recipient_get() local 618 if (!pskb_may_pull(skb, *header_len + sizeof(*iphdr))) in batadv_gw_dhcp_recipient_get() 621 iphdr = (struct iphdr *)(skb->data + *header_len); in batadv_gw_dhcp_recipient_get() 622 *header_len += iphdr->ihl * 4; in batadv_gw_dhcp_recipient_get() 625 if (iphdr->protocol != IPPROTO_UDP) in batadv_gw_dhcp_recipient_get()
|