Searched refs:bpf_ntohs (Results 1 - 25 of 32) sorted by path

12

/linux-master/samples/bpf/
H A Dnet_shared.h24 #define bpf_ntohs(x) __builtin_bswap16(x) macro
28 #define bpf_ntohs(x) (x) macro
H A Dxdp_router_ipv4.bpf.c104 switch (bpf_ntohs(h_proto)) {
/linux-master/tools/lib/bpf/
H A Dbpf_endian.h83 #define bpf_ntohs(x) \ macro
/linux-master/tools/testing/selftests/bpf/progs/
H A Dbpf_iter_setsockopt.c54 bpf_ntohs(sk->sk_dport) != listen_hport))
H A Dbpf_iter_tcp4.c95 destp = bpf_ntohs(inet->inet_dport);
96 srcp = bpf_ntohs(inet->inet_sport);
158 destp = bpf_ntohs(tw->tw_dport);
159 srcp = bpf_ntohs(tw->tw_sport);
187 bpf_ntohs(irsk->ir_rmt_port));
H A Dbpf_iter_tcp6.c95 destp = bpf_ntohs(inet->inet_dport);
96 srcp = bpf_ntohs(inet->inet_sport);
163 destp = bpf_ntohs(tw->tw_dport);
164 srcp = bpf_ntohs(tw->tw_sport);
203 bpf_ntohs(irsk->ir_rmt_port));
H A Dbpf_iter_udp4.c53 srcp = bpf_ntohs(inet->inet_sport);
54 destp = bpf_ntohs(inet->inet_dport);
H A Dbpf_iter_udp6.c55 srcp = bpf_ntohs(inet->inet_sport);
56 destp = bpf_ntohs(inet->inet_dport);
H A Dexceptions.c65 return static2global(bpf_ntohs(ctx->protocol));
71 return static2global(bpf_ntohs(ctx->protocol) - 1);
H A Dip_check_defrag.c27 offset = bpf_ntohs(iph->frag_off);
94 switch (bpf_ntohs(skb->protocol)) {
H A Dtest_cls_redirect.c521 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta);
H A Dtest_cls_redirect_dynptr.c409 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta);
H A Dtest_l4lb.c355 pkt_bytes = bpf_ntohs(ip6h->payload_len);
377 pkt_bytes = bpf_ntohs(iph->tot_len);
H A Dtest_l4lb_noinline.c354 pkt_bytes = bpf_ntohs(ip6h->payload_len);
376 pkt_bytes = bpf_ntohs(iph->tot_len);
H A Dtest_l4lb_noinline_dynptr.c361 pkt_bytes = bpf_ntohs(ip6h->payload_len);
383 pkt_bytes = bpf_ntohs(iph->tot_len);
H A Dtest_migrate_reuseport.c55 switch (bpf_ntohs(eth->h_proto)) {
H A Dtest_sock_fields.c144 if (sk->src_port == bpf_ntohs(srv_sa6.sin6_port)) {
232 sk->src_port != bpf_ntohs(srv_sa6.sin6_port))
H A Dtest_tc_neigh_fib.c43 fib_params->tot_len = bpf_ntohs(ip4h->tot_len);
71 fib_params->tot_len = bpf_ntohs(ip6h->payload_len);
H A Dtest_tc_tunnel.c129 bpf_ntohs(iph6_inner.payload_len));
189 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) +
232 bpf_ntohs(h_outer.ip.tot_len));
319 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) +
361 bpf_ntohs(h_outer.ip.payload_len));
634 switch (bpf_ntohs(greh.protocol)) {
647 switch (bpf_ntohs(udph.dest)) {
H A Dtest_tcp_check_syncookie_kern.c64 switch (bpf_ntohs(ethh->h_proto)) {
H A Dtest_tcp_custom_syncookie.c81 switch (bpf_ntohs(ctx->eth->h_proto)) {
H A Dtest_tcp_custom_syncookie.h37 return bpf_ntohs(__get_unaligned_t(__be16, p));
H A Dtest_tunnel_kern.c411 bpf_ntohs(key.tunnel_flags));
561 bpf_ntohs(key.tunnel_flags));
830 if (bpf_ntohs(encap.dport) != 5555)
834 key.remote_ipv4, bpf_ntohs(encap.sport),
835 bpf_ntohs(encap.dport));
H A Dtest_xdp.c105 payload_len = bpf_ntohs(iph->tot_len);
201 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h));
H A Dtest_xdp_dynptr.c114 payload_len = bpf_ntohs(iph->tot_len);
219 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + ipv6hdr_sz);

Completed in 248 milliseconds

12