/net/ipv4/netfilter/ |
D | nf_reject_ipv4.c | 17 struct iphdr *iph; in nf_reject_iphdr_validate() 20 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in nf_reject_iphdr_validate() 46 struct iphdr *niph; in nf_reject_skb_v4_tcp_reset() 56 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct tcphdr) + in nf_reject_skb_v4_tcp_reset() 80 struct iphdr *niph; in nf_reject_skb_v4_unreach() 111 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct icmphdr) + in nf_reject_skb_v4_unreach() 168 struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, in nf_reject_iphdr_put() 172 struct iphdr *niph, *oiph = ip_hdr(oldskb); in nf_reject_iphdr_put() 175 niph = skb_put(nskb, sizeof(struct iphdr)); in nf_reject_iphdr_put() 177 niph->ihl = sizeof(struct iphdr) / 4; in nf_reject_iphdr_put() [all …]
|
D | nf_dup_ipv4.c | 26 const struct iphdr *iph = ip_hdr(skb); in nf_dup_ipv4_route() 53 struct iphdr *iph; in nf_dup_ipv4()
|
/net/ipv4/ |
D | ah4.c | 80 static int ip_clear_mutable_options(const struct iphdr *iph, __be32 *daddr) in ip_clear_mutable_options() 83 int l = iph->ihl*4 - sizeof(struct iphdr); in ip_clear_mutable_options() 123 struct iphdr *iph; in ah_output_done() 127 struct iphdr *top_iph = ip_hdr(skb); in ah_output_done() 140 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done() 157 struct iphdr *iph, *top_iph; in ah_output() 200 memcpy(iph+1, top_iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output() 256 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output() 269 struct iphdr *work_iph; in ah_input_done() 315 struct iphdr *iph, *work_iph; in ah_input() [all …]
|
D | ip_options.c | 50 memcpy(iph + sizeof(struct iphdr), opt->__data, opt->optlen); in ip_options_build() 95 dopt->rr = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 109 dopt->ts = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 170 dopt->srr = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 177 dopt->cipso = dopt->optlen+sizeof(struct iphdr); in __ip_options_echo() 197 unsigned char *optptr = skb_network_header(skb) + sizeof(struct iphdr); in ip_options_fragment() 257 iph = optptr - sizeof(struct iphdr); in __ip_options_compile() 485 unsigned char *optptr = opt->__data + opt->srr - sizeof(struct iphdr); in ip_options_undo() 491 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 | ip_tunnel.c | 283 const struct iphdr *iph; in ip_tunnel_bind_dev() 286 int t_hlen = tunnel->hlen + sizeof(struct iphdr); in ip_tunnel_bind_dev() 348 t_hlen = nt->hlen + sizeof(struct iphdr); in ip_tunnel_create() 364 const struct iphdr *iph = ip_hdr(skb); in ip_tunnel_md_udp_encap() 380 const struct iphdr *iph = ip_hdr(skb); in ip_tunnel_rcv() 420 iph = (struct iphdr *)(skb->head + nh); in ip_tunnel_rcv() 513 const struct iphdr *inner_iph, in tnl_update_pmtu() 525 mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen); in tnl_update_pmtu() 588 u32 headroom = sizeof(struct iphdr); in ip_md_tunnel_xmit() 591 const struct iphdr *inner_iph; in ip_md_tunnel_xmit() [all …]
|
D | icmp.c | 480 const struct iphdr *iph, in icmp_route_lookup() 591 struct iphdr *iph; in __icmp_send() 751 room -= sizeof(struct iphdr) + icmp_param.replyopts.opt.opt.optlen; in __icmp_send() 756 if (room <= (int)sizeof(struct iphdr)) in __icmp_send() 802 (skb_network_header(skb_in) + sizeof(struct iphdr)) > in icmp_ndo_send() 804 skb_network_offset(skb_in) + sizeof(struct iphdr)))) in icmp_ndo_send() 819 const struct iphdr *iph = (const struct iphdr *)skb->data; in icmp_socket_deliver() 856 const struct iphdr *iph; in icmp_unreach() 869 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in icmp_unreach() 873 iph = (const struct iphdr *)skb->data; in icmp_unreach() [all …]
|
D | ip_vti.c | 51 const struct iphdr *iph = ip_hdr(skb); in vti_input() 84 XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr); in vti_rcv() 322 const struct iphdr *iph = (const struct iphdr *)skb->data; in vti4_err() 426 struct iphdr *iph = &tunnel->parms.iph; in vti_tunnel_init() 442 struct iphdr *iph = &tunnel->parms.iph; in vti_fb_tunnel_init() 477 XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr); in vti_rcv_tunnel() 624 [IFLA_VTI_LOCAL] = { .len = sizeof_field(struct iphdr, saddr) }, 625 [IFLA_VTI_REMOTE] = { .len = sizeof_field(struct iphdr, daddr) },
|
D | ip_gre.c | 140 const struct iphdr *iph; in ipgre_err() 154 iph = (const struct iphdr *)(icmp_hdr(skb) + 1); in ipgre_err() 230 const struct iphdr *iph = (struct iphdr *)skb->data; in gre_err() 270 const struct iphdr *iph; in erspan_rcv() 360 const struct iphdr *iph; in __ipgre_rcv() 368 const struct iphdr *tnl_params; in __ipgre_rcv() 463 const struct iphdr *tnl_params, in __gre_xmit() 632 const struct iphdr *tnl_params; in ipgre_xmit() 643 int pull_len = tunnel->hlen + sizeof(struct iphdr); in ipgre_xmit() 648 tnl_params = (const struct iphdr *)skb->data; in ipgre_xmit() [all …]
|
D | xfrm4_input.c | 31 const struct iphdr *iph = ip_hdr(skb); in xfrm4_rcv_encap_finish() 50 struct iphdr *iph = ip_hdr(skb); in xfrm4_transport_finish() 90 struct iphdr *iph; in xfrm4_udp_encap_rcv()
|
D | ip_input.c | 263 const struct iphdr *iph; in ip_rcv_options() 279 opt->optlen = iph->ihl*4 - sizeof(struct iphdr); in ip_rcv_options() 308 static bool ip_can_use_hint(const struct sk_buff *skb, const struct iphdr *iph, in ip_can_use_hint() 321 const struct iphdr *iph = ip_hdr(skb); in ip_rcv_finish_core() 458 const struct iphdr *iph; in ip_rcv_core() 480 if (!pskb_may_pull(skb, sizeof(struct iphdr))) in ip_rcv_core()
|
D | ip_output.c | 93 void ip_send_check(struct iphdr *iph) in ip_send_check() 102 struct iphdr *iph = ip_hdr(skb); in __ip_local_out() 156 struct iphdr *iph; in ip_build_and_send_pkt() 159 skb_push(skb, sizeof(struct iphdr) + (opt ? opt->opt.optlen : 0)); in ip_build_and_send_pkt() 446 static void ip_copy_addrs(struct iphdr *iph, const struct flowi4 *fl4) in ip_copy_addrs() 464 struct iphdr *iph; in __ip_queue_xmit() 509 skb_push(skb, sizeof(struct iphdr) + (inet_opt ? inet_opt->opt.optlen : 0)); in __ip_queue_xmit() 581 struct iphdr *iph = ip_hdr(skb); in ip_fragment() 599 void ip_fraglist_init(struct sk_buff *skb, struct iphdr *iph, in ip_fraglist_init() 622 struct iphdr *iph = iter->iph; in ip_fraglist_prepare() [all …]
|
D | ipcomp.c | 26 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipcomp4_err() 130 x->props.header_len += sizeof(struct iphdr); in ipcomp4_init_state()
|
D | ipmr.c | 535 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 8; in reg_vif_setup() 583 struct iphdr *encap; in __pim_rcv() 586 encap = (struct iphdr *)(skb_transport_header(skb) + pimlen); in __pim_rcv() 731 sizeof(struct iphdr)); in ipmr_destroy_unres() 990 sizeof(struct iphdr)); in ipmr_cache_resolve() 1033 skb = skb_realloc_headroom(pkt, sizeof(struct iphdr)); in ipmr_cache_report() 1046 skb_push(skb, sizeof(struct iphdr)); in ipmr_cache_report() 1050 memcpy(msg, skb_network_header(pkt), sizeof(struct iphdr)); in ipmr_cache_report() 1063 ip_hdr(skb)->ihl = sizeof(struct iphdr) >> 2; in ipmr_cache_report() 1065 sizeof(struct iphdr)); in ipmr_cache_report() [all …]
|
D | route.c | 484 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) in __ip_select_ident() 512 const struct sock *sk, const struct iphdr *iph, in __build_flow_key() 536 const struct iphdr *iph = ip_hdr(skb); in build_skb_flow_key() 811 const struct iphdr *iph = (const struct iphdr *) skb->data; in __ip_do_redirect() 828 const struct iphdr *iph = (const struct iphdr *) skb->data; in ip_do_redirect() 1068 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipv4_update_pmtu() 1085 const struct iphdr *iph = (const struct iphdr *)skb->data; in __ipv4_sk_update_pmtu() 1103 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipv4_sk_update_pmtu() 1158 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipv4_redirect() 1173 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipv4_sk_redirect() [all …]
|
/net/netfilter/ |
D | xt_DSCP.c | 36 if (skb_ensure_writable(skb, sizeof(struct iphdr))) in dscp_tg() 75 struct iphdr *iph = ip_hdr(skb); in tos_tg() 82 if (skb_ensure_writable(skb, sizeof(struct iphdr))) in tos_tg() 102 if (skb_ensure_writable(skb, sizeof(struct iphdr))) in tos_tg6()
|
D | nf_log_syslog.c | 303 const struct iphdr *ih; in dump_ipv4_packet() 305 struct iphdr _iph; in dump_ipv4_packet() 342 ih->ihl * 4 > sizeof(struct iphdr)) { in dump_ipv4_packet() 343 unsigned char _opt[4 * 15 - sizeof(struct iphdr)]; in dump_ipv4_packet() 347 optsize = ih->ihl * 4 - sizeof(struct iphdr); in dump_ipv4_packet() 379 [ICMP_DEST_UNREACH] = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 380 [ICMP_SOURCE_QUENCH] = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 381 [ICMP_REDIRECT] = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 383 [ICMP_TIME_EXCEEDED] = 8 + sizeof(struct iphdr), in dump_ipv4_packet() 384 [ICMP_PARAMETERPROB] = 8 + sizeof(struct iphdr), in dump_ipv4_packet() [all …]
|
D | nf_flow_table_ip.c | 62 static void nf_flow_nat_ip_l4proto(struct sk_buff *skb, struct iphdr *iph, in nf_flow_nat_ip_l4proto() 77 struct sk_buff *skb, struct iphdr *iph, in nf_flow_snat_ip() 100 struct sk_buff *skb, struct iphdr *iph, in nf_flow_dnat_ip() 124 struct iphdr *iph) in nf_flow_nat_ip() 138 return thoff != sizeof(struct iphdr); in ip_has_options() 178 struct iphdr *iph; in nf_flow_tuple_ip() 184 iph = (struct iphdr *)(skb_network_header(skb) + ctx->offset); in nf_flow_tuple_ip() 233 iph = (struct iphdr *)(skb_network_header(skb) + ctx->offset); in nf_flow_tuple_ip() 374 struct iphdr *iph; in nf_flow_offload_forward() 383 iph = (struct iphdr *)(skb_network_header(skb) + ctx->offset); in nf_flow_offload_forward()
|
D | nfnetlink_osf.c | 35 const struct iphdr *ip = ip_hdr(skb); in nf_osf_ttl() 167 const struct iphdr *ip, in nf_osf_hdr_ctx_init() 202 const struct iphdr *ip = ip_hdr(skb); in nf_osf_match() 265 const struct iphdr *ip = ip_hdr(skb); in nf_osf_find()
|
/net/batman-adv/ |
D | gateway_client.c | 567 struct iphdr *iphdr; in batadv_gw_dhcp_recipient_get() local 596 if (!pskb_may_pull(skb, *header_len + sizeof(*iphdr))) in batadv_gw_dhcp_recipient_get() 599 iphdr = (struct iphdr *)(skb->data + *header_len); in batadv_gw_dhcp_recipient_get() 600 *header_len += iphdr->ihl * 4; in batadv_gw_dhcp_recipient_get() 603 if (iphdr->protocol != IPPROTO_UDP) in batadv_gw_dhcp_recipient_get()
|
/net/bridge/netfilter/ |
D | ebt_among.c | 74 const struct iphdr *ih; in get_ip_dst() 75 struct iphdr _iph; in get_ip_dst() 105 const struct iphdr *ih; in get_ip_src() 106 struct iphdr _iph; in get_ip_src()
|
/net/tipc/ |
D | udp_media.c | 346 struct iphdr *iphdr = ip_hdr(skb); in tipc_udp_rcast_disc() local 349 src.ipv4.s_addr = iphdr->saddr; in tipc_udp_rcast_disc() 350 if (ipv4_is_multicast(iphdr->daddr)) in tipc_udp_rcast_disc() 354 struct ipv6hdr *iphdr = ipv6_hdr(skb); in tipc_udp_rcast_disc() local 357 src.ipv6 = iphdr->saddr; in tipc_udp_rcast_disc() 358 if (ipv6_addr_is_multicast(&iphdr->daddr)) in tipc_udp_rcast_disc() 744 b->encap_hlen = sizeof(struct iphdr) + sizeof(struct udphdr); in tipc_udp_enable()
|
/net/core/ |
D | lwt_bpf.c | 92 struct iphdr *iph = ip_hdr(skb); in bpf_lwt_input_reroute() 200 struct iphdr *iph = ip_hdr(skb); in bpf_lwt_xmit_reroute() 550 next_hdr_offset = sizeof(struct iphdr); in handle_gso_encap() 593 struct iphdr *iph; in bpf_lwt_push_ip_encap() 597 if (unlikely(len < sizeof(struct iphdr) || len > LWT_BPF_MAX_HEADROOM)) in bpf_lwt_push_ip_encap() 601 iph = (struct iphdr *)hdr; in bpf_lwt_push_ip_encap()
|
D | selftests.c | 49 #define NET_TEST_PKT_SIZE (sizeof(struct ethhdr) + sizeof(struct iphdr) + \ 62 struct iphdr *ihdr; in net_test_get_skb() 182 struct iphdr *ihdr; in net_test_loopback_validate() 206 ihdr = (struct iphdr *)(skb_network_header(skb) + 4); in net_test_loopback_validate()
|
/net/dccp/ |
D | ipv4.c | 158 const struct iphdr *iph, in dccp_do_pmtu_discovery() 246 const struct iphdr *iph = (struct iphdr *)skb->data; in dccp_v4_err() 262 iph = (struct iphdr *)skb->data; in dccp_v4_err() 470 const struct iphdr *iph = ip_hdr(skb); in dccp_v4_route_skb() 527 const struct iphdr *rxiph; in dccp_v4_ctl_send_reset() 798 const struct iphdr *iph; in dccp_v4_rcv() 934 .net_header_len = sizeof(struct iphdr),
|
/net/xfrm/ |
D | xfrm_inout.h | 11 const struct iphdr *iph = ip_hdr(skb); in xfrm4_extract_header() 57 struct iphdr *iph = ip_hdr(skb); in xfrm4_beet_make_header()
|