Lines Matching refs:ctx
30 int connect_v6_prog(struct bpf_sock_addr *ctx) in connect_v6_prog() argument
47 if (ctx->type != SOCK_STREAM && ctx->type != SOCK_DGRAM) in connect_v6_prog()
49 else if (ctx->type == SOCK_STREAM) in connect_v6_prog()
50 sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof(tuple.ipv6), in connect_v6_prog()
53 sk = bpf_sk_lookup_udp(ctx, &tuple, sizeof(tuple.ipv6), 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()
76 ctx->user_port = bpf_htons(DST_REWRITE_PORT6); in connect_v6_prog()
89 if (bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)) != 0) in connect_v6_prog()