Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/bpf/progs/
A Dbpf_iter_tcp4.c95 destp = bpf_ntohs(inet->inet_dport); in dump_tcp_sock()
96 srcp = bpf_ntohs(inet->inet_sport); in dump_tcp_sock()
158 destp = bpf_ntohs(tw->tw_dport); in dump_tw_sock()
159 srcp = bpf_ntohs(tw->tw_sport); in dump_tw_sock()
187 bpf_ntohs(irsk->ir_rmt_port)); in dump_req_sock()
A 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()
A Dbpf_iter_tcp6.c95 destp = bpf_ntohs(inet->inet_dport); in dump_tcp6_sock()
96 srcp = bpf_ntohs(inet->inet_sport); in dump_tcp6_sock()
163 destp = bpf_ntohs(tw->tw_dport); in dump_tw_sock()
164 srcp = bpf_ntohs(tw->tw_sport); in dump_tw_sock()
203 bpf_ntohs(irsk->ir_rmt_port)); in dump_req_sock()
A Dtest_tc_tunnel.c122 bpf_ntohs(iph6_inner.payload_len)); in __encap_ipv4()
182 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + in __encap_ipv4()
225 bpf_ntohs(h_outer.ip.tot_len)); in __encap_ipv4()
312 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) + in __encap_ipv6()
354 bpf_ntohs(h_outer.ip.payload_len)); in __encap_ipv6()
543 switch (bpf_ntohs(greh.protocol)) { in decap_internal()
556 switch (bpf_ntohs(udph.dest)) { in decap_internal()
A Dbpf_iter_udp4.c53 srcp = bpf_ntohs(inet->inet_sport); in dump_udp4()
54 destp = bpf_ntohs(inet->inet_dport); in dump_udp4()
A Dxdpwall.c198 info->sport = bpf_ntohs(tcp->source); in parse_tcp()
199 info->dport = bpf_ntohs(tcp->dest); in parse_tcp()
213 info->sport = bpf_ntohs(udp->source); in parse_udp()
214 info->dport = bpf_ntohs(udp->dest); in parse_udp()
A Dbpf_iter_udp6.c55 srcp = bpf_ntohs(inet->inet_sport); in dump_udp6()
56 destp = bpf_ntohs(inet->inet_dport); in dump_udp6()
A 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()
A 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()
A Dtest_xdp.c104 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4()
200 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
A Dtest_xdp_loop.c100 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4()
196 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
A 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()
A 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()
A Dbpf_iter_setsockopt.c55 bpf_ntohs(sk->sk_dport) != listen_hport)) in change_tcp_cc()
A Dtest_migrate_reuseport.c55 switch (bpf_ntohs(eth->h_proto)) { in drop_ack()
A Dtest_tcp_check_syncookie_kern.c64 switch (bpf_ntohs(ethh->h_proto)) { in check_syncookie()
A 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()
A Dtest_l4lb.c355 pkt_bytes = bpf_ntohs(ip6h->payload_len); in process_packet()
377 pkt_bytes = bpf_ntohs(iph->tot_len); in process_packet()
A Dtest_cls_redirect.c518 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta); in forward_with_gre()
/linux/samples/bpf/
A Dxdp_sample.bpf.h60 #define bpf_ntohs(x) __builtin_bswap16(x) macro
64 #define bpf_ntohs(x) (x) macro
A Dxdp_redirect_cpu.bpf.c65 if (__builtin_expect(bpf_ntohs(eth_type) < ETH_P_802_3_MIN, 0)) in parse_eth()
91 *eth_proto = bpf_ntohs(eth_type); in parse_eth()
114 dport = bpf_ntohs(udph->dest); in get_dest_port_ipv4_udp()
199 if (bpf_ntohs(eth_type) < ETH_P_802_3_MIN) { in xdp_prognum1_touch_data()
/linux/tools/lib/bpf/
A Dbpf_endian.h83 #define bpf_ntohs(x) \ macro

Completed in 28 milliseconds