1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2016-2017, Linaro Limited
4  */
5 
6 #ifndef __TEE_SOCKET_PRIVATE_H
7 #define __TEE_SOCKET_PRIVATE_H
8 
9 #include <stdint.h>
10 #include <__tee_ipsocket.h>
11 
__tee_socket_ioctl_cmd_to_proto(uint32_t cmd_code)12 static inline uint8_t __tee_socket_ioctl_cmd_to_proto(uint32_t cmd_code)
13 {
14 	return cmd_code >> 24;
15 }
16 
17 TEE_Result __tee_socket_pta_open(TEE_ipSocket_ipVersion ip_vers,
18 				 const char *addr, uint16_t port,
19 				 uint32_t protocol, uint32_t *handle);
20 
21 TEE_Result __tee_socket_pta_close(uint32_t handle);
22 
23 TEE_Result __tee_socket_pta_send(uint32_t handle, const void *buf,
24 				 uint32_t *len, uint32_t timeout);
25 
26 TEE_Result __tee_socket_pta_recv(uint32_t handle, void *buf, uint32_t *len,
27 				 uint32_t timeout);
28 
29 TEE_Result __tee_socket_pta_ioctl(uint32_t handle, uint32_t command, void *buf,
30 				  uint32_t *len);
31 
32 #endif /*__TEE_SOCKET_PRIVATE_H*/
33