1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2016-2017, Linaro Limited 4 * All rights reserved. 5 */ 6 7 #ifndef __TEE_ISOCKET_H 8 #define __TEE_ISOCKET_H 9 10 #include <stdint.h> 11 #include <tee_api_types.h> 12 #include <__tee_isocket_defines.h> 13 14 typedef void *TEE_iSocketHandle; 15 16 typedef const struct TEE_iSocket_s { 17 uint32_t TEE_iSocketVersion; 18 uint8_t protocolID; 19 TEE_Result (*open)(TEE_iSocketHandle *ctx, void *setup, 20 uint32_t *protocolError); 21 22 TEE_Result (*close)(TEE_iSocketHandle ctx); 23 24 TEE_Result (*send)(TEE_iSocketHandle ctx, const void *buf, 25 uint32_t *length, uint32_t timeout); 26 27 TEE_Result (*recv)(TEE_iSocketHandle ctx, void *buf, uint32_t *length, 28 uint32_t timeout); 29 30 uint32_t (*error)(TEE_iSocketHandle ctx); 31 32 TEE_Result (*ioctl)(TEE_iSocketHandle ctx, uint32_t commandCode, 33 void *buf, uint32_t *length); 34 } TEE_iSocket; 35 36 #endif /*__TEE_ISOCKET_H*/ 37