Searched refs:bpf_htons (Results 26 - 50 of 58) sorted by relevance

123

/linux-master/tools/testing/selftests/bpf/progs/
H A Dkfree_skb.c102 if (users != 1 || pkt_data != bpf_htons(0x86dd) || meta.ifindex != 1)
149 if (len != 60 || protocol != bpf_htons(0x86dd) || ifindex != 1)
H A Dtest_tc_edt.c73 if (tcp->dest == bpf_htons(9000))
104 if (skb->protocol == bpf_htons(ETH_P_IP))
H A Dtest_pkt_access.c115 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
123 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
H A Dtest_tc_tunnel.c128 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 Dsendmsg6_prog.c53 ctx->user_port = bpf_htons(DST_REWRITE_PORT6);
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 Dvrf_socket_lookup.c29 if (eth->h_proto != bpf_htons(ETH_P_IP))
H A Dbind6_prog.c126 ctx->user_port != bpf_htons(SERV6_PORT))
171 ctx->user_port = bpf_htons(SERV6_REWRITE_PORT);
H A Dbind4_prog.c116 ctx->user_port != bpf_htons(SERV4_PORT))
154 ctx->user_port = bpf_htons(SERV4_REWRITE_PORT);
H A Dtest_sk_lookup_kern.c29 if (eth_proto == bpf_htons(ETH_P_IP)) {
38 } else if (eth_proto == bpf_htons(ETH_P_IPV6)) {
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 Dverifier_netfilter_ctx.c118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP;
H A Dcgroup_skb_sk_lookup_kern.c72 if (skb->protocol != bpf_htons(ETH_P_IPV6))
H A Dcgroup_tcp_skb.c29 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 Dtest_bpf_nf.c181 tuple->dst.u.all == bpf_htons(sport))
184 tuple->src.u.all == bpf_htons(dport))
H A Dtest_tunnel_kern.c21 #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 Dtest_btf_skc_cls_ingress.c161 if (eth->h_proto != bpf_htons(ETH_P_IPV6))
H A Dtest_select_reuseport_kern.c83 if (data_check.eth_protocol == bpf_htons(ETH_P_IP)) {
H A Dxdpwall.c265 if (udp->dest != bpf_htons(6666))
334 if (proto != bpf_htons(ETH_P_IPV6))
H A Dtest_sock_fields.c263 return word[0] == bpf_htons(0xcafe);
272 return half[0] == bpf_htons(0xcafe);
H A Dtest_lwt_seg6local.c365 uint16_t new_tag = bpf_htons(2442);
413 if (srh->tag != bpf_htons(2442))
H A Dtest_cls_redirect.c212 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 Dtest_cls_redirect_dynptr.c121 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))
/linux-master/samples/bpf/
H A Dxdp_router_ipv4.bpf.c92 if (h_proto == bpf_htons(ETH_P_8021Q) ||
93 h_proto == bpf_htons(ETH_P_8021AD)) {
/linux-master/tools/lib/bpf/
H A Dbpf_endian.h80 #define bpf_htons(x) \ macro

Completed in 165 milliseconds

123