| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

tee_isocket.h
Go to the documentation of this file.
1
9 //#pragma once
10 #ifndef __TEE_ISOCKET_H__
11 #define __TEE_ISOCKET_H__
12
13 #include <tee_internal_api.h>
14 #include <stdint.h>
15
19 enum {
20 TEE_ISOCKET_ERROR_PROTOCOL = 0xF1007001,
21 TEE_ISOCKET_ERROR_REMOTE_CLOSED = 0xF1007002,
22 TEE_ISOCKET_ERROR_TIMEOUT = 0xF1007003,
23 TEE_ISOCKET_ERROR_OUT_OF_RESOURCES = 0xF1007004,
24 TEE_ISOCKET_ERROR_LARGE_BUFFER = 0xF1007005,
25 TEE_ISOCKET_WARNING_PROTOCOL = 0xF1007006,
26 TEE_ISOCKET_ERROR_HOSTNAME = 0xF1007007,
27 };
28
33 enum tee_sockets_function_id {
34 ID_TEE_Sockets_Open = 0x101,
35 ID_TEE_Sockets_Close = 0x102,
36 ID_TEE_Sockets_Send = 0x103,
37 ID_TEE_Sockets_Recv = 0x104,
38 ID_TEE_Sockets_Error = 0x105,
39 ID_TEE_Sockets_Ioctl = 0x106
40 };
46 typedef struct __TEE_iSocketHandle *TEE_iSocketHandle;
47
63 typedef const struct TEE_iSocket_s {
64 uint32_t TEE_iSocketVersion;
65 uint8_t protocolID;
67 TEE_Result (*open)(
68 TEE_iSocketHandle *ctx,
69 void *setup,
70 uint32_t *protocolError);
72 TEE_Result (*close)(
73 TEE_iSocketHandle ctx);
75 TEE_Result (*send)(
76 TEE_iSocketHandle ctx,
77 const void *buf,
78 uint32_t *length,
79 uint32_t timeout);
81 TEE_Result (*recv)(
82 TEE_iSocketHandle ctx,
83 void *buf,
84 uint32_t *length,
85 uint32_t timeout);
87 uint32_t (*error)(
88 TEE_iSocketHandle ctx);
90 TEE_Result (*ioctl)(
91 TEE_iSocketHandle ctx,
92 uint32_t commandCode,
93 void *buf,
94 uint32_t *length);
96 } TEE_iSocket;
97
98 /*
99 * Definitions common for several protocols (TCP / UDP)
100 */
101
105 enum {
106 TEE_ISOCKET_SERVER_NAME_MAX_LENGTH = 255
107 };
108
112 typedef enum TEE_ipSocket_ipVersion_e {
113 TEE_IP_VERSION_DC = 0,
114 TEE_IP_VERSION_4 = 1,
115 TEE_IP_VERSION_6 = 2,
116 } TEE_ipSocket_ipVersion;
117
120 #endif //__TEE_ISOCKET_H__
TEE_iSocket_s::ioctl
TEE_Result(* ioctl)(TEE_iSocketHandle ctx, uint32_t commandCode, void *buf, uint32_t *length)
Definition: tee_isocket.h:90
TEE_ISOCKET_ERROR_LARGE_BUFFER
Definition: tee_isocket.h:24
TEE_iSocket_s::TEE_iSocketVersion
uint32_t TEE_iSocketVersion
Definition: tee_isocket.h:64
TEE_ISOCKET_ERROR_OUT_OF_RESOURCES
Definition: tee_isocket.h:23
TEE_iSocket_s::error
uint32_t(* error)(TEE_iSocketHandle ctx)
Definition: tee_isocket.h:87
TEE_ISOCKET_ERROR_TIMEOUT
Definition: tee_isocket.h:22
TEE_iSocket_s::recv
TEE_Result(* recv)(TEE_iSocketHandle ctx, void *buf, uint32_t *length, uint32_t timeout)
Definition: tee_isocket.h:81
TEE_iSocket_s::protocolID
uint8_t protocolID
Definition: tee_isocket.h:65
TEE_ISOCKET_SERVER_NAME_MAX_LENGTH
Definition: tee_isocket.h:106
TEE_iSocketHandle
struct __TEE_iSocketHandle * TEE_iSocketHandle
iSocket context handle
Definition: tee_isocket.h:46
TEE_IP_VERSION_6
Definition: tee_isocket.h:115
TEE_IP_VERSION_4
Definition: tee_isocket.h:114
TEE_ISOCKET_ERROR_PROTOCOL
Definition: tee_isocket.h:20
TEE_iSocket_s::close
TEE_Result(* close)(TEE_iSocketHandle ctx)
Definition: tee_isocket.h:72
TEE_ISOCKET_WARNING_PROTOCOL
Definition: tee_isocket.h:25
TEE_ISOCKET_ERROR_HOSTNAME
Definition: tee_isocket.h:26
TEE_iSocket_s::send
TEE_Result(* send)(TEE_iSocketHandle ctx, const void *buf, uint32_t *length, uint32_t timeout)
Definition: tee_isocket.h:75
TEE_iSocket
const struct TEE_iSocket_s TEE_iSocket
iSocket instance Please refer to GPD_SPE_100 specification for detailed description. Basic rules are following:
TEE_ISOCKET_ERROR_REMOTE_CLOSED
Definition: tee_isocket.h:21
TEE_ipSocket_ipVersion
enum TEE_ipSocket_ipVersion_e TEE_ipSocket_ipVersion
IP version.
TEE_ipSocket_ipVersion_e
TEE_ipSocket_ipVersion_e
IP version.
Definition: tee_isocket.h:112
TEE_iSocket_s
iSocket instance Please refer to GPD_SPE_100 specification for detailed description. Basic rules are following:
Definition: tee_isocket.h:63
TEE_iSocket_s::open
TEE_Result(* open)(TEE_iSocketHandle *ctx, void *setup, uint32_t *protocolError)
Definition: tee_isocket.h:67
TEE_IP_VERSION_DC
Definition: tee_isocket.h:113