/kernel/linux/linux-6.6/tools/testing/selftests/net/ |
H A D | psock_snd.c | 80 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_vnet_header() 84 vh->csum_start = ETH_HLEN + sizeof(struct iphdr); in build_vnet_header() 95 vh->gso_size = cfg_mtu - sizeof(struct iphdr); in build_vnet_header() 119 struct iphdr *iph = header; in build_ipv4_header()
|
/kernel/linux/linux-6.6/net/bridge/netfilter/ |
H A 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()
|
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | sockex3_kern.c | 44 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment() 171 ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in bpf_func_ip() 174 g->flow.src = load_word(skb, nhoff + offsetof(struct iphdr, saddr)); in bpf_func_ip() 175 g->flow.dst = load_word(skb, nhoff + offsetof(struct iphdr, daddr)); in bpf_func_ip() 178 verlen = load_byte(skb, nhoff + 0/*offsetof(struct iphdr, ihl)*/); in bpf_func_ip()
|
/kernel/linux/linux-5.10/net/ipv4/ |
H A D | ip_gre.c | 138 const struct iphdr *iph; in ipgre_err() 152 iph = (const struct iphdr *)(icmp_hdr(skb) + 1); in ipgre_err() 228 const struct iphdr *iph = (struct iphdr *)skb->data; in gre_err() 268 const struct iphdr *iph; in erspan_rcv() 353 const struct iphdr *iph; in __ipgre_rcv() 361 const struct iphdr *tnl_params; in __ipgre_rcv() 453 const struct iphdr *tnl_params, in __gre_xmit() 621 const struct iphdr *tnl_params; in ipgre_xmit() 632 int pull_len = tunnel->hlen + sizeof(struct iphdr); in ipgre_xmit() [all...] |
H A D | ipcomp.c | 26 const struct iphdr *iph = (const struct iphdr *)skb->data; in ipcomp4_err() 128 x->props.header_len += sizeof(struct iphdr); in ipcomp4_init_state()
|
H A 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() 366 const struct iphdr *iph = ip_hdr(skb); in ip_tunnel_rcv() 406 iph = (struct iphdr *)(skb->head + nh); in ip_tunnel_rcv() 499 const struct iphdr *inner_iph, in tnl_update_pmtu() 511 mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen); in tnl_update_pmtu() 574 u32 headroom = sizeof(struct iphdr); in ip_md_tunnel_xmit() 577 const struct iphdr *inner_iph; in ip_md_tunnel_xmit() 590 inner_iph = (const struct iphdr *)skb_inner_network_heade in ip_md_tunnel_xmit() [all...] |
/kernel/linux/linux-6.6/net/ipv4/ |
H A 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() 355 const struct iphdr *iph; in __ipgre_rcv() 363 const struct iphdr *tnl_params; in __ipgre_rcv() 458 const struct iphdr *tnl_params, in __gre_xmit() 627 const struct iphdr *tnl_params; in ipgre_xmit() 638 int pull_len = tunnel->hlen + sizeof(struct iphdr); in ipgre_xmit() [all...] |
H A 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_ip in ip_md_tunnel_xmit() [all...] |
H A 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()
|
/kernel/linux/linux-5.10/net/netfilter/ |
H A D | utils.c | 13 const struct iphdr *iph = ip_hdr(skb); in nf_ip_checksum() 47 const struct iphdr *iph = ip_hdr(skb); in nf_ip_checksum_partial() 188 const struct iphdr *iph = ip_hdr(skb); in nf_ip_reroute()
|
/kernel/linux/linux-5.10/include/net/ |
H A D | ip_tunnels.h | 269 const struct iphdr *tnl_params, const u8 protocol); 327 nhlen = sizeof(struct iphdr); in pskb_inet_may_pull() 378 static inline u8 ip_tunnel_get_dsfield(const struct iphdr *iph, in ip_tunnel_get_dsfield() 391 static inline u8 ip_tunnel_get_ttl(const struct iphdr *iph, in ip_tunnel_get_ttl() 405 static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph, in ip_tunnel_ecn_encap()
|
/kernel/linux/linux-6.6/include/net/ |
H A D | ip_tunnels.h | 290 const struct iphdr *tnl_params, const u8 protocol); 354 nhlen = sizeof(struct iphdr); in pskb_inet_may_pull() 406 static inline u8 ip_tunnel_get_dsfield(const struct iphdr *iph, in ip_tunnel_get_dsfield() 419 static inline u8 ip_tunnel_get_ttl(const struct iphdr *iph, in ip_tunnel_get_ttl() 433 static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph, in ip_tunnel_ecn_encap()
|
H A D | ip.h | 175 struct iphdr *iph; 180 void ip_fraglist_init(struct sk_buff *skb, struct iphdr *iph, 210 void ip_send_check(struct iphdr *ip); 399 static inline bool ip_is_fragment(const struct iphdr *iph) in ip_is_fragment() 410 int ip_decrease_ttl(struct iphdr *iph) in ip_decrease_ttl() 531 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs); 536 struct iphdr *iph = ip_hdr(skb); in ip_select_ident_segs() 582 const struct iphdr *iph) in iph_to_flow_copy_v4addrs()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_l4lb_noinline_dynptr.c | 262 __u8 buffer_icmp[sizeof(struct iphdr)] = {}; in parse_icmp() 263 __u8 buffer_ip[sizeof(struct iphdr)] = {}; in parse_icmp() 265 struct iphdr *iph; in parse_icmp() 341 struct iphdr *iph; in process_packet() 375 __u8 buffer[sizeof(struct iphdr)] = {}; in process_packet()
|
H A D | test_tunnel_kern.c | 456 struct iphdr *iph; in veth_set_outer_dst() 468 iph = (struct iphdr *)(eth + 1); in veth_set_outer_dst() 487 if (bpf_skb_store_bytes(skb, ETH_HLEN + offsetof(struct iphdr, daddr), in veth_set_outer_dst() 492 if (bpf_l3_csum_replace(skb, ETH_HLEN + offsetof(struct iphdr, check), in veth_set_outer_dst() 727 struct iphdr *iph = data; in ipip_set_tunnel() 773 struct iphdr *iph = data; in ipip_gue_set_tunnel() 810 struct iphdr *iph = data; in ipip_fou_set_tunnel() 874 struct iphdr *iph = data; in ipip6_set_tunnel()
|
/kernel/linux/linux-5.10/net/tipc/ |
H A D | udp_media.c | 337 struct iphdr *iphdr = ip_hdr(skb); in tipc_udp_rcast_disc() local 340 src.ipv4.s_addr = iphdr->saddr; in tipc_udp_rcast_disc() 341 if (ipv4_is_multicast(iphdr->daddr)) in tipc_udp_rcast_disc() 345 struct ipv6hdr *iphdr = ipv6_hdr(skb); in tipc_udp_rcast_disc() local 348 src.ipv6 = iphdr->saddr; in tipc_udp_rcast_disc() 349 if (ipv6_addr_is_multicast(&iphdr->daddr)) in tipc_udp_rcast_disc() 733 b->encap_hlen = sizeof(struct iphdr) + sizeof(struct udphdr); in tipc_udp_enable()
|
/kernel/linux/linux-5.10/net/dccp/ |
H A D | ipv4.c | 146 const struct iphdr *iph, in dccp_do_pmtu_discovery() 234 const struct iphdr *iph = (struct iphdr *)skb->data; in dccp_v4_err() 251 iph = (struct iphdr *)skb->data; in dccp_v4_err() 458 const struct iphdr *iph = ip_hdr(skb); in dccp_v4_route_skb() 514 const struct iphdr *rxiph; in dccp_v4_ctl_send_reset() 779 const struct iphdr *iph; in dccp_v4_rcv() 915 .net_header_len = sizeof(struct iphdr),
|
/kernel/linux/linux-6.6/net/tipc/ |
H A D | udp_media.c | 343 struct iphdr *iphdr = ip_hdr(skb); in tipc_udp_rcast_disc() local 346 src.ipv4.s_addr = iphdr->saddr; in tipc_udp_rcast_disc() 347 if (ipv4_is_multicast(iphdr->daddr)) in tipc_udp_rcast_disc() 351 struct ipv6hdr *iphdr = ipv6_hdr(skb); in tipc_udp_rcast_disc() local 354 src.ipv6 = iphdr->saddr; in tipc_udp_rcast_disc() 355 if (ipv6_addr_is_multicast(&iphdr->daddr)) in tipc_udp_rcast_disc() 741 b->encap_hlen = sizeof(struct iphdr) + sizeof(struct udphdr); in tipc_udp_enable()
|
/kernel/linux/linux-6.6/net/dccp/ |
H A 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() 795 const struct iphdr *iph; in dccp_v4_rcv() 931 .net_header_len = sizeof(struct iphdr),
|
/kernel/linux/linux-6.6/drivers/net/ |
H A D | amt.c | 519 struct iphdr *iph; in amt_build_igmp_gq() 541 iph->ihl = (sizeof(struct iphdr) + AMT_IPHDR_OPTS) >> 2; in amt_build_igmp_gq() 618 struct iphdr *iph; in amt_send_discovery() 679 iph->ihl = (sizeof(struct iphdr)) >> 2; in amt_send_discovery() 707 struct iphdr *iph; in amt_send_request() 770 iph->ihl = (sizeof(struct iphdr)) >> 2; in amt_send_request() 1002 struct iphdr *iph; in amt_send_membership_update() 1062 struct iphdr *iph; in amt_send_multicast_data() 1125 sizeof(struct iphdr) + sizeof(struct udphdr)); in amt_send_membership_query() 1182 struct iphdr *ip in amt_dev_xmit() [all...] |
/kernel/linux/linux-5.10/drivers/net/slip/ |
H A D | slhc.c | 238 struct iphdr *ip; in slhc_compress() 247 if(isize<sizeof(struct iphdr)) in slhc_compress() 250 ip = (struct iphdr *) icp; in slhc_compress() 498 struct iphdr *ip; in slhc_uncompress() 626 &((struct iphdr *)icp)->check); in slhc_uncompress() 682 memcpy(cs->cs_ipopt, icp + sizeof(struct iphdr), (ihl - 5) * 4); in slhc_remember()
|
/kernel/linux/linux-5.10/net/core/ |
H A D | lwt_bpf.c | 91 struct iphdr *iph = ip_hdr(skb); in bpf_lwt_input_reroute() 199 struct iphdr *iph = ip_hdr(skb); in bpf_lwt_xmit_reroute() 549 next_hdr_offset = sizeof(struct iphdr); in handle_gso_encap() 592 struct iphdr *iph; in bpf_lwt_push_ip_encap() 596 if (unlikely(len < sizeof(struct iphdr) || len > LWT_BPF_MAX_HEADROOM)) in bpf_lwt_push_ip_encap() 600 iph = (struct iphdr *)hdr; in bpf_lwt_push_ip_encap()
|
/kernel/linux/linux-6.6/drivers/net/slip/ |
H A D | slhc.c | 238 struct iphdr *ip; in slhc_compress() 247 if(isize<sizeof(struct iphdr)) in slhc_compress() 250 ip = (struct iphdr *) icp; in slhc_compress() 498 struct iphdr *ip; in slhc_uncompress() 626 &((struct iphdr *)icp)->check); in slhc_uncompress() 682 memcpy(cs->cs_ipopt, icp + sizeof(struct iphdr), (ihl - 5) * 4); in slhc_remember()
|
/kernel/linux/linux-6.6/net/core/ |
H A 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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_pkt_access.c | 114 struct iphdr *iph = (struct iphdr *)(eth + 1); in test_pkt_access()
|