Home
last modified time | relevance | path

Searched refs:bpf_htons (Results 1 – 16 of 16) sorted by relevance

/external/linux-kselftest/tools/testing/selftests/bpf/
Dbpf_flow.c97 case bpf_htons(ETH_P_IP): in parse_eth_proto()
100 case bpf_htons(ETH_P_IPV6): in parse_eth_proto()
103 case bpf_htons(ETH_P_MPLS_MC): in parse_eth_proto()
104 case bpf_htons(ETH_P_MPLS_UC): in parse_eth_proto()
107 case bpf_htons(ETH_P_8021Q): in parse_eth_proto()
108 case bpf_htons(ETH_P_8021AD): in parse_eth_proto()
148 return parse_eth_proto(skb, bpf_htons(ETH_P_IP)); in parse_ip_proto()
151 return parse_eth_proto(skb, bpf_htons(ETH_P_IPV6)); in parse_ip_proto()
157 if (bpf_htons(gre->flags & GRE_VERSION)) in parse_ip_proto()
171 if (gre->proto == bpf_htons(ETH_P_TEB)) { in parse_ip_proto()
[all …]
Dtest_xdp_vlan.c70 if (eth_type == bpf_htons(ETH_P_8021Q) in parse_eth_frame()
71 || eth_type == bpf_htons(ETH_P_8021AD)) { in parse_eth_frame()
83 if (eth_type == bpf_htons(ETH_P_8021Q) in parse_eth_frame()
84 || eth_type == bpf_htons(ETH_P_8021AD)) { in parse_eth_frame()
163 bpf_htons((bpf_ntohs(vlan_hdr->h_vlan_TCI) & 0xf000) in xdp_prognum1()
273 bpf_skb_vlan_push(ctx, bpf_htons(ETH_P_8021Q), TESTVLAN); in _tc_progA()
Dtest_xdp.c128 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
136 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4()
197 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()
202 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
226 if (h_proto == bpf_htons(ETH_P_IP)) in _xdp_tx_iptunnel()
228 else if (h_proto == bpf_htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
Dsendmsg6_prog.c44 if ((ctx->user_ip6[0] & 0xFFFF) == bpf_htons(0xFACE) && in sendmsg_v6_prog()
45 ctx->user_ip6[0] >> 16 == bpf_htons(0xB00C)) { in sendmsg_v6_prog()
51 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in sendmsg_v6_prog()
Dsendmsg4_prog.c38 ctx->user_port == bpf_htons(DST_PORT)) { in sendmsg_v4_prog()
40 ctx->user_port = bpf_htons(DST_REWRITE_PORT4); in sendmsg_v4_prog()
Dconnect4_prog.c28 ctx->user_port = bpf_htons(DST_REWRITE_PORT4); in connect_v4_prog()
35 sa.sin_port = bpf_htons(0); in connect_v4_prog()
Dconnect6_prog.c40 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in connect_v6_prog()
47 sa.sin6_port = bpf_htons(0); in connect_v6_prog()
Dtest_pkt_access.c36 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in process()
44 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in process()
Dtest_tunnel_kern.c411 gopt.opt_class = bpf_htons(0x102); /* Open Virtual Networking (OVN) */ in _geneve_set_tunnel()
481 gopt.opt_class = bpf_htons(0x102); /* Open Virtual Networking (OVN) */ in _ip6geneve_set_tunnel()
548 if (tcp->dest == bpf_htons(5200)) in _ipip_set_tunnel()
550 else if (tcp->dest == bpf_htons(5201)) in _ipip_set_tunnel()
658 if (tcp->dest == bpf_htons(5200)) { in _ip6ip6_set_tunnel()
660 } else if (tcp->dest == bpf_htons(5201)) { in _ip6ip6_set_tunnel()
Dtest_sk_lookup_kern.c30 if (eth_proto == bpf_htons(ETH_P_IP)) { in get_tuple()
39 } else if (eth_proto == bpf_htons(ETH_P_IPV6)) { in get_tuple()
Dbpf_endian.h44 #define bpf_htons(x) \ macro
Dtest_lwt_seg6local.c374 uint16_t new_tag = bpf_htons(2442); in __pop_egr()
422 if (srh->tag != bpf_htons(2442)) in __inspect_t()
Dtest_select_reuseport_kern.c85 if (data_check.eth_protocol == bpf_htons(ETH_P_IP)) { in _select_by_skb_data()
Dtest_l4lb.c466 if (eth_proto == bpf_htons(ETH_P_IP)) in balancer_ingress()
468 else if (eth_proto == bpf_htons(ETH_P_IPV6)) in balancer_ingress()
Dtest_l4lb_noinline.c466 if (eth_proto == bpf_htons(ETH_P_IP)) in balancer_ingress()
468 else if (eth_proto == bpf_htons(ETH_P_IPV6)) in balancer_ingress()
Dtest_progs.c54 .eth.h_proto = bpf_htons(ETH_P_IP),
57 .iph.tot_len = bpf_htons(MAGIC_BYTES),
67 .eth.h_proto = bpf_htons(ETH_P_IPV6),
69 .iph.payload_len = bpf_htons(MAGIC_BYTES),