Searched refs:bpf_htons (Results 1 - 25 of 58) sorted by path

123

/linux-master/samples/bpf/
H A Dnet_shared.h25 #define bpf_htons(x) __builtin_bswap16(x) macro
29 #define bpf_htons(x) (x) macro
H A Dtest_cgrp2_tc.bpf.c42 if (eth->h_proto != bpf_htons(ETH_P_IPV6) ||
H A Dtest_lwt_bpf.c171 ehdr.h_proto = bpf_htons(ETH_P_IP);
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
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_do_redirect.c29 .iph.payload_len = bpf_htons(sizeof(struct udp_packet)
32 .iph.saddr.s6_addr16 = {bpf_htons(0xfc00), 0, 0, 0, 0, 0, 0, bpf_htons(1)},
33 .iph.daddr.s6_addr16 = {bpf_htons(0xfc00), 0, 0, 0, 0, 0, 0, bpf_htons(2)},
34 .udp.source = bpf_htons(1),
35 .udp.dest = bpf_htons(1),
36 .udp.len = bpf_htons(sizeof(struct udp_packet)
/linux-master/tools/testing/selftests/bpf/progs/
H A Dbind4_prog.c116 ctx->user_port != bpf_htons(SERV4_PORT))
154 ctx->user_port = bpf_htons(SERV4_REWRITE_PORT);
H A Dbind6_prog.c126 ctx->user_port != bpf_htons(SERV6_PORT))
171 ctx->user_port = bpf_htons(SERV6_REWRITE_PORT);
H A Dbind_perm.c27 if (ctx->user_port == bpf_htons(111))
H A Dbpf_flow.c121 case bpf_htons(ETH_P_IP):
124 case bpf_htons(ETH_P_IPV6):
127 case bpf_htons(ETH_P_MPLS_MC):
128 case bpf_htons(ETH_P_MPLS_UC):
131 case bpf_htons(ETH_P_8021Q):
132 case bpf_htons(ETH_P_8021AD):
148 if (keys->n_proto == bpf_htons(ETH_P_IP)) {
186 return parse_eth_proto(skb, bpf_htons(ETH_P_IP));
192 return parse_eth_proto(skb, bpf_htons(ETH_P_IPV6));
198 if (bpf_htons(gr
[all...]
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 Dconnect4_dropper.c21 if (ctx->user_port == bpf_htons(60120))
H A Dconnect4_prog.c41 sa.sin_port = bpf_htons(0);
157 tuple.ipv4.dport = bpf_htons(DST_REWRITE_PORT4);
195 ctx->user_port = bpf_htons(DST_REWRITE_PORT4);
H A Dconnect6_prog.c43 tuple.ipv6.dport = bpf_htons(DST_REWRITE_PORT6);
74 ctx->user_port = bpf_htons(DST_REWRITE_PORT6);
80 sa.sin6_port = bpf_htons(0);
H A Dconnect_force_port4.c37 sa.sin_port = bpf_htons(22222);
44 if (ctx->user_port == bpf_htons(60000)) {
54 ctx->user_port = bpf_htons(60123);
66 if (ctx->user_port == bpf_htons(60123)) {
68 ctx->user_port = bpf_htons(60000);
82 if (ctx->user_port == bpf_htons(60123)) {
H A Dconnect_force_port6.c36 sa.sin6_port = bpf_htons(22223);
43 if (ctx->user_port == bpf_htons(60000)) {
59 ctx->user_port = bpf_htons(60124);
71 if (ctx->user_port == bpf_htons(60124)) {
76 ctx->user_port = bpf_htons(60000);
90 if (ctx->user_port == bpf_htons(60124)) {
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 Drecvmsg4_prog.c35 ctx->user_port = bpf_htons(SERV4_PORT);
H A Drecvmsg6_prog.c41 ctx->user_port = bpf_htons(SERV6_PORT);
H A Dsendmsg4_prog.c41 ctx->user_port == bpf_htons(DST_PORT)) {
43 ctx->user_port = bpf_htons(DST_REWRITE_PORT4);
H A Dsendmsg6_prog.c53 ctx->user_port = bpf_htons(DST_REWRITE_PORT6);
H A Dtest_assign_reuse.c86 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 Dtest_bpf_nf.c181 tuple->dst.u.all == bpf_htons(sport))
184 tuple->src.u.all == bpf_htons(dport))
H A Dtest_btf_skc_cls_ingress.c161 if (eth->h_proto != bpf_htons(ETH_P_IPV6))

Completed in 260 milliseconds

123