Home
last modified time | relevance | path

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

/linux/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_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/drivers/net/ipvlan/
H A Dipvlan_core.c155 struct iphdr *ip4h; in ipvlan_get_L3_hdr() local
157 if (unlikely(!pskb_may_pull(skb, sizeof(*ip4h)))) in ipvlan_get_L3_hdr()
160 ip4h = ip_hdr(skb); in ipvlan_get_L3_hdr()
162 if (ip4h->ihl < 5 || ip4h->version != 4) in ipvlan_get_L3_hdr()
164 if (skb->len < pktlen || pktlen < (ip4h->ihl * 4)) in ipvlan_get_L3_hdr()
168 lyr3h = ip4h; in ipvlan_get_L3_hdr()
386 struct iphdr *ip4h; in ipvlan_addr_lookup() local
389 ip4h = (struct iphdr *)lyr3h; in ipvlan_addr_lookup()
390 i4addr = use_dest ? &ip4h->daddr : &ip4h->saddr; in ipvlan_addr_lookup()
420 const struct iphdr *ip4h; in ipvlan_process_v4_outbound() local
[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/drivers/infiniband/core/
H A Dverbs.c631 const struct iphdr *ip4h = (struct iphdr *)&hdr->roce4grh; in ib_get_rdma_header_version() local
639 return (ip4h->version == 4) ? 4 : 0; in ib_get_rdma_header_version()
645 if (ip4h->ihl != 5) in ib_get_rdma_header_version()
652 memcpy(&ip4h_checked, ip4h, sizeof(ip4h_checked)); in ib_get_rdma_header_version()
656 if (ip4h->check == ip4h_checked.check) in ib_get_rdma_header_version()
/linux/net/core/
H A Dfilter.c2369 const struct iphdr *ip4h = ip_hdr(skb); in __bpf_redirect_neigh_v4() local
2377 .flowi4_dscp = ip4h_dscp(ip4h), in __bpf_redirect_neigh_v4()
2379 .flowi4_proto = ip4h->protocol, in __bpf_redirect_neigh_v4()
2380 .daddr = ip4h->daddr, in __bpf_redirect_neigh_v4()
2381 .saddr = ip4h->saddr, in __bpf_redirect_neigh_v4()