Lines Matching refs:ctx
26 int sendmsg_v6_prog(struct bpf_sock_addr *ctx)
28 if (ctx->type != SOCK_DGRAM)
31 if (!get_set_sk_priority(ctx))
35 if (ctx->msg_src_ip6[3] == bpf_htonl(1) ||
36 ctx->msg_src_ip6[3] == bpf_htonl(0)) {
37 ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0);
38 ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1);
39 ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2);
40 ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3);
47 if (ctx->user_ip6[0] == bpf_htonl(0xFACEB00C)) {
48 ctx->user_ip6[0] = bpf_htonl(DST_REWRITE_IP6_0);
49 ctx->user_ip6[1] = bpf_htonl(DST_REWRITE_IP6_1);
50 ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2);
51 ctx->user_ip6[3] = bpf_htonl(DST_REWRITE_IP6_3);
53 ctx->user_port = bpf_htons(DST_REWRITE_PORT6);