Lines Matching refs:params
26 TEE_Param params[4], in TA_OpenSessionEntryPoint()
30 (void)params; in TA_OpenSessionEntryPoint()
45 static TEE_Result ta_entry_tcp_open(uint32_t param_types, TEE_Param params[4]) in ta_entry_tcp_open()
62 if (params[2].memref.size < sizeof(struct sock_handle)) { in ta_entry_tcp_open()
63 params[2].memref.size = sizeof(struct sock_handle); in ta_entry_tcp_open()
67 setup.ipVersion = params[0].value.a; in ta_entry_tcp_open()
68 setup.server_port = params[0].value.b; in ta_entry_tcp_open()
69 setup.server_addr = strndup(params[1].memref.buffer, in ta_entry_tcp_open()
70 params[1].memref.size); in ta_entry_tcp_open()
75 res = h.socket->open(&h.ctx, &setup, ¶ms[3].value.a); in ta_entry_tcp_open()
78 memcpy(params[2].memref.buffer, &h, sizeof(h)); in ta_entry_tcp_open()
79 params[2].memref.size = sizeof(h); in ta_entry_tcp_open()
84 static TEE_Result ta_entry_udp_open(uint32_t param_types, TEE_Param params[4]) in ta_entry_udp_open()
101 if (params[2].memref.size < sizeof(struct sock_handle)) { in ta_entry_udp_open()
102 params[2].memref.size = sizeof(struct sock_handle); in ta_entry_udp_open()
106 setup.ipVersion = params[0].value.a; in ta_entry_udp_open()
107 setup.server_port = params[0].value.b; in ta_entry_udp_open()
108 setup.server_addr = strndup(params[1].memref.buffer, in ta_entry_udp_open()
109 params[1].memref.size); in ta_entry_udp_open()
114 res = h.socket->open(&h.ctx, &setup, ¶ms[3].value.a); in ta_entry_udp_open()
117 memcpy(params[2].memref.buffer, &h, sizeof(h)); in ta_entry_udp_open()
118 params[2].memref.size = sizeof(h); in ta_entry_udp_open()
123 static TEE_Result ta_entry_close(uint32_t param_types, TEE_Param params[4]) in ta_entry_close()
137 if (params[0].memref.size != sizeof(struct sock_handle)) in ta_entry_close()
140 h = params[0].memref.buffer; in ta_entry_close()
144 static TEE_Result ta_entry_send(uint32_t param_types, TEE_Param params[4]) in ta_entry_send()
159 if (params[0].memref.size != sizeof(*h)) in ta_entry_send()
162 h = params[0].memref.buffer; in ta_entry_send()
163 params[2].value.b = params[1].memref.size; in ta_entry_send()
164 return h->socket->send(h->ctx, params[1].memref.buffer, in ta_entry_send()
165 ¶ms[2].value.b, params[2].value.a); in ta_entry_send()
168 static TEE_Result ta_entry_recv(uint32_t param_types, TEE_Param params[4]) in ta_entry_recv()
185 if (params[0].memref.size != sizeof(struct sock_handle)) in ta_entry_recv()
188 h = params[0].memref.buffer; in ta_entry_recv()
189 sz = params[1].memref.size; in ta_entry_recv()
190 res = h->socket->recv(h->ctx, params[1].memref.buffer, &sz, in ta_entry_recv()
191 params[2].value.a); in ta_entry_recv()
192 params[1].memref.size = sz; in ta_entry_recv()
196 static TEE_Result ta_entry_error(uint32_t param_types, TEE_Param params[4]) in ta_entry_error()
211 if (params[0].memref.size != sizeof(struct sock_handle)) in ta_entry_error()
214 h = params[0].memref.buffer; in ta_entry_error()
215 params[1].value.a = h->socket->error(h->ctx); in ta_entry_error()
219 static TEE_Result ta_entry_ioctl(uint32_t param_types, TEE_Param params[4]) in ta_entry_ioctl()
236 if (params[0].memref.size != sizeof(struct sock_handle)) in ta_entry_ioctl()
239 h = params[0].memref.buffer; in ta_entry_ioctl()
240 sz = params[1].memref.size; in ta_entry_ioctl()
241 res = h->socket->ioctl(h->ctx, params[2].value.a, in ta_entry_ioctl()
242 params[1].memref.buffer, &sz); in ta_entry_ioctl()
243 params[1].memref.size = sz; in ta_entry_ioctl()
251 TEE_Param params[4]) in TA_InvokeCommandEntryPoint()
257 return ta_entry_tcp_open(param_types, params); in TA_InvokeCommandEntryPoint()
259 return ta_entry_udp_open(param_types, params); in TA_InvokeCommandEntryPoint()
261 return ta_entry_close(param_types, params); in TA_InvokeCommandEntryPoint()
263 return ta_entry_send(param_types, params); in TA_InvokeCommandEntryPoint()
265 return ta_entry_recv(param_types, params); in TA_InvokeCommandEntryPoint()
267 return ta_entry_error(param_types, params); in TA_InvokeCommandEntryPoint()
269 return ta_entry_ioctl(param_types, params); in TA_InvokeCommandEntryPoint()