Searched refs:bpf_htons (Results 51 - 62 of 62) sorted by path

123

/linux-master/tools/testing/selftests/bpf/progs/
H A Dtest_xdp_noinline.c310 bpf_htons(pkt_bytes + sizeof(struct ipv6hdr));
365 iph->tot_len = bpf_htons(pkt_bytes + sizeof(struct iphdr));
H A Dtest_xdp_vlan.c70 if (eth_type == bpf_htons(ETH_P_8021Q)
71 || eth_type == bpf_htons(ETH_P_8021AD)) {
83 if (eth_type == bpf_htons(ETH_P_8021Q)
84 || eth_type == bpf_htons(ETH_P_8021AD)) {
163 bpf_htons((bpf_ntohs(vlan_hdr->h_vlan_TCI) & 0xf000U)
260 bpf_skb_vlan_push(ctx, bpf_htons(ETH_P_8021Q), TESTVLAN);
H A Dverifier_netfilter_ctx.c118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP;
H A Dvrf_socket_lookup.c29 if (eth->h_proto != bpf_htons(ETH_P_IP))
H A Dxdp_features.c77 if (eh->h_proto == bpf_htons(ETH_P_IP)) {
98 } else if (eh->h_proto == bpf_htons(ETH_P_IPV6)) {
124 if (port != bpf_htons(DUT_ECHO_PORT))
131 return bpf_htons(tlv->type) == CMD_ECHO ? 0 : -EINVAL;
H A Dxdp_hw_metadata.c42 if (eth + 1 < data_end && (eth->h_proto == bpf_htons(ETH_P_8021AD) ||
43 eth->h_proto == bpf_htons(ETH_P_8021Q)))
46 if (eth + 1 < data_end && eth->h_proto == bpf_htons(ETH_P_8021Q))
50 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
55 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
70 if (udp->dest != bpf_htons(9091)) {
H A Dxdp_metadata.c46 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
51 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
64 if (udp->dest != bpf_htons(8080))
H A Dxdp_redirect_multi_kern.c54 if (h_proto == bpf_htons(ETH_P_IP))
58 else if (h_proto == bpf_htons(ETH_P_IPV6))
H A Dxdp_synproxy_kern.c444 if ((hdr->ipv4->frag_off & bpf_htons(IP_DF | IP_MF | IP_OFFSET)) != bpf_htons(IP_DF))
555 hdr->ipv4->tot_len = bpf_htons(sizeof(*hdr->ipv4) + hdr->tcp_len);
576 hdr->ipv6->payload_len = bpf_htons(hdr->tcp_len);
H A Dxdping_kern.c71 if (eth->h_proto != bpf_htons(ETH_P_IP))
142 seq = bpf_htons(bpf_ntohs(icmph->un.echo.sequence) + 1);
H A Dxdpwall.c265 if (udp->dest != bpf_htons(6666))
334 if (proto != bpf_htons(ETH_P_IPV6))
/linux-master/tools/testing/selftests/net/
H A Dnat6to4.bpf.c62 if (skb->protocol != bpf_htons(ETH_P_IPV6))
70 if (eth->h_proto != bpf_htons(ETH_P_IPV6))
92 eth2.h_proto = bpf_htons(ETH_P_IP); // But replace the ethertype
98 .tot_len = bpf_htons(bpf_ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16
100 .frag_off = bpf_htons(IP_DF), // u16
130 if (bpf_skb_change_proto(skb, bpf_htons(ETH_P_IP), 0))
159 if (skb->protocol != bpf_htons(ETH_P_IP))
167 if (eth->h_proto != bpf_htons(ETH_P_IP))
179 if (bpf_htons(ip4->tot_len) > 0xFFFF - sizeof(struct ipv6hdr))
200 if (ip4->frag_off & ~bpf_htons(IP_D
[all...]

Completed in 215 milliseconds

123