Searched refs:bpf_htons (Results 51 - 62 of 62) sorted by relevance

123

/linux-master/tools/testing/selftests/bpf/progs/
H A Dtest_lwt_seg6local.c365 uint16_t new_tag = bpf_htons(2442);
413 if (srh->tag != bpf_htons(2442))
H A Dtest_sock_fields.c266 return word[0] == bpf_htons(0xcafe);
275 return half[0] == bpf_htons(0xcafe);
H A Dtest_cls_redirect.c212 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK);
213 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0;
390 encap->eth.h_proto = bpf_htons(ETH_P_IPV6);
521 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta);
523 encap_gre->gre.protocol = bpf_htons(proto);
947 if (skb->protocol != bpf_htons(ETH_P_IP)) {
H A Dtest_cls_redirect_dynptr.c121 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK);
122 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0;
282 encap->eth.h_proto = bpf_htons(ETH_P_IPV6);
409 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta);
411 encap_gre->gre.protocol = bpf_htons(proto);
857 if (skb->protocol != bpf_htons(ETH_P_IP))
H A Dxdp_synproxy_kern.c444 if ((hdr->ipv4->frag_off & bpf_htons(IP_DF | IP_MF | IP_OFFSET)) != bpf_htons(IP_DF))
555 hdr->ipv4->tot_len = bpf_htons(sizeof(*hdr->ipv4) + hdr->tcp_len);
576 hdr->ipv6->payload_len = bpf_htons(hdr->tcp_len);
H A Dtest_l4lb.c464 if (eth_proto == bpf_htons(ETH_P_IP))
466 else if (eth_proto == bpf_htons(ETH_P_IPV6))
H A Dtest_l4lb_noinline.c463 if (eth_proto == bpf_htons(ETH_P_IP))
465 else if (eth_proto == bpf_htons(ETH_P_IPV6))
H A Dtest_l4lb_noinline_dynptr.c474 if (eth_proto == bpf_htons(ETH_P_IP))
476 else if (eth_proto == bpf_htons(ETH_P_IPV6))
H A Dtest_tcp_custom_syncookie.c433 ctx->ipv4->tot_len = bpf_htons((long)ctx->ptr32 - (long)ctx->ipv4);
447 ctx->ipv6->payload_len = bpf_htons((long)ctx->ptr32 - (long)ctx->tcp);
H A Dtest_xdp_noinline.c310 bpf_htons(pkt_bytes + sizeof(struct ipv6hdr));
365 iph->tot_len = bpf_htons(pkt_bytes + sizeof(struct iphdr));
H A Dtest_sk_lookup.c67 static const __u16 SRC_PORT = bpf_htons(8008);
/linux-master/samples/bpf/
H A Dtest_lwt_bpf.c171 ehdr.h_proto = bpf_htons(ETH_P_IP);

Completed in 309 milliseconds

123