Lines Matching refs:ctx

31 int sendmsg_v6_prog(struct bpf_sock_addr *ctx)  in sendmsg_v6_prog()  argument
33 if (ctx->type != SOCK_DGRAM) in sendmsg_v6_prog()
36 if (!get_set_sk_priority(ctx)) in sendmsg_v6_prog()
40 if (ctx->msg_src_ip6[3] == bpf_htonl(1) || in sendmsg_v6_prog()
41 ctx->msg_src_ip6[3] == bpf_htonl(0)) { in sendmsg_v6_prog()
42 ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0); in sendmsg_v6_prog()
43 ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1); in sendmsg_v6_prog()
44 ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2); in sendmsg_v6_prog()
45 ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3); in sendmsg_v6_prog()
52 if (ctx->user_ip6[0] == bpf_htonl(0xFACEB00C)) { in sendmsg_v6_prog()
53 ctx->user_ip6[0] = bpf_htonl(DST_REWRITE_IP6_0); in sendmsg_v6_prog()
54 ctx->user_ip6[1] = bpf_htonl(DST_REWRITE_IP6_1); in sendmsg_v6_prog()
55 ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); in sendmsg_v6_prog()
56 ctx->user_ip6[3] = bpf_htonl(DST_REWRITE_IP6_3); in sendmsg_v6_prog()
58 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in sendmsg_v6_prog()
68 int sendmsg_v6_v4mapped_prog(struct bpf_sock_addr *ctx) in sendmsg_v6_v4mapped_prog() argument
71 ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0); in sendmsg_v6_v4mapped_prog()
72 ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1); in sendmsg_v6_v4mapped_prog()
73 ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2); in sendmsg_v6_v4mapped_prog()
74 ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3); in sendmsg_v6_v4mapped_prog()
77 ctx->user_ip6[0] = bpf_htonl(DST_REWRITE_IP6_V4_MAPPED_0); in sendmsg_v6_v4mapped_prog()
78 ctx->user_ip6[1] = bpf_htonl(DST_REWRITE_IP6_V4_MAPPED_1); in sendmsg_v6_v4mapped_prog()
79 ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_V4_MAPPED_2); in sendmsg_v6_v4mapped_prog()
80 ctx->user_ip6[3] = bpf_htonl(DST_REWRITE_IP6_V4_MAPPED_3); in sendmsg_v6_v4mapped_prog()
82 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in sendmsg_v6_v4mapped_prog()
88 int sendmsg_v6_wildcard_prog(struct bpf_sock_addr *ctx) in sendmsg_v6_wildcard_prog() argument
91 ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0); in sendmsg_v6_wildcard_prog()
92 ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1); in sendmsg_v6_wildcard_prog()
93 ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2); in sendmsg_v6_wildcard_prog()
94 ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3); in sendmsg_v6_wildcard_prog()
97 ctx->user_ip6[0] = bpf_htonl(0); in sendmsg_v6_wildcard_prog()
98 ctx->user_ip6[1] = bpf_htonl(0); in sendmsg_v6_wildcard_prog()
99 ctx->user_ip6[2] = bpf_htonl(0); in sendmsg_v6_wildcard_prog()
100 ctx->user_ip6[3] = bpf_htonl(0); in sendmsg_v6_wildcard_prog()
102 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in sendmsg_v6_wildcard_prog()
108 int sendmsg_v6_preserve_dst_prog(struct bpf_sock_addr *ctx) in sendmsg_v6_preserve_dst_prog() argument
114 int sendmsg_v6_deny_prog(struct bpf_sock_addr *ctx) in sendmsg_v6_deny_prog() argument