Searched refs:bpf_htons (Results 1 - 25 of 58) sorted by last modified time
123
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | xdping_kern.c | 71 if (eth->h_proto != bpf_htons(ETH_P_IP)) 142 seq = bpf_htons(bpf_ntohs(icmph->un.echo.sequence) + 1);
|
H A D | xdp_synproxy_kern.c | 444 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 D | test_xdp_noinline.c | 310 bpf_htons(pkt_bytes + sizeof(struct ipv6hdr)); 357 iph->tot_len = bpf_htons(pkt_bytes + sizeof(struct iphdr));
|
H A D | test_xdp_dynptr.c | 132 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); 143 iph->tot_len = bpf_htons(payload_len + iphdr_sz); 211 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); 219 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + ipv6hdr_sz); 247 if (h_proto == bpf_htons(ETH_P_IP)) 249 else if (h_proto == bpf_htons(ETH_P_IPV6))
|
H A D | test_xdp_loop.c | 123 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); 131 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); 192 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); 197 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); 221 if (h_proto == bpf_htons(ETH_P_IP)) 223 else if (h_proto == bpf_htons(ETH_P_IPV6))
|
H A D | test_xdp.c | 127 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); 135 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); 196 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); 201 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); 225 if (h_proto == bpf_htons(ETH_P_IP)) 227 else if (h_proto == bpf_htons(ETH_P_IPV6))
|
H A D | test_tc_tunnel.c | 128 iph_inner.tot_len = bpf_htons(sizeof(iph6_inner) + 180 h_outer.l4hdr.gre.protocol = bpf_htons(l2_proto); 187 h_outer.l4hdr.udp.dest = bpf_htons(udp_dst); 189 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + 231 h_outer.ip.tot_len = bpf_htons(olen + 248 eth.h_proto = bpf_htons(ETH_P_IP); 311 h_outer.l4hdr.gre.protocol = bpf_htons(l2_proto); 318 h_outer.l4hdr.udp.dest = bpf_htons(udp_dst); 322 h_outer.l4hdr.udp.len = bpf_htons(tot_len); 360 h_outer.ip.payload_len = bpf_htons(ole [all...] |
H A D | test_tcp_custom_syncookie.c | 433 ctx->ipv4->tot_len = bpf_htons((long)ctx->ptr32 - (long)ctx->ipv4); 447 ctx->ipv6->payload_len = bpf_htons((long)ctx->ptr32 - (long)ctx->tcp);
|
H A D | test_lwt_seg6local.c | 365 uint16_t new_tag = bpf_htons(2442); 413 if (srh->tag != bpf_htons(2442))
|
H A D | test_cls_redirect.c | 212 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK); 213 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0; 390 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); 521 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta); 523 encap_gre->gre.protocol = bpf_htons(proto); 947 if (skb->protocol != bpf_htons(ETH_P_IP)) {
|
H A D | test_cls_redirect_dynptr.c | 121 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK); 122 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0; 282 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); 409 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta); 411 encap_gre->gre.protocol = bpf_htons(proto); 857 if (skb->protocol != bpf_htons(ETH_P_IP))
|
H A D | xdp_metadata.c | 46 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 D | xdp_hw_metadata.c | 42 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 D | test_tunnel_kern.c | 21 #define TUNNEL_CSUM bpf_htons(0x01) 22 #define TUNNEL_KEY bpf_htons(0x04) 435 if (eth->h_proto != bpf_htons(ETH_P_IP)) 451 if (udph->dest != bpf_htons(VXLAN_UDP_PORT)) 584 gopt.opt_class = bpf_htons(0x102); /* Open Virtual Networking (OVN) */ 651 gopt.opt_class = bpf_htons(0x102); /* Open Virtual Networking (OVN) */ 763 encap.dport = bpf_htons(5555); 800 encap.dport = bpf_htons(5555);
|
H A D | test_tc_link.c | 30 seen_eth = eth.h_proto == bpf_htons(ETH_P_IP);
|
H A D | test_assign_reuse.c | 86 if (!th->syn || th->ack || th->dest != bpf_htons(dest_port)) 99 if (uh->dest != bpf_htons(dest_port)) 117 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
|
H A D | cgroup_tcp_skb.c | 29 if (skb->protocol != bpf_htons(ETH_P_IPV6)) 40 if (tcph->source != bpf_htons(g_sock_port) && 41 tcph->dest != bpf_htons(g_sock_port))
|
H A D | vrf_socket_lookup.c | 29 if (eth->h_proto != bpf_htons(ETH_P_IP))
|
H A D | test_sock_fields.c | 263 return word[0] == bpf_htons(0xcafe); 272 return half[0] == bpf_htons(0xcafe);
|
H A D | xdpwall.c | 265 if (udp->dest != bpf_htons(6666)) 334 if (proto != bpf_htons(ETH_P_IPV6))
|
H A D | xdp_features.c | 77 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 D | verifier_netfilter_ctx.c | 118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP;
|
H A D | test_xdp_vlan.c | 70 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) & 0xf000) 260 bpf_skb_vlan_push(ctx, bpf_htons(ETH_P_8021Q), TESTVLAN);
|
H A D | test_select_reuseport_kern.c | 83 if (data_check.eth_protocol == bpf_htons(ETH_P_IP)) {
|
/linux-master/samples/bpf/ |
H A D | net_shared.h | 25 #define bpf_htons(x) __builtin_bswap16(x) macro 29 #define bpf_htons(x) (x) macro
|
Completed in 214 milliseconds
123