Lines Matching defs:ctx
33 int set_cookie(struct bpf_sock_addr *ctx)
37 if (ctx->family != AF_INET6 || ctx->user_family != AF_INET6)
40 p = bpf_sk_storage_get(&socket_cookies, ctx->sk, 0,
46 p->cookie_key = bpf_get_socket_cookie(ctx);
52 int update_cookie_sockops(struct bpf_sock_ops *ctx)
54 struct bpf_sock *sk = ctx->sk;
57 if (ctx->family != AF_INET6)
60 if (ctx->op != BPF_SOCK_OPS_TCP_CONNECT_CB)
70 if (p->cookie_key != bpf_get_socket_cookie(ctx))
73 p->cookie_value |= (ctx->local_port << 8);