Lines Matching refs:sock_ctx
24 struct socket_ctx *sock_ctx; in tcp_open() local
32 sock_ctx = TEE_Malloc(sizeof(*sock_ctx), TEE_MALLOC_FILL_ZERO); in tcp_open()
33 if (!sock_ctx) in tcp_open()
40 &sock_ctx->handle); in tcp_open()
42 TEE_Free(sock_ctx); in tcp_open()
43 sock_ctx = NULL; in tcp_open()
45 *ctx = (TEE_iSocketHandle)sock_ctx; in tcp_open()
63 struct socket_ctx *sock_ctx; in udp_open() local
71 sock_ctx = TEE_Malloc(sizeof(*sock_ctx), TEE_MALLOC_FILL_ZERO); in udp_open()
72 if (!sock_ctx) in udp_open()
79 &sock_ctx->handle); in udp_open()
81 TEE_Free(sock_ctx); in udp_open()
82 sock_ctx = NULL; in udp_open()
84 *ctx = (TEE_iSocketHandle)sock_ctx; in udp_open()
101 struct socket_ctx *sock_ctx = (struct socket_ctx *)ctx; in sock_close() local
106 res = __tee_socket_pta_close(sock_ctx->handle); in sock_close()
107 TEE_Free(sock_ctx); in sock_close()
116 struct socket_ctx *sock_ctx = (struct socket_ctx *)ctx; in sock_send() local
121 res = __tee_socket_pta_send(sock_ctx->handle, buf, length, timeout); in sock_send()
122 sock_ctx->proto_error = res; in sock_send()
131 struct socket_ctx *sock_ctx = (struct socket_ctx *)ctx; in sock_recv() local
136 res = __tee_socket_pta_recv(sock_ctx->handle, buf, length, timeout); in sock_recv()
137 sock_ctx->proto_error = res; in sock_recv()
144 struct socket_ctx *sock_ctx = (struct socket_ctx *)ctx; in sock_error() local
149 return sock_ctx->proto_error; in sock_error()
156 struct socket_ctx *sock_ctx = (struct socket_ctx *)ctx; in tcp_ioctl() local
167 res = __tee_socket_pta_ioctl(sock_ctx->handle, commandCode, in tcp_ioctl()
174 sock_ctx->proto_error = res; in tcp_ioctl()
183 struct socket_ctx *sock_ctx = (struct socket_ctx *)ctx; in udp_ioctl() local
194 res = __tee_socket_pta_ioctl(sock_ctx->handle, commandCode, in udp_ioctl()
201 sock_ctx->proto_error = res; in udp_ioctl()