Home
last modified time | relevance | path

Searched refs:bpf_ntohs (Results 1 – 17 of 17) sorted by relevance

/Linux-v5.10/tools/testing/selftests/bpf/progs/
Dbpf_iter_tcp4.c96 destp = bpf_ntohs(inet->inet_dport); in dump_tcp_sock()
97 srcp = bpf_ntohs(inet->inet_sport); in dump_tcp_sock()
159 destp = bpf_ntohs(tw->tw_dport); in dump_tw_sock()
160 srcp = bpf_ntohs(tw->tw_sport); in dump_tw_sock()
188 bpf_ntohs(irsk->ir_rmt_port)); in dump_req_sock()
Dtest_xdp_vlan.c76 pkt->vlan_outer = bpf_ntohs(vlan_hdr->h_vlan_TCI) in parse_eth_frame()
89 pkt->vlan_inner = bpf_ntohs(vlan_hdr->h_vlan_TCI) in parse_eth_frame()
95 pkt->l3_proto = bpf_ntohs(eth_type); /* Convert to host-byte-order */ in parse_eth_frame()
163 bpf_htons((bpf_ntohs(vlan_hdr->h_vlan_TCI) & 0xf000) in xdp_prognum1()
Dbpf_iter_tcp6.c96 destp = bpf_ntohs(inet->inet_dport); in dump_tcp6_sock()
97 srcp = bpf_ntohs(inet->inet_sport); in dump_tcp6_sock()
164 destp = bpf_ntohs(tw->tw_dport); in dump_tw_sock()
165 srcp = bpf_ntohs(tw->tw_sport); in dump_tw_sock()
204 bpf_ntohs(irsk->ir_rmt_port)); in dump_req_sock()
Dtest_tc_tunnel.c106 bpf_ntohs(iph6_inner.payload_len)); in encap_ipv4()
162 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + in encap_ipv4()
193 bpf_ntohs(h_outer.ip.tot_len)); in encap_ipv4()
269 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) + in encap_ipv6()
300 bpf_ntohs(h_outer.ip.payload_len)); in encap_ipv6()
462 switch (bpf_ntohs(greh.protocol)) { in decap_internal()
475 switch (bpf_ntohs(udph.dest)) { in decap_internal()
Dbpf_iter_udp4.c54 srcp = bpf_ntohs(inet->inet_sport); in dump_udp4()
55 destp = bpf_ntohs(inet->inet_dport); in dump_udp4()
Dbpf_iter_udp6.c56 srcp = bpf_ntohs(inet->inet_sport); in dump_udp6()
57 destp = bpf_ntohs(inet->inet_dport); in dump_udp6()
Dtest_tc_neigh_fib.c43 fib_params->tot_len = bpf_ntohs(ip4h->tot_len); in fill_fib_params_v4()
71 fib_params->tot_len = bpf_ntohs(ip6h->payload_len); in fill_fib_params_v6()
Dxdping_kern.c78 if (bpf_ntohs(iph->tot_len) - sizeof(*iph) != ICMP_ECHO_LEN) in icmp_check()
142 seq = bpf_htons(bpf_ntohs(icmph->un.echo.sequence) + 1); in xdping_client()
Dtest_xdp.c106 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4()
202 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
Dtest_xdp_loop.c102 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4()
198 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
Dtest_sock_fields.c143 if (sk->src_port == bpf_ntohs(srv_sa6.sin6_port)) { in egress_read_sock_fields()
231 sk->src_port != bpf_ntohs(srv_sa6.sin6_port)) in ingress_read_sock_fields()
Dtest_xdp_noinline.c326 __u32 ip_suffix = bpf_ntohs(pckt->flow.port16[0]); in encap_v4()
643 *pkt_bytes = bpf_ntohs(ip6h->payload_len); in process_l3_headers_v6()
675 *pkt_bytes = bpf_ntohs(iph->tot_len); in process_l3_headers_v4()
812 eth_proto = bpf_ntohs(eth->eth_proto); in balancer_ingress_v4()
831 eth_proto = bpf_ntohs(eth->eth_proto); in balancer_ingress_v6()
Dtest_tcp_check_syncookie_kern.c64 switch (bpf_ntohs(ethh->h_proto)) { in check_syncookie()
Dtest_l4lb.c357 pkt_bytes = bpf_ntohs(ip6h->payload_len); in process_packet()
379 pkt_bytes = bpf_ntohs(iph->tot_len); in process_packet()
Dtest_l4lb_noinline.c354 pkt_bytes = bpf_ntohs(ip6h->payload_len); in process_packet()
376 pkt_bytes = bpf_ntohs(iph->tot_len); in process_packet()
Dtest_cls_redirect.c511 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta); in forward_with_gre()
/Linux-v5.10/tools/lib/bpf/
Dbpf_endian.h83 #define bpf_ntohs(x) \ macro