Home
last modified time | relevance | path

Searched refs:ip4h (Results 1 – 13 of 13) sorted by relevance

/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dtest_tc_neigh_fib.c29 struct iphdr *ip4h; in fill_fib_params_v4() local
34 ip4h = (struct iphdr *)(data + sizeof(struct ethhdr)); in fill_fib_params_v4()
35 if ((void *)(ip4h + 1) > data_end) in fill_fib_params_v4()
39 fib_params->tos = ip4h->tos; in fill_fib_params_v4()
40 fib_params->l4_protocol = ip4h->protocol; in fill_fib_params_v4()
43 fib_params->tot_len = bpf_ntohs(ip4h->tot_len); in fill_fib_params_v4()
44 fib_params->ipv4_src = ip4h->saddr; in fill_fib_params_v4()
45 fib_params->ipv4_dst = ip4h->daddr; in fill_fib_params_v4()
H A Dtest_btf_skc_cls_ingress.c73 struct iphdr *ip4h; in handle_ip_tcp() local
81 ip4h = (struct iphdr *)(eth + 1); in handle_ip_tcp()
82 if (ip4h + 1 > data_end) in handle_ip_tcp()
84 if (ip4h->protocol != IPPROTO_TCP) in handle_ip_tcp()
86 th = (struct tcphdr *)(ip4h + 1); in handle_ip_tcp()
93 tuple = (struct bpf_sock_tuple *)&ip4h->saddr; in handle_ip_tcp()
94 iphdr = ip4h; in handle_ip_tcp()
95 iphdr_size = sizeof(*ip4h); in handle_ip_tcp()
H A Dtest_tc_neigh.c44 struct iphdr *ip4h; in is_remote_ep_v4() local
49 ip4h = (struct iphdr *)(data + sizeof(struct ethhdr)); in is_remote_ep_v4()
50 if ((void *)(ip4h + 1) > data_end) in is_remote_ep_v4()
53 return ip4h->daddr == addr; in is_remote_ep_v4()
/linux-6.15/drivers/net/ethernet/qualcomm/rmnet/
H A Drmnet_map_data.c37 struct iphdr *ip4h = (struct iphdr *)skb->data; in rmnet_map_ipv4_dl_csum_trailer() local
38 void *txporthdr = skb->data + ip4h->ihl * 4; in rmnet_map_ipv4_dl_csum_trailer()
46 if (ip_fast_csum(ip4h, ip4h->ihl)) { in rmnet_map_ipv4_dl_csum_trailer()
52 if (ip_is_fragment(ip4h)) { in rmnet_map_ipv4_dl_csum_trailer()
58 csum_field = rmnet_map_get_csum_field(ip4h->protocol, txporthdr); in rmnet_map_ipv4_dl_csum_trailer()
65 if (!*csum_field && ip4h->protocol == IPPROTO_UDP) { in rmnet_map_ipv4_dl_csum_trailer()
93 pseudo_csum = csum_tcpudp_magic(ip4h->saddr, ip4h->daddr, in rmnet_map_ipv4_dl_csum_trailer()
94 ntohs(ip4h->tot_len) - ip4h->ihl * 4, in rmnet_map_ipv4_dl_csum_trailer()
95 ip4h->protocol, 0); in rmnet_map_ipv4_dl_csum_trailer()
172 txphdr = (void *)ip4h + ip4h->ihl * 4; in rmnet_map_complement_ipv4_txporthdr_csum_field()
[all …]
/linux-6.15/drivers/infiniband/sw/rxe/
H A Drxe_icrc.c37 struct iphdr *ip4h = NULL; in rxe_icrc_hdr() local
60 ip4h = (struct iphdr *)pshdr; in rxe_icrc_hdr()
61 udph = (struct udphdr *)(ip4h + 1); in rxe_icrc_hdr()
63 ip4h->ttl = 0xff; in rxe_icrc_hdr()
64 ip4h->check = CSUM_MANGLED_0; in rxe_icrc_hdr()
65 ip4h->tos = 0xff; in rxe_icrc_hdr()
/linux-6.15/drivers/net/ipvlan/
H A Dipvlan_core.c157 struct iphdr *ip4h; in ipvlan_get_L3_hdr() local
162 ip4h = ip_hdr(skb); in ipvlan_get_L3_hdr()
164 if (ip4h->ihl < 5 || ip4h->version != 4) in ipvlan_get_L3_hdr()
170 lyr3h = ip4h; in ipvlan_get_L3_hdr()
388 struct iphdr *ip4h; in ipvlan_addr_lookup() local
391 ip4h = (struct iphdr *)lyr3h; in ipvlan_addr_lookup()
392 i4addr = use_dest ? &ip4h->daddr : &ip4h->saddr; in ipvlan_addr_lookup()
422 const struct iphdr *ip4h; in ipvlan_process_v4_outbound() local
433 ip4h = ip_hdr(skb); in ipvlan_process_v4_outbound()
434 fl4.daddr = ip4h->daddr; in ipvlan_process_v4_outbound()
[all …]
H A Dipvlan_l3s.c53 const struct iphdr *ip4h = ip_hdr(skb); in ipvlan_l3_rcv() local
56 err = ip_route_input_noref(skb, ip4h->daddr, ip4h->saddr, in ipvlan_l3_rcv()
57 ip4h_dscp(ip4h), sdev); in ipvlan_l3_rcv()
/linux-6.15/drivers/net/
H A Dvrf.c495 struct iphdr *ip4h; in vrf_process_v4_outbound() local
504 ip4h = ip_hdr(skb); in vrf_process_v4_outbound()
510 fl4.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip4h)); in vrf_process_v4_outbound()
512 fl4.flowi4_proto = ip4h->protocol; in vrf_process_v4_outbound()
513 fl4.daddr = ip4h->daddr; in vrf_process_v4_outbound()
514 fl4.saddr = ip4h->saddr; in vrf_process_v4_outbound()
533 if (!ip4h->saddr) { in vrf_process_v4_outbound()
534 ip4h->saddr = inet_select_addr(skb_dst(skb)->dev, 0, in vrf_process_v4_outbound()
/linux-6.15/include/net/
H A Dip.h422 static inline dscp_t ip4h_dscp(const struct iphdr *ip4h) in ip4h_dscp() argument
424 return inet_dsfield_to_dscp(ip4h->tos); in ip4h_dscp()
/linux-6.15/drivers/infiniband/core/
H A Dverbs.c628 const struct iphdr *ip4h = (struct iphdr *)&hdr->roce4grh; in ib_get_rdma_header_version() local
636 return (ip4h->version == 4) ? 4 : 0; in ib_get_rdma_header_version()
642 if (ip4h->ihl != 5) in ib_get_rdma_header_version()
649 memcpy(&ip4h_checked, ip4h, sizeof(ip4h_checked)); in ib_get_rdma_header_version()
653 if (ip4h->check == ip4h_checked.check) in ib_get_rdma_header_version()
/linux-6.15/drivers/net/ethernet/marvell/
H A Dmvneta.c1963 struct iphdr *ip4h = ip_hdr(skb); in mvneta_skb_tx_csum() local
1966 ip_hdr_len = ip4h->ihl; in mvneta_skb_tx_csum()
1967 l4_proto = ip4h->protocol; in mvneta_skb_tx_csum()
/linux-6.15/net/core/
H A Dfilter.c2358 const struct iphdr *ip4h = ip_hdr(skb); in __bpf_redirect_neigh_v4() local
2366 .flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip4h)), in __bpf_redirect_neigh_v4()
2368 .flowi4_proto = ip4h->protocol, in __bpf_redirect_neigh_v4()
2369 .daddr = ip4h->daddr, in __bpf_redirect_neigh_v4()
2370 .saddr = ip4h->saddr, in __bpf_redirect_neigh_v4()
/linux-6.15/drivers/net/ethernet/marvell/mvpp2/
H A Dmvpp2_main.c3616 struct iphdr *ip4h = ip_hdr(skb); in mvpp2_skb_tx_csum() local
3619 ip_hdr_len = ip4h->ihl; in mvpp2_skb_tx_csum()
3620 l4_proto = ip4h->protocol; in mvpp2_skb_tx_csum()