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