Lines Matching defs:ctx
22 int sendmsg_v4_prog(struct bpf_sock_addr *ctx)
24 if (ctx->type != SOCK_DGRAM)
27 if (!get_set_sk_priority(ctx))
31 if (ctx->msg_src_ip4 == bpf_htonl(SRC1_IP4) ||
32 ctx->msg_src_ip4 == bpf_htonl(SRC2_IP4)) {
33 ctx->msg_src_ip4 = bpf_htonl(SRC_REWRITE_IP4);
40 if ((ctx->user_ip4 >> 24) == (bpf_htonl(DST_IP4) >> 24) &&
41 ctx->user_port == bpf_htons(DST_PORT)) {
42 ctx->user_ip4 = bpf_htonl(DST_REWRITE_IP4);
43 ctx->user_port = bpf_htons(DST_REWRITE_PORT4);