Lines Matching refs:tcti_mssim
51 tcti_mssim_down_cast (TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim) in tcti_mssim_down_cast() argument
53 if (tcti_mssim == NULL) { in tcti_mssim_down_cast()
56 return &tcti_mssim->common; in tcti_mssim_down_cast()
66 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tctiContext); in tcti_platform_command() local
73 if (tcti_mssim == NULL) { in tcti_platform_command()
84 ":", sizeof (cmd), tcti_mssim->platform_sock); in tcti_platform_command()
85 ret = write_all (tcti_mssim->platform_sock, buf, sizeof (cmd)); in tcti_platform_command()
93 read_ret = recv (tcti_mssim->platform_sock, (char *) buf, sizeof (buf), 0); in tcti_platform_command()
100 read_ret = read(tcti_mssim->platform_sock, buf, sizeof (buf)); in tcti_platform_command()
108 PRIx32 ":", read_ret, tcti_mssim->platform_sock); in tcti_platform_command()
150 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim, in send_sim_cmd_setup() argument
153 TSS2_TCTI_COMMON_CONTEXT *tcti_common = tcti_mssim_down_cast (tcti_mssim); in send_sim_cmd_setup()
179 return socket_xmit_buf (tcti_mssim->tpm_sock, buf, sizeof (buf)); in send_sim_cmd_setup()
188 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tcti_ctx); in tcti_mssim_transmit() local
189 TSS2_TCTI_COMMON_CONTEXT *tcti_common = tcti_mssim_down_cast (tcti_mssim); in tcti_mssim_transmit()
193 if (tcti_mssim == NULL) { in tcti_mssim_transmit()
212 rc = send_sim_cmd_setup (tcti_mssim, header.size); in tcti_mssim_transmit()
216 rc = socket_xmit_buf (tcti_mssim->tpm_sock, cmd_buf, size); in tcti_mssim_transmit()
230 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tctiContext); in tcti_mssim_cancel() local
231 TSS2_TCTI_COMMON_CONTEXT *tcti_common = tcti_mssim_down_cast (tcti_mssim); in tcti_mssim_cancel()
234 if (tcti_mssim == NULL) { in tcti_mssim_cancel()
247 tcti_mssim->cancel = 1; in tcti_mssim_cancel()
257 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tctiContext); in tcti_mssim_set_locality() local
258 TSS2_TCTI_COMMON_CONTEXT *tcti_common = tcti_mssim_down_cast (tcti_mssim); in tcti_mssim_set_locality()
261 if (tcti_mssim == NULL) { in tcti_mssim_set_locality()
289 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tctiContext); in tcti_mssim_finalize() local
291 if (tcti_mssim == NULL) { in tcti_mssim_finalize()
294 send_sim_session_end (tcti_mssim->platform_sock); in tcti_mssim_finalize()
295 send_sim_session_end (tcti_mssim->tpm_sock); in tcti_mssim_finalize()
296 socket_close (&tcti_mssim->platform_sock); in tcti_mssim_finalize()
297 socket_close (&tcti_mssim->tpm_sock); in tcti_mssim_finalize()
311 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tctiContext); in tcti_mssim_receive() local
312 TSS2_TCTI_COMMON_CONTEXT *tcti_common = tcti_mssim_down_cast (tcti_mssim); in tcti_mssim_receive()
317 if (tcti_mssim == NULL) { in tcti_mssim_receive()
342 ret = socket_recv_buf (tcti_mssim->tpm_sock, size_buf, sizeof (UINT32)); in tcti_mssim_receive()
374 ret = socket_recv_buf (tcti_mssim->tpm_sock, in tcti_mssim_receive()
385 ret = socket_recv_buf (tcti_mssim->tpm_sock, in tcti_mssim_receive()
393 if (tcti_mssim->cancel) { in tcti_mssim_receive()
395 tcti_mssim->cancel = 0; in tcti_mssim_receive()
518 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = (TSS2_TCTI_MSSIM_CONTEXT*)tctiContext; in Tss2_Tcti_Mssim_Init() local
519 TSS2_TCTI_COMMON_CONTEXT *tcti_common = tcti_mssim_down_cast (tcti_mssim); in Tss2_Tcti_Mssim_Init()
565 tcti_mssim->tpm_sock = -1; in Tss2_Tcti_Mssim_Init()
566 tcti_mssim->platform_sock = -1; in Tss2_Tcti_Mssim_Init()
570 &tcti_mssim->tpm_sock); in Tss2_Tcti_Mssim_Init()
577 &tcti_mssim->platform_sock); in Tss2_Tcti_Mssim_Init()
597 socket_close (&tcti_mssim->tpm_sock); in Tss2_Tcti_Mssim_Init()
598 socket_close (&tcti_mssim->platform_sock); in Tss2_Tcti_Mssim_Init()