Home
last modified time | relevance | path

Searched refs:bpf_htonl (Results 1 – 10 of 10) sorted by relevance

/Linux-v5.10/tools/testing/selftests/bpf/progs/
Dsendmsg6_prog.c32 if (ctx->msg_src_ip6[3] == bpf_htonl(1) || in sendmsg_v6_prog()
33 ctx->msg_src_ip6[3] == bpf_htonl(0)) { in sendmsg_v6_prog()
34 ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0); in sendmsg_v6_prog()
35 ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1); in sendmsg_v6_prog()
36 ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2); in sendmsg_v6_prog()
37 ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3); in sendmsg_v6_prog()
44 if (ctx->user_ip6[0] == bpf_htonl(0xFACEB00C)) { in sendmsg_v6_prog()
45 ctx->user_ip6[0] = bpf_htonl(DST_REWRITE_IP6_0); in sendmsg_v6_prog()
46 ctx->user_ip6[1] = bpf_htonl(DST_REWRITE_IP6_1); in sendmsg_v6_prog()
47 ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); in sendmsg_v6_prog()
[all …]
Dconnect6_prog.c40 tuple.ipv6.daddr[0] = bpf_htonl(DST_REWRITE_IP6_0); in connect_v6_prog()
41 tuple.ipv6.daddr[1] = bpf_htonl(DST_REWRITE_IP6_1); in connect_v6_prog()
42 tuple.ipv6.daddr[2] = bpf_htonl(DST_REWRITE_IP6_2); in connect_v6_prog()
43 tuple.ipv6.daddr[3] = bpf_htonl(DST_REWRITE_IP6_3); in connect_v6_prog()
71 ctx->user_ip6[0] = bpf_htonl(DST_REWRITE_IP6_0); in connect_v6_prog()
72 ctx->user_ip6[1] = bpf_htonl(DST_REWRITE_IP6_1); in connect_v6_prog()
73 ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); in connect_v6_prog()
74 ctx->user_ip6[3] = bpf_htonl(DST_REWRITE_IP6_3); in connect_v6_prog()
84 sa.sin6_addr.s6_addr32[0] = bpf_htonl(SRC_REWRITE_IP6_0); in connect_v6_prog()
85 sa.sin6_addr.s6_addr32[1] = bpf_htonl(SRC_REWRITE_IP6_1); in connect_v6_prog()
[all …]
Dsendmsg4_prog.c28 if (ctx->msg_src_ip4 == bpf_htonl(SRC1_IP4) || in sendmsg_v4_prog()
29 ctx->msg_src_ip4 == bpf_htonl(SRC2_IP4)) { in sendmsg_v4_prog()
30 ctx->msg_src_ip4 = bpf_htonl(SRC_REWRITE_IP4); in sendmsg_v4_prog()
37 if ((ctx->user_ip4 >> 24) == (bpf_htonl(DST_IP4) >> 24) && in sendmsg_v4_prog()
39 ctx->user_ip4 = bpf_htonl(DST_REWRITE_IP4); in sendmsg_v4_prog()
Dtest_tunnel_kern.c92 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ip6gretap_set_tunnel()
152 md.u.index = bpf_htonl(123); in _erspan_set_tunnel()
221 key.remote_ipv6[3] = bpf_htonl(0x11); in _ip4ip6erspan_set_tunnel()
236 md.u.index = bpf_htonl(123); in _ip4ip6erspan_set_tunnel()
362 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ip6vxlan_set_tunnel()
417 *(int *) &gopt.opt_data = bpf_htonl(0xdeadbeef); in _geneve_set_tunnel()
468 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ip6geneve_set_tunnel()
487 *(int *) &gopt.opt_data = bpf_htonl(0xfeedbeef); in _ip6geneve_set_tunnel()
599 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ipip6_set_tunnel()
626 bpf_trace_printk(fmt, sizeof(fmt), bpf_htonl(key.remote_ipv6[0]), in _ipip6_get_tunnel()
[all …]
Dconnect_force_port6.c36 sa.sin6_addr.s6_addr32[3] = bpf_htonl(1); in connect6()
57 ctx->user_ip6[3] = bpf_htonl(1); in connect6()
68 ctx->user_ip6[0] = bpf_htonl(0xfc000000); in getsockname6()
71 ctx->user_ip6[3] = bpf_htonl(1); in getsockname6()
Dconnect_force_port4.c37 sa.sin_addr.s_addr = bpf_htonl(0x7f000001); in connect4()
52 ctx->user_ip4 = bpf_htonl(0x7f000001); in connect4()
63 ctx->user_ip4 = bpf_htonl(0x01020304); in getsockname4()
Dconnect4_prog.c43 sa.sin_addr.s_addr = bpf_htonl(SRC_REWRITE_IP4); in do_bind()
157 tuple.ipv4.daddr = bpf_htonl(DST_REWRITE_IP4); in connect_v4_prog()
195 ctx->user_ip4 = bpf_htonl(DST_REWRITE_IP4); in connect_v4_prog()
Dtest_sk_lookup.c15 bpf_htonl((((__u32)(a) & 0xffU) << 24) | \
20 { bpf_htonl(aaaa), bpf_htonl(bbbb), bpf_htonl(cccc), bpf_htonl(dddd) }
Dtest_sock_fields.c57 return !a6[0] && !a6[1] && !a6[2] && a6[3] == bpf_htonl(1); in is_loopback6()
/Linux-v5.10/tools/lib/bpf/
Dbpf_endian.h86 #define bpf_htonl(x) \ macro