Searched refs:bpf_htonl (Results 1 – 15 of 15) sorted by relevance
37 if (ctx->msg_src_ip6[3] == bpf_htonl(1) || in sendmsg_v6_prog()38 ctx->msg_src_ip6[3] == bpf_htonl(0)) { in sendmsg_v6_prog()39 ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0); in sendmsg_v6_prog()40 ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1); in sendmsg_v6_prog()41 ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2); in sendmsg_v6_prog()42 ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3); in sendmsg_v6_prog()49 if (ctx->user_ip6[0] == bpf_htonl(0xFACEB00C)) { in sendmsg_v6_prog()50 ctx->user_ip6[0] = bpf_htonl(DST_REWRITE_IP6_0); in sendmsg_v6_prog()51 ctx->user_ip6[1] = bpf_htonl(DST_REWRITE_IP6_1); in sendmsg_v6_prog()52 ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); in sendmsg_v6_prog()[all …]
40 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 …]
35 if (ctx->msg_src_ip4 == bpf_htonl(SRC1_IP4) || in sendmsg_v4_prog()36 ctx->msg_src_ip4 == bpf_htonl(SRC2_IP4)) { in sendmsg_v4_prog()37 ctx->msg_src_ip4 = bpf_htonl(SRC_REWRITE_IP4); in sendmsg_v4_prog()44 if ((ctx->user_ip4 >> 24) == (bpf_htonl(DST_IP4) >> 24) && in sendmsg_v4_prog()46 ctx->user_ip4 = bpf_htonl(DST_REWRITE_IP4); in sendmsg_v4_prog()
124 if (ctx->user_ip6[0] != bpf_htonl(SERV6_IP_0) || in bind_v6_prog()125 ctx->user_ip6[1] != bpf_htonl(SERV6_IP_1) || in bind_v6_prog()126 ctx->user_ip6[2] != bpf_htonl(SERV6_IP_2) || in bind_v6_prog()127 ctx->user_ip6[3] != bpf_htonl(SERV6_IP_3) || in bind_v6_prog()169 ctx->user_ip6[0] = bpf_htonl(SERV6_REWRITE_IP_0); in bind_v6_prog()170 ctx->user_ip6[1] = bpf_htonl(SERV6_REWRITE_IP_1); in bind_v6_prog()171 ctx->user_ip6[2] = bpf_htonl(SERV6_REWRITE_IP_2); in bind_v6_prog()172 ctx->user_ip6[3] = bpf_htonl(SERV6_REWRITE_IP_3); in bind_v6_prog()
39 ctx->user_ip6[0] = bpf_htonl(SERV6_IP_0); in recvmsg6_prog()40 ctx->user_ip6[1] = bpf_htonl(SERV6_IP_1); in recvmsg6_prog()41 ctx->user_ip6[2] = bpf_htonl(SERV6_IP_2); in recvmsg6_prog()42 ctx->user_ip6[3] = bpf_htonl(SERV6_IP_3); in recvmsg6_prog()
91 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ip6gretap_set_tunnel()151 md.u.index = bpf_htonl(123); in _erspan_set_tunnel()220 key.remote_ipv6[3] = bpf_htonl(0x11); in _ip4ip6erspan_set_tunnel()235 md.u.index = bpf_htonl(123); in _ip4ip6erspan_set_tunnel()361 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ip6vxlan_set_tunnel()416 *(int *) &gopt.opt_data = bpf_htonl(0xdeadbeef); in _geneve_set_tunnel()465 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ip6geneve_set_tunnel()484 *(int *) &gopt.opt_data = bpf_htonl(0xfeedbeef); in _ip6geneve_set_tunnel()584 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in _ipip6_set_tunnel()611 bpf_trace_printk(fmt, sizeof(fmt), bpf_htonl(key.remote_ipv6[0]), in _ipip6_get_tunnel()[all …]
38 sa.sin6_addr.s6_addr32[3] = bpf_htonl(1); in connect6()59 ctx->user_ip6[3] = bpf_htonl(1); in connect6()73 ctx->user_ip6[0] = bpf_htonl(0xfc000000); in getsockname6()76 ctx->user_ip6[3] = bpf_htonl(1); in getsockname6()
39 sa.sin_addr.s_addr = bpf_htonl(0x7f000001); in connect4()54 ctx->user_ip4 = bpf_htonl(0x7f000001); in connect4()68 ctx->user_ip4 = bpf_htonl(0x01020304); in getsockname4()
43 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()
117 if (ctx->user_ip4 != bpf_htonl(SERV4_IP) || in bind_v4_prog()155 ctx->user_ip4 = bpf_htonl(SERV4_REWRITE_IP); in bind_v4_prog()
36 ctx->user_ip4 = bpf_htonl(SERV4_IP); in recvmsg4_prog()
15 bpf_htonl((((__u32)(a) & 0xffU) << 24) | \20 { bpf_htonl(aaaa), bpf_htonl(bbbb), bpf_htonl(cccc), bpf_htonl(dddd) }
37 #define VXLAN_VNI_MASK bpf_htonl((VXLAN_N_VID - 1) << 8)206 vxlan_hdr->vx_vni = bpf_htonl((VXLAN_VNI & VXLAN_VNI_MASK) << 8); in __encap_ipv4()336 vxlan_hdr->vx_vni = bpf_htonl((VXLAN_VNI & VXLAN_VNI_MASK) << 8); in __encap_ipv6()
57 return !a6[0] && !a6[1] && !a6[2] && a6[3] == bpf_htonl(1); in is_loopback6()
86 #define bpf_htonl(x) \ macro