Home
last modified time | relevance | path

Searched refs:bpf_htons (Results 26 – 50 of 55) sorted by relevance

123

/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dconnect4_dropper.c21 if (ctx->user_port == bpf_htons(60120)) in connect_v4_dropper()
H A Dtest_sk_lookup_kern.c29 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 Drecvmsg4_prog.c35 ctx->user_port = bpf_htons(SERV4_PORT); in recvmsg4_prog()
H A Dbind6_prog.c126 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 Dbind_perm.c27 if (ctx->user_port == bpf_htons(111)) in bind_prog()
H A Dxdping_kern.c70 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 Drecvmsg6_prog.c41 ctx->user_port = bpf_htons(SERV6_PORT); in recvmsg6_prog()
H A Dsendmsg6_prog.c53 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in sendmsg_v6_prog()
H A Dtest_cls_redirect_dynptr.c119 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 Dtest_cls_redirect.c209 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 Dtest_tunnel_kern.c465 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 Dvrf_socket_lookup.c29 if (eth->h_proto != bpf_htons(ETH_P_IP)) in socket_lookup()
H A Dtest_bpf_nf.c181 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 Dcgroup_skb_sk_lookup_kern.c72 if (skb->protocol != bpf_htons(ETH_P_IPV6)) in ingress_lookup()
H A Dverifier_netfilter_ctx.c118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP; in with_valid_ctx_access_test6()
H A Dtest_sock_fields.c263 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 Dxdpwall.c265 if (udp->dest != bpf_htons(6666)) in parse_gue_v6()
334 if (proto != bpf_htons(ETH_P_IPV6)) in edgewall()
H A Dtest_lwt_seg6local.c363 uint16_t new_tag = bpf_htons(2442); in __pop_egr()
411 if (srh->tag != bpf_htons(2442)) in __inspect_t()
H A Dxdp_synproxy_kern.c442 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 Dtest_btf_skc_cls_ingress.c161 if (eth->h_proto != bpf_htons(ETH_P_IPV6)) in cls_ingress()
H A Dtest_select_reuseport_kern.c83 if (data_check.eth_protocol == bpf_htons(ETH_P_IP)) { in _select_by_skb_data()
H A Dtest_l4lb_noinline.c463 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 Dxdp_router_ipv4.bpf.c92 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 Dtest_cgrp2_tc.bpf.c42 if (eth->h_proto != bpf_htons(ETH_P_IPV6) || in handle_egress()
/openbmc/linux/tools/lib/bpf/
H A Dbpf_endian.h80 #define bpf_htons(x) \ macro

123