m2m_socket_host_if.h
Go to the documentation of this file.
1 
34 #ifndef __M2M_SOCKET_HOST_IF_H__
35 #define __M2M_SOCKET_HOST_IF_H__
36 
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
43 INCLUDES
44 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
45 
46 #ifndef _BOOT_
47 #ifndef _FIRMWARE_
48 #include "socket/include/socket.h"
49 #else
51 #endif
52 #endif
53 
54 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
55 MACROS
56 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
57 
58 #ifdef _FIRMWARE_
59 #define HOSTNAME_MAX_SIZE (100)
60 #endif
61 
62 #define SSL_MAX_OPT_LEN HOSTNAME_MAX_SIZE
63 
64 
65 
66 #define SOCKET_CMD_INVALID 0x00
67 
72 #define SOCKET_CMD_BIND 0x41
73 
78 #define SOCKET_CMD_LISTEN 0x42
79 
84 #define SOCKET_CMD_ACCEPT 0x43
85 
90 #define SOCKET_CMD_CONNECT 0x44
91 
96 #define SOCKET_CMD_SEND 0x45
97 
102 #define SOCKET_CMD_RECV 0x46
103 
108 #define SOCKET_CMD_SENDTO 0x47
109 
114 #define SOCKET_CMD_RECVFROM 0x48
115 
120 #define SOCKET_CMD_CLOSE 0x49
121 
126 #define SOCKET_CMD_DNS_RESOLVE 0x4A
127 
132 #define SOCKET_CMD_SSL_CONNECT 0x4B
133 
138 #define SOCKET_CMD_SSL_SEND 0x4C
139 
144 #define SOCKET_CMD_SSL_RECV 0x4D
145 
150 #define SOCKET_CMD_SSL_CLOSE 0x4E
151 
156 #define SOCKET_CMD_SET_SOCKET_OPTION 0x4F
157 
162 #define SOCKET_CMD_SSL_CREATE 0x50
163 
167 #define SOCKET_CMD_SSL_SET_SOCK_OPT 0x51
168 
169 
170 #define SOCKET_CMD_PING 0x52
171 
172 
173 
174 
175 
176 #define PING_ERR_SUCCESS 0
177 #define PING_ERR_DEST_UNREACH 1
178 #define PING_ERR_TIMEOUT 2
179 
180 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
181 DATA TYPES
182 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
183 
184 
188 typedef struct{
192 }tstrSockAddr;
193 
194 
195 typedef sint8 SOCKET;
197 
198 
199 
207 typedef struct{
208  char acHostName[HOSTNAME_MAX_SIZE];
210 }tstrDnsReply;
211 
212 
216 typedef struct{
218  SOCKET sock;
221 }tstrBindCmd;
222 
223 
227 typedef struct{
228  SOCKET sock;
232 
233 
237 typedef struct{
238  SOCKET sock;
242 
243 
255 typedef struct{
256  SOCKET sock;
260 
261 
265 typedef struct{
267  SOCKET sListenSock;
271 
272 
276 typedef struct{
278  SOCKET sock;
282 
283 
291 typedef struct{
292  SOCKET sock;
300 
301 
305 typedef struct{
306  SOCKET sock;
312 }tstrSendCmd;
313 
314 
322 typedef struct{
323  SOCKET sock;
329 
330 
334 typedef struct{
336  SOCKET sock;
340 }tstrRecvCmd;
341 
342 
348 typedef struct{
352  SOCKET sock;
356 
357 
361 typedef struct{
363  SOCKET sock;
367 
368 
369 typedef struct{
370  SOCKET sslSock;
371  uint8 __PAD24__[3];
373 
374 
378 typedef struct{
379  SOCKET sock;
383  uint8 au8OptVal[SSL_MAX_OPT_LEN];
385 
386 
389 typedef struct{
395 }tstrPingCmd;
396 
397 
398 typedef struct{
405  uint8 __PAD24__[3];
407 
408 #ifdef __cplusplus
409 }
410 #endif /* __cplusplus */
411 
412 #endif /* __M2M_SOCKET_HOST_IF_H__ */
tstrSockAddr strAddr
signed short sint16
Range of values between -32768 to 32767.
Definition: nm_bsp.h:118
Connect Reply, contains sock number and error value.
signed char sint8
Range of values between -128 to 127.
Definition: nm_bsp.h:111
tstrSockAddr strAddr
tstrSockAddr tstrUIPSockAddr
WINC3400 IoT Application Interface Internal Types.
tstrSockAddr strRemoteAddr
unsigned short uint16
Range of values between 0 to 65535.
Definition: nm_bsp.h:96
#define SSL_MAX_OPT_LEN
tstrSockAddr strAddr
tstrSockAddr strAddr
DNS Reply, contains hostName and HostIP.
#define HOSTNAME_MAX_SIZE
Definition: socket.h:59
unsigned long uint32
Range of values between 0 to 4294967295.
Definition: nm_bsp.h:103
unsigned char uint8
Range of values between 0 to 255.
Definition: nm_bsp.h:89
BSD compatible socket interface.
Send Reply, contains socket number and number of sent bytes.
sint8 SOCKET
Definition for socket handler data type. Socket ID,used with all socket operations to uniquely identi...


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57