SimpleLink CC3120/CC3220 Host Driver  Version 2.0.1.15
Simplifies the implementation of Internet connectivity
protocol.h
1 /*
2  * Copyright (C) 2016 Texas Instruments Incorporated
3  *
4  * All rights reserved. Property of Texas Instruments Incorporated.
5  * Restricted rights to use, duplicate or disclose this code are
6  * granted through contract.
7  *
8  * The program may not be used without the written permission of
9  * Texas Instruments Incorporated or against the terms and conditions
10  * stipulated in the agreement under which this program has been supplied,
11  * and under no circumstances can it be used with non-TI connectivity device.
12  *
13  */
14 
15 
16 /*******************************************************************************\
17 *
18 * FILE NAME: protocol.h
19 *
20 * DESCRIPTION: Constant and data structure definitions and function
21 * prototypes for the SL protocol module, which implements
22 * processing of SimpleLink Commands.
23 *
24 * AUTHOR:
25 *
26 \*******************************************************************************/
27 
28 #ifndef _SL_PROTOCOL_TYPES_H_
29 #define _SL_PROTOCOL_TYPES_H_
30 
31 /****************************************************************************
32 **
33 ** User I/F pools definitions
34 **
35 ****************************************************************************/
36 
37 /****************************************************************************
38 **
39 ** Definitions for SimpleLink Commands
40 **
41 ****************************************************************************/
42 
43 
44 /* pattern for LE 8/16/32 or BE*/
45 #define H2N_SYNC_PATTERN {0xBBDDEEFF,0x4321,0x34,0x12}
46 #define H2N_CNYS_PATTERN {0xBBDDEEFF,0x8765,0x78,0x56}
47 
48 #define H2N_DUMMY_PATTERN (_u32)0xFFFFFFFF
49 #define N2H_SYNC_PATTERN (_u32)0xABCDDCBA
50 #define SYNC_PATTERN_LEN (_u32)sizeof(_u32)
51 #define UART_SET_MODE_MAGIC_CODE (_u32)0xAA55AA55
52 #define SPI_16BITS_BUG(pattern) (_u32)((_u32)pattern & (_u32)0xFFFF7FFF)
53 #define SPI_8BITS_BUG(pattern) (_u32)((_u32)pattern & (_u32)0xFFFFFF7F)
54 
55 
56 
57 typedef struct
58 {
59  _u16 Opcode;
60  _u16 Len;
62 
63 
64 typedef struct
65 {
66  _u32 Long;
67  _u16 Short;
68  _u8 Byte1;
69  _u8 Byte2;
71 
73 
74 typedef struct
75 {
76  _SlGenericHeader_t GenHeader;
77  _u8 TxPoolCnt;
78  _u8 DevStatus;
79  _u16 MinMaxPayload;
80  _u16 SocketTXFailure;
81  _u16 SocketNonBlocking;
83 
84 #define _SL_RESP_SPEC_HDR_SIZE (sizeof(_SlResponseHeader_t) - sizeof(_SlGenericHeader_t))
85 #define _SL_RESP_HDR_SIZE sizeof(_SlResponseHeader_t)
86 #define _SL_CMD_HDR_SIZE sizeof(_SlCommandHeader_t)
87 
88 #define _SL_RESP_ARGS_START(_pMsg) (((_SlResponseHeader_t *)(_pMsg)) + 1)
89 
90 /* Used only in NWP! */
91 typedef struct
92 {
93  _SlCommandHeader_t sl_hdr;
94  _u8 func_args_start;
95 } T_SCMD;
96 
97 /* _SlResponseHeader_t DevStatus bits */
98 #define _SL_DEV_STATUS_BIT_WLAN_CONN 0x01
99 #define _SL_DEV_STATUS_BIT_DROPPED_EVENTS 0x02
100 #define _SL_DEV_STATUS_BIT_LOCKED 0x04
101 #define _SL_DEV_STATUS_BIT_PROVISIONING_ACTIVE 0x08
102 #define _SL_DEV_STATUS_BIT_PROVISIONING_USER_INITIATED 0x10
103 #define _SL_DEV_STATUS_BIT_PRESERVATION 0x20
104 #define _SL_DEV_STATUS_BIT_PROVISIONING_ENABLE_API 0x40
105 
106 
107 /* Internal driver bits status (g_SlDeviceStatus) */
108 #define _SL_DRV_STATUS_BIT_RESTART_REQUIRED 0x100
109 #define _SL_DRV_STATUS_BIT_DEVICE_STARTED 0x200
110 #define _SL_DRV_STATUS_BIT_STOP_IN_PROGRESS 0x400
111 #define _SL_DRV_STATUS_BIT_START_IN_PROGRESS 0x800
112 
113 /****************************************************************************
114 ** OPCODES
115 ****************************************************************************/
116 #define SL_IPV4_IPV6_OFFSET ( 9 )
117 #define SL_OPCODE_IPV4 ( 0x0 << SL_IPV4_IPV6_OFFSET )
118 #define SL_OPCODE_IPV6 ( 0x1 << SL_IPV4_IPV6_OFFSET )
119 
120 #define SL_SYNC_ASYNC_OFFSET ( 10 )
121 #define SL_OPCODE_SYNC (0x1 << SL_SYNC_ASYNC_OFFSET )
122 #define SL_OPCODE_SILO_OFFSET ( 11 )
123 #define SL_OPCODE_SILO_MASK ( 0xF << SL_OPCODE_SILO_OFFSET )
124 #define SL_OPCODE_SILO_DEVICE ( 0x0 << SL_OPCODE_SILO_OFFSET )
125 #define SL_OPCODE_SILO_WLAN ( 0x1 << SL_OPCODE_SILO_OFFSET )
126 #define SL_OPCODE_SILO_SOCKET ( 0x2 << SL_OPCODE_SILO_OFFSET )
127 #define SL_OPCODE_SILO_NETAPP ( 0x3 << SL_OPCODE_SILO_OFFSET )
128 #define SL_OPCODE_SILO_FS ( 0x4 << SL_OPCODE_SILO_OFFSET )
129 #define SL_OPCODE_SILO_NETCFG ( 0x5 << SL_OPCODE_SILO_OFFSET )
130 #define SL_OPCODE_SILO_NETUTIL ( 0x6 << SL_OPCODE_SILO_OFFSET )
131 
132 #define SL_FAMILY_SHIFT (0x4)
133 #define SL_FLAGS_MASK (0xF)
134 
135 #define SL_OPCODE_DEVICE_INITCOMPLETE 0x0008
136 #define SL_OPCODE_DEVICE_ABORT 0x000C
137 #define SL_OPCODE_DEVICE_STOP_COMMAND 0x8473
138 #define SL_OPCODE_DEVICE_STOP_RESPONSE 0x0473
139 #define SL_OPCODE_DEVICE_STOP_ASYNC_RESPONSE 0x0073
140 #define SL_OPCODE_DEVICE_DEVICEASYNCDUMMY 0x0063
141 
142 #define SL_OPCODE_DEVICE_VERSIONREADCOMMAND 0x8470
143 #define SL_OPCODE_DEVICE_VERSIONREADRESPONSE 0x0470
144 #define SL_OPCODE_DEVICE_DEVICE_ASYNC_GENERAL_ERROR 0x0078
145 #define SL_OPCODE_DEVICE_FLOW_CTRL_ASYNC_EVENT 0x0079
146 
147 #define SL_OPCODE_WLAN_WLANCONNECTCOMMAND 0x8C80
148 #define SL_OPCODE_WLAN_WLANCONNECTRESPONSE 0x0C80
149 #define SL_OPCODE_WLAN_STA_ASYNCCONNECTEDRESPONSE 0x0880
150 #define SL_OPCODE_WLAN_P2PCL_ASYNCCONNECTEDRESPONSE 0x0892
151 
152 #define SL_OPCODE_WLAN_WLANDISCONNECTCOMMAND 0x8C81
153 #define SL_OPCODE_WLAN_WLANDISCONNECTRESPONSE 0x0C81
154 #define SL_OPCODE_WLAN_STA_ASYNCDISCONNECTEDRESPONSE 0x0881
155 #define SL_OPCODE_WLAN_P2PCL_ASYNCDISCONNECTEDRESPONSE 0x0894
156 
157 #define SL_OPCODE_WLAN_ASYNC_STA_ADDED 0x082E
158 #define SL_OPCODE_WLAN_ASYNC_P2PCL_ADDED 0x0896
159 #define SL_OPCODE_WLAN_ASYNC_STA_REMOVED 0x082F
160 #define SL_OPCODE_WLAN_ASYNC_P2PCL_REMOVED 0x0898
161 
162 #define SL_OPCODE_WLAN_P2P_DEV_FOUND 0x0830
163 #define SL_OPCODE_WLAN_P2P_CONNECTION_FAILED 0x0831
164 #define SL_OPCODE_WLAN_P2P_NEG_REQ_RECEIVED 0x0832
165 
166 #define SL_OPCODE_WLAN_WLANCONNECTEAPCOMMAND 0x8C82
167 #define SL_OPCODE_WLAN_WLANCONNECTEAPCRESPONSE 0x0C82
168 #define SL_OPCODE_WLAN_PROFILEADDCOMMAND 0x8C83
169 #define SL_OPCODE_WLAN_PROFILEADDRESPONSE 0x0C83
170 #define SL_OPCODE_WLAN_PROFILEGETCOMMAND 0x8C84
171 #define SL_OPCODE_WLAN_PROFILEGETRESPONSE 0x0C84
172 #define SL_OPCODE_WLAN_PROFILEDELCOMMAND 0x8C85
173 #define SL_OPCODE_WLAN_PROFILEDELRESPONSE 0x0C85
174 #define SL_OPCODE_WLAN_POLICYSETCOMMAND 0x8C86
175 #define SL_OPCODE_WLAN_POLICYSETRESPONSE 0x0C86
176 #define SL_OPCODE_WLAN_POLICYGETCOMMAND 0x8C87
177 #define SL_OPCODE_WLAN_POLICYGETRESPONSE 0x0C87
178 #define SL_OPCODE_WLAN_FILTERADD 0x8C88
179 #define SL_OPCODE_WLAN_FILTERADDRESPONSE 0x0C88
180 #define SL_OPCODE_WLAN_FILTERGET 0x8C89
181 #define SL_OPCODE_WLAN_FILTERGETRESPONSE 0x0C89
182 #define SL_OPCODE_WLAN_FILTERDELETE 0x8C8A
183 #define SL_OPCODE_WLAN_FILTERDELETERESPOSNE 0x0C8A
184 #define SL_OPCODE_WLAN_WLANGETSTATUSCOMMAND 0x8C8F
185 #define SL_OPCODE_WLAN_WLANGETSTATUSRESPONSE 0x0C8F
186 #define SL_OPCODE_WLAN_STARTTXCONTINUESCOMMAND 0x8CAA
187 #define SL_OPCODE_WLAN_STARTTXCONTINUESRESPONSE 0x0CAA
188 #define SL_OPCODE_WLAN_STOPTXCONTINUESCOMMAND 0x8CAB
189 #define SL_OPCODE_WLAN_STOPTXCONTINUESRESPONSE 0x0CAB
190 #define SL_OPCODE_WLAN_STARTRXSTATCOMMAND 0x8CAC
191 #define SL_OPCODE_WLAN_STARTRXSTATRESPONSE 0x0CAC
192 #define SL_OPCODE_WLAN_STOPRXSTATCOMMAND 0x8CAD
193 #define SL_OPCODE_WLAN_STOPRXSTATRESPONSE 0x0CAD
194 #define SL_OPCODE_WLAN_GETRXSTATCOMMAND 0x8CAF
195 #define SL_OPCODE_WLAN_GETRXSTATRESPONSE 0x0CAF
196 #define SL_OPCODE_WLAN_POLICYSETCOMMANDNEW 0x8CB0
197 #define SL_OPCODE_WLAN_POLICYSETRESPONSENEW 0x0CB0
198 #define SL_OPCODE_WLAN_POLICYGETCOMMANDNEW 0x8CB1
199 #define SL_OPCODE_WLAN_POLICYGETRESPONSENEW 0x0CB1
200 
201 #define SL_OPCODE_WLAN_PROVISIONING_PROFILE_ADDED_ASYNC_RESPONSE 0x08B2
202 #define SL_OPCODE_WLAN_SET_MODE 0x8CB4
203 #define SL_OPCODE_WLAN_SET_MODE_RESPONSE 0x0CB4
204 #define SL_OPCODE_WLAN_CFG_SET 0x8CB5
205 #define SL_OPCODE_WLAN_CFG_SET_RESPONSE 0x0CB5
206 #define SL_OPCODE_WLAN_CFG_GET 0x8CB6
207 #define SL_OPCODE_WLAN_CFG_GET_RESPONSE 0x0CB6
208 #define SL_OPCODE_WLAN_EAP_PROFILEADDCOMMAND 0x8C67
209 #define SL_OPCODE_WLAN_EAP_PROFILEADDCOMMAND_RESPONSE 0x0C67
210 
211 #define SL_OPCODE_SOCKET_SOCKET 0x9401
212 #define SL_OPCODE_SOCKET_SOCKETRESPONSE 0x1401
213 #define SL_OPCODE_SOCKET_CLOSE 0x9402
214 #define SL_OPCODE_SOCKET_CLOSERESPONSE 0x1402
215 #define SL_OPCODE_SOCKET_ACCEPT 0x9403
216 #define SL_OPCODE_SOCKET_ACCEPTRESPONSE 0x1403
217 #define SL_OPCODE_SOCKET_ACCEPTASYNCRESPONSE 0x1003
218 #define SL_OPCODE_SOCKET_ACCEPTASYNCRESPONSE_V6 0x1203
219 #define SL_OPCODE_SOCKET_BIND 0x9404
220 #define SL_OPCODE_SOCKET_BIND_V6 0x9604
221 #define SL_OPCODE_SOCKET_BINDRESPONSE 0x1404
222 #define SL_OPCODE_SOCKET_LISTEN 0x9405
223 #define SL_OPCODE_SOCKET_LISTENRESPONSE 0x1405
224 #define SL_OPCODE_SOCKET_CONNECT 0x9406
225 #define SL_OPCODE_SOCKET_CONNECT_V6 0x9606
226 #define SL_OPCODE_SOCKET_CONNECTRESPONSE 0x1406
227 #define SL_OPCODE_SOCKET_CONNECTASYNCRESPONSE 0x1006
228 #define SL_OPCODE_SOCKET_SELECT 0x9407
229 #define SL_OPCODE_SOCKET_SELECTRESPONSE 0x1407
230 #define SL_OPCODE_SOCKET_SELECTASYNCRESPONSE 0x1007
231 #define SL_OPCODE_SOCKET_SETSOCKOPT 0x9408
232 #define SL_OPCODE_SOCKET_SETSOCKOPTRESPONSE 0x1408
233 #define SL_OPCODE_SOCKET_GETSOCKOPT 0x9409
234 #define SL_OPCODE_SOCKET_GETSOCKOPTRESPONSE 0x1409
235 #define SL_OPCODE_SOCKET_RECV 0x940A
236 #define SL_OPCODE_SOCKET_RECVASYNCRESPONSE 0x100A
237 #define SL_OPCODE_SOCKET_RECVFROM 0x940B
238 #define SL_OPCODE_SOCKET_RECVFROMASYNCRESPONSE 0x100B
239 #define SL_OPCODE_SOCKET_RECVFROMASYNCRESPONSE_V6 0x120B
240 #define SL_OPCODE_SOCKET_SEND 0x940C
241 #define SL_OPCODE_SOCKET_SENDTO 0x940D
242 #define SL_OPCODE_SOCKET_SENDTO_V6 0x960D
243 #define SL_OPCODE_SOCKET_TXFAILEDASYNCRESPONSE 0x100E
244 #define SL_OPCODE_SOCKET_SOCKETASYNCEVENT 0x100F
245 #define SL_OPCODE_SOCKET_SOCKETCLOSEASYNCEVENT 0x1010
246 #define SL_OPCODE_NETAPP_START_COMMAND 0x9C0A
247 #define SL_OPCODE_NETAPP_START_RESPONSE 0x1C0A
248 #define SL_OPCODE_NETAPP_NETAPPSTARTRESPONSE 0x1C0A
249 #define SL_OPCODE_NETAPP_STOP_COMMAND 0x9C61
250 #define SL_OPCODE_NETAPP_STOP_RESPONSE 0x1C61
251 #define SL_OPCODE_NETAPP_NETAPPSET 0x9C0B
252 #define SL_OPCODE_NETAPP_NETAPPSETRESPONSE 0x1C0B
253 #define SL_OPCODE_NETAPP_NETAPPGET 0x9C27
254 #define SL_OPCODE_NETAPP_NETAPPGETRESPONSE 0x1C27
255 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAME 0x9C20
256 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAMERESPONSE 0x1C20
257 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAMEASYNCRESPONSE 0x1820
258 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAMEASYNCRESPONSE_V6 0x1A20
259 #define SL_OPCODE_NETAPP_NETAPP_MDNS_LOOKUP_SERVICE 0x9C71
260 #define SL_OPCODE_NETAPP_NETAPP_MDNS_LOOKUP_SERVICE_RESPONSE 0x1C72
261 #define SL_OPCODE_NETAPP_MDNSREGISTERSERVICE 0x9C34
262 #define SL_OPCODE_NETAPP_MDNSREGISTERSERVICERESPONSE 0x1C34
263 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICE 0x9C35
264 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICERESPONSE 0x1C35
265 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICEASYNCRESPONSE 0x1835
266 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICEASYNCRESPONSE_V6 0x1A35
267 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDR 0x9C26
268 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDR_V6 0x9E26
269 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDRRESPONSE 0x1C26
270 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDRASYNCRESPONSE 0x1826
271 #define SL_OPCODE_NETAPP_PINGSTART 0x9C21
272 #define SL_OPCODE_NETAPP_PINGSTART_V6 0x9E21
273 #define SL_OPCODE_NETAPP_PINGSTARTRESPONSE 0x1C21
274 #define SL_OPCODE_NETAPP_PINGREPORTREQUEST 0x9C22
275 #define SL_OPCODE_NETAPP_PINGREPORTREQUESTRESPONSE 0x1822
276 #define SL_OPCODE_NETAPP_ARPFLUSH 0x9C24
277 #define SL_OPCODE_NETAPP_ARPFLUSHRESPONSE 0x1C24
278 #define SL_OPCODE_NETAPP_IPACQUIRED 0x1825
279 #define SL_OPCODE_NETAPP_IPV4_LOST 0x1832
280 #define SL_OPCODE_NETAPP_DHCP_IPV4_ACQUIRE_TIMEOUT 0x1833
281 #define SL_OPCODE_NETAPP_IPACQUIRED_V6 0x1A25
282 #define SL_OPCODE_NETAPP_IPV6_LOST_V6 0x1A32
283 #define SL_OPCODE_NETAPP_IPERFSTARTCOMMAND 0x9C28
284 #define SL_OPCODE_NETAPP_IPERFSTARTRESPONSE 0x1C28
285 #define SL_OPCODE_NETAPP_IPERFSTOPCOMMAND 0x9C29
286 #define SL_OPCODE_NETAPP_IPERFSTOPRESPONSE 0x1C29
287 #define SL_OPCODE_NETAPP_CTESTSTARTCOMMAND 0x9C2A
288 #define SL_OPCODE_NETAPP_CTESTSTARTRESPONSE 0x1C2A
289 #define SL_OPCODE_NETAPP_CTESTASYNCRESPONSE 0x182A
290 #define SL_OPCODE_NETAPP_CTESTSTOPCOMMAND 0x9C2B
291 #define SL_OPCODE_NETAPP_CTESTSTOPRESPONSE 0x1C2B
292 #define SL_OPCODE_NETAPP_IP_LEASED 0x182C
293 #define SL_OPCODE_NETAPP_IP_RELEASED 0x182D
294 #define SL_OPCODE_NETAPP_HTTPGETTOKENVALUE 0x182E
295 #define SL_OPCODE_NETAPP_HTTPSENDTOKENVALUE 0x9C2F
296 #define SL_OPCODE_NETAPP_HTTPPOSTTOKENVALUE 0x1830
297 #define SL_OPCODE_NETAPP_IP_COLLISION 0x1831
298 
299 #define SL_OPCODE_NETAPP_REQUEST 0x1878
300 #define SL_OPCODE_NETAPP_RESPONSE 0x9C78
301 #define SL_OPCODE_NETAPP_SEND 0x9C79
302 #define SL_OPCODE_NETAPP_SENDRESPONSE 0x1C79
303 #define SL_OPCODE_NETAPP_RECEIVEREQUEST 0x9C7A
304 #define SL_OPCODE_NETAPP_RECEIVE 0x187B
305 
306 #define SL_OPCODE_NVMEM_FILEOPEN 0xA43C
307 #define SL_OPCODE_NVMEM_FILEOPENRESPONSE 0x243C
308 #define SL_OPCODE_NVMEM_FILECLOSE 0xA43D
309 #define SL_OPCODE_NVMEM_FILECLOSERESPONSE 0x243D
310 #define SL_OPCODE_NVMEM_FILEREADCOMMAND 0xA440
311 #define SL_OPCODE_NVMEM_FILEREADRESPONSE 0x2440
312 #define SL_OPCODE_NVMEM_FILEWRITECOMMAND 0xA441
313 #define SL_OPCODE_NVMEM_FILEWRITERESPONSE 0x2441
314 #define SL_OPCODE_NVMEM_FILEGETINFOCOMMAND 0xA442
315 #define SL_OPCODE_NVMEM_FILEGETINFORESPONSE 0x2442
316 #define SL_OPCODE_NVMEM_FILEDELCOMMAND 0xA443
317 #define SL_OPCODE_NVMEM_FILEDELRESPONSE 0x2443
318 #define SL_OPCODE_NVMEM_NVMEMFORMATCOMMAND 0xA444
319 #define SL_OPCODE_NVMEM_NVMEMFORMATRESPONSE 0x2444
320 #define SL_OPCODE_NVMEM_NVMEMGETFILELISTCOMMAND 0xA448
321 #define SL_OPCODE_NVMEM_NVMEMGETFILELISTRESPONSE 0x2448
322 
323 #define SL_OPCODE_NVMEM_NVMEMFSPROGRAMMINGCOMMAND 0xA44A
324 #define SL_OPCODE_NVMEM_NVMEMFSPROGRAMMINGRESPONSE 0x244A
325 #define SL_OPCODE_NVMEM_NVMEMFILESYSTEMCONTROLCOMMAND 0xA44B
326 #define SL_OPCODE_NVMEM_NVMEMFILESYSTEMCONTROLRESPONSE 0x244B
327 #define SL_OPCODE_NVMEM_NVMEMBUNDLECONTROLCOMMAND 0xA44C
328 #define SL_OPCODE_NVMEM_NVMEMBUNDLECONTROLRESPONSE 0x244C
329 
330 
331 #define SL_OPCODE_DEVICE_SETDEBUGLEVELCOMMAND 0x846A
332 #define SL_OPCODE_DEVICE_SETDEBUGLEVELRESPONSE 0x046A
333 
334 #define SL_OPCODE_DEVICE_NETCFG_SET_COMMAND 0x8432
335 #define SL_OPCODE_DEVICE_NETCFG_SET_RESPONSE 0x0432
336 #define SL_OPCODE_DEVICE_NETCFG_GET_COMMAND 0x8433
337 #define SL_OPCODE_DEVICE_NETCFG_GET_RESPONSE 0x0433
338 /* */
339 #define SL_OPCODE_DEVICE_SETUARTMODECOMMAND 0x846B
340 #define SL_OPCODE_DEVICE_SETUARTMODERESPONSE 0x046B
341 #define SL_OPCODE_DEVICE_SSISIZESETCOMMAND 0x846B
342 #define SL_OPCODE_DEVICE_SSISIZESETRESPONSE 0x046B
343 
344 /* */
345 #define SL_OPCODE_DEVICE_EVENTMASKSET 0x8464
346 #define SL_OPCODE_DEVICE_EVENTMASKSETRESPONSE 0x0464
347 #define SL_OPCODE_DEVICE_EVENTMASKGET 0x8465
348 #define SL_OPCODE_DEVICE_EVENTMASKGETRESPONSE 0x0465
349 
350 #define SL_OPCODE_DEVICE_DEVICEGET 0x8466
351 #define SL_OPCODE_DEVICE_DEVICEGETRESPONSE 0x0466
352 #define SL_OPCODE_DEVICE_DEVICESET 0x84B7
353 #define SL_OPCODE_DEVICE_DEVICESETRESPONSE 0x04B7
354 
355 #define SL_OPCODE_WLAN_SCANRESULTSGETCOMMAND 0x8C8C
356 #define SL_OPCODE_WLAN_SCANRESULTSGETRESPONSE 0x0C8C
357 #define SL_OPCODE_WLAN_SMARTCONFIGOPTSET 0x8C8D
358 #define SL_OPCODE_WLAN_SMARTCONFIGOPTSETRESPONSE 0x0C8D
359 #define SL_OPCODE_WLAN_SMARTCONFIGOPTGET 0x8C8E
360 #define SL_OPCODE_WLAN_SMARTCONFIGOPTGETRESPONSE 0x0C8E
361 
362 #define SL_OPCODE_WLAN_PROVISIONING_COMMAND 0x8C98
363 #define SL_OPCODE_WLAN_PROVISIONING_RESPONSE 0x0C98
364 #define SL_OPCODE_DEVICE_RESET_REQUEST_ASYNC_EVENT 0x0099
365 #define SL_OPCODE_WLAN_PROVISIONING_STATUS_ASYNC_EVENT 0x089A
366 
367 #define SL_OPCODE_FREE_BSD_RECV_BUFFER 0xCCCB
368 #define SL_OPCODE_FREE_NON_BSD_READ_BUFFER 0xCCCD
369 
370 
371 /* Rx Filters opcodes */
372 #define SL_OPCODE_WLAN_WLANRXFILTERADDCOMMAND 0x8C6C
373 #define SL_OPCODE_WLAN_WLANRXFILTERADDRESPONSE 0x0C6C
374 #define SL_OPCODE_WLAN_WLANRXFILTERGETSTATISTICSINFOCOMMAND 0x8C6E
375 #define SL_OPCODE_WLAN_WLANRXFILTERGETSTATISTICSINFORESPONSE 0x0C6E
376 #define SL_OPCODE_WLAN_WLANRXFILTERGETINFO 0x8C70
377 #define SL_OPCODE_WLAN_WLANRXFILTERGETINFORESPONSE 0x0C70
378 #define SL_OPCODE_WLAN_RX_FILTER_ASYNC_RESPONSE 0x089D
379 
380 /* Utils */
381 #define SL_OPCODE_NETUTIL_SET 0xB4BE
382 #define SL_OPCODE_NETUTIL_SETRESPONSE 0x34BE
383 #define SL_OPCODE_NETUTIL_GET 0xB4C0
384 #define SL_OPCODE_NETUTIL_GETRESPONSE 0x34C0
385 #define SL_OPCODE_NETUTIL_COMMAND 0xB4C1
386 #define SL_OPCODE_NETUTIL_COMMANDRESPONSE 0x34C1
387 #define SL_OPCODE_NETUTIL_COMMANDASYNCRESPONSE 0x30C1
388 
389 /******************************************************************************************/
390 /* Device structs */
391 /******************************************************************************************/
392 typedef _u32 InitStatus_t;
393 
394 
395 typedef struct
396 {
397  _i32 Status;
398  _i32 ChipId;
399  _i32 MoreData;
401 
402 typedef struct
403 {
404  _i16 status;
405  _u16 sender;
406 
408 
409 typedef struct
410 {
411  _u32 SessionNumber;
412  _u16 Caller;
413  _u16 Padding;
415 
416 typedef struct
417 {
418  _u16 Timeout;
419  _u16 Padding;
421 
422 typedef struct
423 {
424  _u32 Group;
425  _u32 Mask;
427 
429 
430 
431 typedef struct
432 {
433  _u32 Group;
435 
436 
437 typedef struct
438 {
439  _u32 Group;
440  _u32 Mask;
442 
443 
444 typedef struct
445 {
446  _u32 Group;
448 
449 
450 typedef struct
451 {
452  _u32 Group;
453  _u32 Status;
455 
456 typedef struct
457 {
458  _u32 ChipId;
459  _u32 FwVersion[4];
460  _u8 PhyVersion[4];
462 
463 typedef struct
464 {
466  _u32 NwpVersion[4];
467  _u16 RomVersion;
468  _u16 Padding;
470 
471 typedef struct
472 {
473  _u16 MinTxPayloadSize;
474  _u8 padding[6];
476 
477 
478 
479 typedef struct
480 {
481  _u32 BaudRate;
482  _u8 FlowControlEnable;
484 
486 
487 /******************************************************/
488 
489 typedef struct
490 {
491  _u8 SsiSizeInBytes;
492  _u8 Padding[3];
494 
495 /*****************************************************************************************/
496 /* WLAN structs */
497 /*****************************************************************************************/
498 #define MAXIMAL_PASSWORD_LENGTH (64)
499 
500 typedef struct
501 {
502  _u8 ProvisioningCmd;
503  _u8 RequestedRoleAfterSuccess;
504  _u16 InactivityTimeoutSec;
505  _u32 Flags;
507 
508 typedef struct{
509  _u8 SecType;
510  _u8 SsidLen;
511  _u8 Bssid[6];
512  _u8 PasswordLen;
514 
515 #define SSID_STRING(pCmd) (_i8 *)((SlWlanConnectCommon_t *)(pCmd) + 1)
516 #define PASSWORD_STRING(pCmd) (SSID_STRING(pCmd) + ((SlWlanConnectCommon_t *)(pCmd))->SsidLen)
517 
518 typedef struct{
519  SlWlanConnectCommon_t Common;
520  _u8 UserLen;
521  _u8 AnonUserLen;
522  _u8 CertIndex;
523  _u32 EapBitmask;
525 
526 #define EAP_SSID_STRING(pCmd) (_i8 *)((SlWlanConnectEapCommand_t *)(pCmd) + 1)
527 #define EAP_PASSWORD_STRING(pCmd) (EAP_SSID_STRING(pCmd) + ((SlWlanConnectEapCommand_t *)(pCmd))->Common.SsidLen)
528 #define EAP_USER_STRING(pCmd) (EAP_PASSWORD_STRING(pCmd) + ((SlWlanConnectEapCommand_t *)(pCmd))->Common.PasswordLen)
529 #define EAP_ANON_USER_STRING(pCmd) (EAP_USER_STRING(pCmd) + ((SlWlanConnectEapCommand_t *)(pCmd))->UserLen)
530 
531 
532 typedef struct
533 {
534  _u8 PolicyType;
535  _u8 Padding;
536  _u8 PolicyOption;
537  _u8 PolicyOptionLen;
539 
540 
541 typedef struct{
542  _u32 MinDwellTime;
543  _u32 MaxDwellTime;
544  _u32 NumProbeResponse;
545  _u32 G_Channels_mask;
546  _i32 RssiThershold;
547  _i32 SnrThershold;
548  _i32 DefaultTXPower;
549  _u16 IntervalList[16];
551 
552 
553 typedef struct{
554  _i16 SecType;
555  _u8 SsidLen;
556  _u8 Priority;
557  _u8 Bssid[6];
558  _u8 PasswordLen;
559  _u8 WepKeyId;
561 
562 
563 typedef struct{
564  SlWlanAddGetProfile_t Common;
565  _u8 UserLen;
566  _u8 AnonUserLen;
567  _u8 CertIndex;
568  _u8 padding;
569  _u32 EapBitmask;
571 
572 
573 
574 
575 #define PROFILE_SSID_STRING(pCmd) ((_i8 *)((SlWlanAddGetProfile_t *)(pCmd) + 1))
576 #define PROFILE_PASSWORD_STRING(pCmd) (PROFILE_SSID_STRING(pCmd) + ((SlWlanAddGetProfile_t *)(pCmd))->SsidLen)
577 
578 #define EAP_PROFILE_SSID_STRING(pCmd) (_i8 *)((SlWlanAddGetEapProfile_t *)(pCmd) + 1)
579 #define EAP_PROFILE_PASSWORD_STRING(pCmd) (EAP_PROFILE_SSID_STRING(pCmd) + ((SlWlanAddGetEapProfile_t *)(pCmd))->Common.SsidLen)
580 #define EAP_PROFILE_USER_STRING(pCmd) (EAP_PROFILE_PASSWORD_STRING(pCmd) + ((SlWlanAddGetEapProfile_t *)(pCmd))->Common.PasswordLen)
581 #define EAP_PROFILE_ANON_USER_STRING(pCmd) (EAP_PROFILE_USER_STRING(pCmd) + ((SlWlanAddGetEapProfile_t *)(pCmd))->UserLen)
582 
583 
584 
585 typedef struct
586 {
587  _u8 Index;
588  _u8 Padding[3];
590 
592 
593 typedef struct
594 {
595  _u8 Index;
596  _u8 Count;
597  _i8 padding[2];
599 
600 
601 typedef struct
602 {
603  _u32 GroupIdBitmask;
604  _u8 Cipher;
605  _u8 PublicKeyLen;
606  _u8 Padding[2];
608 
609 #define SMART_CONFIG_START_PUBLIC_KEY_STRING(pCmd) ((_i8 *)((SlWlanSmartConfigParams_t *)(pCmd) + 1))
610 
611 typedef struct
612 {
613  _u8 Mode;
614  _u8 Padding[3];
616 
617 
618 
619 
620 typedef struct
621 {
622  _u16 Status;
623  _u16 ConfigId;
624  _u16 ConfigOpt;
625  _u16 ConfigLen;
627 
628 
629 /* ******************************************************************************/
630 /* RX filters - Start */
631 /* ******************************************************************************/
632 
633 typedef struct
634 {
635  SlWlanRxFilterRuleType_t RuleType;
636  SlWlanRxFilterFlags_u Flags;
637  SlWlanRxFilterID_t FilterId;
638  _u8 Padding;
640  SlWlanRxFilterTrigger_t Trigger;
641  SlWlanRxFilterAction_t Action;
643 
644 
645 typedef struct
646 {
647  SlWlanRxFilterID_t FilterId;
648  _i16 Status;
649  _u8 Padding[1];
650 
652 
653 
654 typedef struct
655 {
656  _i16 Status;
657  _u8 Padding[2];
658 
660 
661 
662 typedef struct
663 {
664  _i16 Status;
665  _u16 OutputBufferLength;
666 
668 
669 
670 
671 /* ******************************************************************************/
672 /* RX filters -- End */
673 /* ******************************************************************************/
674 
675 typedef struct
676 {
677  _u16 Status;
678  _u8 WlanRole; /* 0 = station, 2 = AP */
679  _u8 Ipv6Enabled;
680  _u8 DhcpEnabled;
681 
682  _u32 Global[4];
683  _u32 Local[4];
684  _u32 DnsServer[4];
685  _u8 DhcpState;
686 
688 
689 
690 typedef struct
691 {
692  _u8 Ip[4];
693  _u8 IpMask[4];
694  _u8 IpGateway[4];
695  _u8 IpDnsServer[4];
696  _u8 IpStart[4];
697  _u8 IpEnd[4];
699 
700 
701 
702 typedef struct
703 {
704  _u16 Status;
705  _u8 MacAddr[6];
707 
708 
709 typedef struct
710 {
711  _u16 Status;
712  _u16 ConfigId;
713  _u16 ConfigOpt;
714  _u16 ConfigLen;
716 
717 typedef struct
718 {
719  _u16 Status;
720  _u16 DeviceSetId;
721  _u16 Option;
722  _u16 ConfigLen;
724 
725 
726 
727 
728 /******************************************************************************************/
729 /* Socket structs */
730 /******************************************************************************************/
731 
732 typedef struct
733 {
734  _u8 Domain;
735  _u8 Type;
736  _u8 Protocol;
737  _u8 Padding;
739 
740 
741 typedef struct
742 {
743  _i16 StatusOrLen;
744  _u8 Sd;
745  _u8 Padding;
747 
748 typedef struct
749 {
750  _u8 Sd;
751  _u8 Family;
752  _u8 Padding1;
753  _u8 Padding2;
755 
756 
757 typedef struct
758 {
759  _i16 StatusOrLen;
760  _u8 Sd;
761  _u8 Family;
762  _u16 Port;
763  _u16 PaddingOrAddr;
764  _u32 Address;
766 
767 typedef struct
768 {
769  _i16 StatusOrLen;
770  _u8 Sd;
771  _u8 Family;
772  _u16 Port;
773  _u8 Address[6];
775 typedef struct
776 {
777  _i16 StatusOrLen;
778  _u8 Sd;
779  _u8 Family;
780  _u16 Port;
781  _u16 PaddingOrAddr;
782  _u32 Address[4];
784 
785 
786 typedef struct
787 {
788  _i16 LenOrPadding;
789  _u8 Sd;
790  _u8 FamilyAndFlags;
791  _u16 Port;
792  _u16 PaddingOrAddr;
793  _u32 Address;
795 
796 typedef struct
797 {
798  _i16 LenOrPadding;
799  _u8 Sd;
800  _u8 FamilyAndFlags;
801  _u16 Port;
802  _u8 Address[6];
804 typedef struct
805 {
806  _i16 LenOrPadding;
807  _u8 Sd;
808  _u8 FamilyAndFlags;
809  _u16 Port;
810  _u16 PaddingOrAddr;
811  _u32 Address[4];
813 
814 typedef union {
817 #ifdef SL_SUPPORT_IPV6
819 #endif
821 
822 typedef union {
825 #ifdef SL_SUPPORT_IPV6
827 #endif
829 
830 typedef struct
831 {
832  _u8 Sd;
833  _u8 Backlog;
834  _u8 Padding1;
835  _u8 Padding2;
837 
838 typedef struct
839 {
840  _u8 Sd;
841  _u8 Padding0;
842  _u8 Padding1;
843  _u8 Padding2;
845 
846 
847 typedef struct
848 {
849  _u8 Nfds;
850  _u8 ReadFdsCount;
851  _u8 WriteFdsCount;
852  _u8 Padding;
853  _u16 ReadFds;
854  _u16 WriteFds;
855  _u16 tv_usec;
856  _u16 tv_sec;
858 
859 
860 typedef struct
861 {
862  _u16 Status;
863  _u8 ReadFdsCount;
864  _u8 WriteFdsCount;
865  _u16 ReadFds;
866  _u16 WriteFds;
868 
869 typedef struct
870 {
871  _u8 Sd;
872  _u8 Level;
873  _u8 OptionName;
874  _u8 OptionLen;
876 
877 typedef struct
878 {
879  _u8 Sd;
880  _u8 Level;
881  _u8 OptionName;
882  _u8 OptionLen;
884 
885 typedef struct
886 {
887  _i16 Status;
888  _u8 Sd;
889  _u8 OptionLen;
891 
892 
893 typedef struct
894 {
895  _u16 StatusOrLen;
896  _u8 Sd;
897  _u8 FamilyAndFlags;
899 
900 /*****************************************************************************************
901 * NETAPP structs
902 ******************************************************************************************/
903 
904 
906 
907 typedef struct
908 {
909  _u32 AppId;
911 
912 typedef struct
913 {
914  _u16 Status;
915  _u16 AppId;
916  _u16 ConfigOpt;
917  _u16 ConfigLen;
919 typedef struct
920 {
921  _u16 PortNumber;
923 
924 typedef struct
925 {
926  _u8 AuthEnable;
928 
930 {
931  _u8 TokenNameLen;
932  _u8 Padd1;
933  _u16 Padd2;
935 
937 {
938  _u8 TokenValueLen;
939  _u8 TokenNameLen;
940  _u8 TokenName[SL_NETAPP_MAX_TOKEN_NAME_LEN];
941  _u16 Padd;
943 
945 {
946  _u8 PostActionLen;
947  _u8 TokenNameLen;
948  _u8 TokenValueLen;
949  _u8 padding;
951 
952 /*****************************************************************************************
953 * NETAPP Request/Response/Send/Receive
954 ******************************************************************************************/
956 {
957  _u8 AppId;
958  _u8 RequestType;
959  _u16 Handle;
960  _u16 MetadataLen;
961  _u16 PayloadLen;
962  _u32 Flags;
964 
966 {
967  _u16 Handle;
968  _u16 status;
969  _u16 MetadataLen;
970  _u16 PayloadLen;
971  _u32 Flags;
973 
975 {
976  _u16 Handle;
977  _u16 DataLen; /* can be data payload or metadata, depends on bit 1 in flags */
978  _u32 Flags;
980 
982 {
983  _u16 Handle;
984  _u16 MaxBufferLen;
985  _u32 Flags;
987 
989 {
990  _u16 Handle;
991  _u16 PayloadLen;
992  _u32 Flags;
994 
995 
996 typedef struct
997 {
998  _u16 Len;
999  _u8 Family;
1000  _u8 Padding;
1002 
1003 typedef struct
1004 {
1005  _u16 Status;
1006  _u16 Padding;
1007  _u32 Ip0;
1008  _u32 Ip1;
1009  _u32 Ip2;
1010  _u32 Ip3;
1012 
1013 typedef struct
1014 {
1015  _u16 Status;
1016  _u8 Padding1;
1017  _u8 Padding2;
1018  _u32 Ip0;
1020 
1021 
1022 
1023 
1024 typedef enum
1025 {
1026  CTST_BSD_UDP_TX,
1027  CTST_BSD_UDP_RX,
1028  CTST_BSD_TCP_TX,
1029  CTST_BSD_TCP_RX,
1030  CTST_BSD_TCP_SERVER_BI_DIR,
1031  CTST_BSD_TCP_CLIENT_BI_DIR,
1032  CTST_BSD_UDP_BI_DIR,
1033  CTST_BSD_RAW_TX,
1034  CTST_BSD_RAW_RX,
1035  CTST_BSD_RAW_BI_DIR,
1036  CTST_BSD_SECURED_TCP_TX,
1037  CTST_BSD_SECURED_TCP_RX,
1038  CTST_BSD_SECURED_TCP_SERVER_BI_DIR,
1039  CTST_BSD_SECURED_TCP_CLIENT_BI_DIR,
1040  CTST_BSD_UDP_TX_IPV6,
1041  CTST_BSD_UDP_RX_IPV6,
1042  CTST_BSD_TCP_TX_IPV6,
1043  CTST_BSD_TCP_RX_IPV6,
1044  CTST_BSD_TCP_SERVER_BI_DIR_IPV6,
1045  CTST_BSD_TCP_CLIENT_BI_DIR_IPV6,
1046  CTST_BSD_UDP_BI_DIR_IPV6,
1047  CTST_BSD_RAW_TX_IPV6,
1048  CTST_BSD_RAW_RX_IPV6,
1049  CTST_BSD_RAW_BI_DIR_IPV6,
1050  CTST_BSD_SECURED_TCP_TX_IPV6,
1051  CTST_BSD_SECURED_TCP_RX_IPV6,
1052  CTST_BSD_SECURED_TCP_SERVER_BI_DIR_IPV6,
1053  CTST_BSD_SECURED_TCP_CLIENT_BI_DIR_IPV6,
1054  CTST_RAW_TX,
1055  CTST_RAW_RX
1056  }CommTest_e;
1057 
1059 {
1060  _u32 Test;
1061  _u16 DestPort;
1062  _u16 SrcPort;
1063  _u32 DestAddr[4];
1064  _u32 PayloadSize;
1065  _u32 Timeout;
1066  _u32 CsEnabled;
1067  _u32 Secure;
1068  _u32 RawProtocol;
1069  _u8 Reserved1[4];
1071 
1072 typedef struct
1073 {
1074  _u8 Test;
1075  _u8 Socket;
1076  _i16 Status;
1077  _u32 StartTime;
1078  _u32 EndTime;
1079  _u16 TxKbitsSec;
1080  _u16 RxKbitsSec;
1081  _u32 OutOfOrderPackets;
1082  _u32 MissedPackets;
1083  _i16 Token;
1085 
1086 
1087 typedef struct
1088 {
1089  _u16 Status;
1090  _u16 RttMin;
1091  _u16 RttMax;
1092  _u16 RttAvg;
1093  _u32 NumSuccsessPings;
1094  _u32 NumSendsPings;
1095  _u32 TestTime;
1097 
1098 
1099 typedef struct
1100 {
1101  _u32 Ip;
1102  _u32 Gateway;
1103  _u32 Dns;
1105 
1106 
1107 typedef enum
1108 {
1109  ACQUIRED_IPV6_LOCAL = 1,
1110  ACQUIRED_IPV6_GLOBAL
1111 }IpV6AcquiredType_e;
1112 
1113 
1114 typedef struct
1115 {
1116  _u32 Type;
1117  _u32 Ip[4];
1118  _u32 Gateway[4];
1119  _u32 Dns[4];
1121 
1122 
1123 typedef union
1124 {
1125  SlSocketCommand_t EventMask;
1126  SlSendRecvCommand_t DeviceInit;
1128 
1129 /*****************************************************************************************
1130 * FS structs
1131 ******************************************************************************************/
1132 
1133 typedef struct
1134 {
1135  _u32 FileHandle;
1136  _u32 Offset;
1137  _u16 Len;
1138  _u16 Padding;
1140 
1141 typedef struct
1142 {
1143  _u32 Mode;
1144  _u32 Token;
1146 
1147 typedef struct
1148 {
1149  _u32 FileHandle;
1150  _u32 Token;
1152 
1153 
1154 typedef struct
1155 {
1156  _u32 FileHandle;
1157  _u32 CertificFileNameLength;
1158  _u32 SignatureLen;
1160 
1161 
1165 
1166 typedef struct
1167 {
1168  _u16 Status;
1169  _u16 Flags;
1170  _u32 FileLen;
1171  _u32 AllocatedLen;
1172  _u32 Token[4];
1173  _u32 FileStorageSize; /* The total size that the file required on the storage */
1174  _u32 FileWriteCounter; /* number of times in which the file have been written successfully */
1176 
1177 typedef struct
1178 {
1179  _u8 DeviceID;
1180  _u8 Padding[3];
1182 
1184 
1185 typedef struct
1186 {
1187  _u32 Token;
1189 
1191 
1192 typedef struct
1193 {
1194  _u32 FileHandle;
1195  _u32 Offset;
1196  _u16 Len;
1197  _u16 Padding;
1199 
1201 
1202 typedef struct
1203 {
1204  _u32 Token;
1205  _u8 Operation;
1206  _u8 Padding[3];
1207  _u32 FileNameLength;
1208  _u32 BufferLength;
1210 
1211 typedef struct
1212 {
1213  _i32 Status;
1214  _u32 Token;
1215  _u32 Len;
1217 
1218 
1219 typedef struct
1220 {
1221  _u16 IncludeFileFilters;
1222  _u8 Operation;
1223  _u8 Padding;
1225 
1226 
1227 
1228 typedef struct
1229 {
1230  _i32 Status;
1231  _u8 BundleState;
1232  _u8 Padding[3];
1234 
1235 
1236 typedef struct
1237 {
1238  _u16 KeyLen;
1239  _u16 ChunkLen;
1240  _u32 Flags;
1242 
1243 
1244 
1245 typedef struct
1246 {
1247  _i32 Status;
1249 
1250 
1251 typedef struct
1252 {
1253  _i32 Index; /* start point is -1 */
1254  _u8 Count;
1255  _u8 MaxEntryLen;
1256  _u8 Flags;
1257  _u8 Padding;
1259 
1260 typedef struct
1261 {
1262  _i32 NumOfEntriesOrError;
1263  _i32 Index; /* -1 , nothing was read */
1264  _u32 OutputBufferLength;
1266 
1267 
1268 /* TODO: Set MAx Async Payload length depending on flavor (Tiny, Small, etc.) */
1269 
1270 
1271 #ifdef SL_TINY
1272 #define SL_ASYNC_MAX_PAYLOAD_LEN 120 /* size must be aligned to 4 */
1273 #else
1274  #if defined(slcb_NetAppHttpServerHdlr) || defined(EXT_LIB_REGISTERED_HTTP_SERVER_EVENTS) || defined(slcb_NetAppRequestHdlr) || defined(EXT_LIB_REGISTERED_NETAPP_REQUEST_EVENTS)
1275  #define SL_ASYNC_MAX_PAYLOAD_LEN 1600 /* size must be aligned to 4 */
1276  #else
1277  #define SL_ASYNC_MAX_PAYLOAD_LEN 220 /* size must be aligned to 4 */
1278  #endif
1279 #endif
1280 
1281 #define SL_ASYNC_MAX_MSG_LEN (_SL_RESP_HDR_SIZE + SL_ASYNC_MAX_PAYLOAD_LEN)
1282 
1283 #define RECV_ARGS_SIZE (sizeof(SlSocketResponse_t))
1284 #define RECVFROM_IPV4_ARGS_SIZE (sizeof(SlSocketAddrAsyncIPv4Response_t))
1285 #define RECVFROM_IPV6_ARGS_SIZE (sizeof(SlSocketAddrAsyncIPv6Response_t))
1286 
1287 #define SL_IPV4_ADDRESS_SIZE (sizeof(_u32))
1288 #define SL_IPV6_ADDRESS_SIZE (4 * sizeof(_u32))
1289 
1290 
1291 /*****************************************************************************************
1292 * NetUtil structures
1293 ******************************************************************************************/
1294 /* Utils Set Get Header */
1295 typedef struct
1296 {
1297  _u32 ObjId;
1298  _i16 Status;
1299  _u16 Option;
1300  _u16 ValueLen;
1301  _u8 Padding[2];
1303 
1304 
1305 /* NetUtil Command Header */
1306 typedef struct
1307 {
1308  _u16 Cmd;
1309  _u16 AttribLen;
1310  _u16 InputLen;
1311  _u16 OutputLen;
1312 } SlNetUtilCmd_t;
1313 
1314 /* NetUtil Command Response Header */
1315 typedef struct
1316 {
1317  _u32 ObjId;
1318  _i16 Status;
1319  _u16 Cmd;
1320  _u16 OutputLen;
1321  _u8 Padding[2];
1323 
1324 
1325 #endif /* _SL_PROTOCOL_TYPES_H_ */
Definition: protocol.h:944