1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2016, Linaro Limited
4  */
5 
6 #ifndef __PTA_SOCKET
7 #define __PTA_SOCKET
8 
9 #define PTA_SOCKET_UUID { 0x3b996a7d, 0x2c2b, 0x4a49, { \
10 			  0xa8, 0x96, 0xe1, 0xfb, 0x57, 0x66, 0xd2, 0xf4 } }
11 
12 /*
13  * [in]		value[0].a	ip version TEE_IP_VERSION_* from tee_ipsocket.h
14  * [in]		value[0].b	server port number
15  * [in]		memref[1]	server address
16  * [in]		value[2].a	protocol, TEE_ISOCKET_PROTOCOLID_*
17  * [out]	value[3].a	socket handle
18  */
19 #define PTA_SOCKET_OPEN		1
20 
21 /*
22  * [in]		value[0].a	socket handle
23  */
24 #define PTA_SOCKET_CLOSE	2
25 
26 #define PTA_SOCKET_TIMEOUT_NONBLOCKING	0
27 #define PTA_SOCKET_TIMEOUT_BLOCKING	0xffffffff
28 
29 /*
30  * [in]		value[0].a	socket handle
31  * [in]		value[0].b	timeout ms or TEE_TIMEOUT_INFINITE
32  * [in]		memref[1]	buffer to transmit
33  * [out]	value[2].a	number of transmitted bytes
34  */
35 #define PTA_SOCKET_SEND		3
36 
37 /*
38  * [in]		value[0].a	socket handle
39  * [in]		value[0].b	timeout ms or TEE_TIMEOUT_INFINITE
40  * [out]	memref[1]	buffer
41  */
42 #define PTA_SOCKET_RECV		4
43 
44 /*
45  * [in]		value[0].a	socket handle
46  * [in]		value[0].b	ioctl command
47  * [in/out]	memref[1]	buffer
48  */
49 #define PTA_SOCKET_IOCTL	5
50 
51 #endif /*__PTA_SOCKET*/
52