/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | connect4_dropper.c | 21 if (ctx->user_port == bpf_htons(60120)) in connect_v4_dropper()
|
H A D | test_sk_lookup_kern.c | 29 if (eth_proto == bpf_htons(ETH_P_IP)) { in get_tuple() 38 } else if (eth_proto == bpf_htons(ETH_P_IPV6)) { in get_tuple()
|
H A D | recvmsg4_prog.c | 35 ctx->user_port = bpf_htons(SERV4_PORT); in recvmsg4_prog()
|
H A D | bind6_prog.c | 126 ctx->user_port != bpf_htons(SERV6_PORT)) in bind_v6_prog() 171 ctx->user_port = bpf_htons(SERV6_REWRITE_PORT); in bind_v6_prog()
|
H A D | bind_perm.c | 27 if (ctx->user_port == bpf_htons(111)) in bind_prog()
|
H A D | xdping_kern.c | 70 if (eth->h_proto != bpf_htons(ETH_P_IP)) in icmp_check() 141 seq = bpf_htons(bpf_ntohs(icmph->un.echo.sequence) + 1); in xdping_client()
|
H A D | recvmsg6_prog.c | 41 ctx->user_port = bpf_htons(SERV6_PORT); in recvmsg6_prog()
|
H A D | sendmsg6_prog.c | 53 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in sendmsg_v6_prog()
|
H A D | test_cls_redirect_dynptr.c | 119 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK); in ipv4_is_fragment() 120 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0; in ipv4_is_fragment() 280 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally() 407 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta); in forward_with_gre() 409 encap_gre->gre.protocol = bpf_htons(proto); in forward_with_gre() 855 if (skb->protocol != bpf_htons(ETH_P_IP)) in cls_redirect()
|
H A D | test_cls_redirect.c | 209 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK); in ipv4_is_fragment() 210 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0; in ipv4_is_fragment() 387 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally() 518 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta); in forward_with_gre() 520 encap_gre->gre.protocol = bpf_htons(proto); in forward_with_gre() 944 if (skb->protocol != bpf_htons(ETH_P_IP)) { in cls_redirect()
|
H A D | test_tunnel_kern.c | 465 if (eth->h_proto != bpf_htons(ETH_P_IP)) in veth_set_outer_dst() 481 if (udph->dest != bpf_htons(VXLAN_UDP_PORT)) in veth_set_outer_dst() 614 gopt.opt_class = bpf_htons(0x102); /* Open Virtual Networking (OVN) */ in geneve_set_tunnel() 681 gopt.opt_class = bpf_htons(0x102); /* Open Virtual Networking (OVN) */ in ip6geneve_set_tunnel() 793 encap.dport = bpf_htons(5555); in ipip_gue_set_tunnel() 830 encap.dport = bpf_htons(5555); in ipip_fou_set_tunnel()
|
H A D | vrf_socket_lookup.c | 29 if (eth->h_proto != bpf_htons(ETH_P_IP)) in socket_lookup()
|
H A D | test_bpf_nf.c | 181 tuple->dst.u.all == bpf_htons(sport)) in nf_ct_test() 184 tuple->src.u.all == bpf_htons(dport)) in nf_ct_test()
|
H A D | cgroup_skb_sk_lookup_kern.c | 72 if (skb->protocol != bpf_htons(ETH_P_IPV6)) in ingress_lookup()
|
H A D | verifier_netfilter_ctx.c | 118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP; in with_valid_ctx_access_test6()
|
H A D | test_sock_fields.c | 263 return word[0] == bpf_htons(0xcafe); in sk_dst_port__load_word() 272 return half[0] == bpf_htons(0xcafe); in sk_dst_port__load_half()
|
H A D | xdpwall.c | 265 if (udp->dest != bpf_htons(6666)) in parse_gue_v6() 334 if (proto != bpf_htons(ETH_P_IPV6)) in edgewall()
|
H A D | test_lwt_seg6local.c | 363 uint16_t new_tag = bpf_htons(2442); in __pop_egr() 411 if (srh->tag != bpf_htons(2442)) in __inspect_t()
|
H A D | xdp_synproxy_kern.c | 442 if ((hdr->ipv4->frag_off & bpf_htons(IP_DF | IP_MF | IP_OFFSET)) != bpf_htons(IP_DF)) in tcp_lookup() 553 hdr->ipv4->tot_len = bpf_htons(sizeof(*hdr->ipv4) + hdr->tcp_len); in tcpv4_gen_synack() 574 hdr->ipv6->payload_len = bpf_htons(hdr->tcp_len); in tcpv6_gen_synack()
|
H A D | test_btf_skc_cls_ingress.c | 161 if (eth->h_proto != bpf_htons(ETH_P_IPV6)) in cls_ingress()
|
H A D | test_select_reuseport_kern.c | 83 if (data_check.eth_protocol == bpf_htons(ETH_P_IP)) { in _select_by_skb_data()
|
H A D | test_l4lb_noinline.c | 463 if (eth_proto == bpf_htons(ETH_P_IP)) in balancer_ingress() 465 else if (eth_proto == bpf_htons(ETH_P_IPV6)) in balancer_ingress()
|
/openbmc/linux/samples/bpf/ |
H A D | xdp_router_ipv4.bpf.c | 92 if (h_proto == bpf_htons(ETH_P_8021Q) || in xdp_router_ipv4_prog() 93 h_proto == bpf_htons(ETH_P_8021AD)) { in xdp_router_ipv4_prog()
|
H A D | test_cgrp2_tc.bpf.c | 42 if (eth->h_proto != bpf_htons(ETH_P_IPV6) || in handle_egress()
|
/openbmc/linux/tools/lib/bpf/ |
H A D | bpf_endian.h | 80 #define bpf_htons(x) \ macro
|