DeepCover Embedded Security in IoT: Public-key Secured Data Paths
Dependencies: MaximInterface
protocol.h
00001 /* 00002 * protocol.h - CC31xx/CC32xx Host Driver Implementation 00003 * 00004 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ 00005 * 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 00014 * Redistributions in binary form must reproduce the above copyright 00015 * notice, this list of conditions and the following disclaimer in the 00016 * documentation and/or other materials provided with the 00017 * distribution. 00018 * 00019 * Neither the name of Texas Instruments Incorporated nor the names of 00020 * its contributors may be used to endorse or promote products derived 00021 * from this software without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00024 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00026 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00027 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00028 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00029 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00030 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00031 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00032 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 */ 00036 00037 /*******************************************************************************\ 00038 * 00039 * FILE NAME: protocol.h 00040 * 00041 * DESCRIPTION: Constant and data structure definitions and function 00042 * prototypes for the SL protocol module, which implements 00043 * processing of SimpleLink Commands. 00044 * 00045 * AUTHOR: 00046 * 00047 \*******************************************************************************/ 00048 00049 #ifndef _SL_PROTOCOL_TYPES_H_ 00050 #define _SL_PROTOCOL_TYPES_H_ 00051 00052 /**************************************************************************** 00053 ** 00054 ** User I/F pools definitions 00055 ** 00056 ****************************************************************************/ 00057 00058 /**************************************************************************** 00059 ** 00060 ** Definitions for SimpleLink Commands 00061 ** 00062 ****************************************************************************/ 00063 00064 00065 /* pattern for LE 8/16/32 or BE*/ 00066 #define H2N_SYNC_PATTERN {0xBBDDEEFF,0x4321,0x34,0x12} 00067 #define H2N_CNYS_PATTERN {0xBBDDEEFF,0x8765,0x78,0x56} 00068 00069 #define H2N_DUMMY_PATTERN (_u32)0xFFFFFFFF 00070 #define N2H_SYNC_PATTERN (_u32)0xABCDDCBA 00071 00072 #define SYNC_PATTERN_LEN (_u32)sizeof(_u32) 00073 #define UART_SET_MODE_MAGIC_CODE (_u32)0xAA55AA55 00074 #define SPI_16BITS_BUG(pattern) (_u32)((_u32)pattern & (_u32)0xFFFF7FFF) 00075 #define SPI_8BITS_BUG(pattern) (_u32)((_u32)pattern & (_u32)0xFFFFFF7F) 00076 00077 00078 00079 typedef struct 00080 { 00081 _u16 Opcode; 00082 _u16 Len; 00083 }_SlGenericHeader_t; 00084 00085 00086 typedef struct 00087 { 00088 _u32 Long; 00089 _u16 Short; 00090 _u8 Byte1; 00091 _u8 Byte2; 00092 }_SlSyncPattern_t; 00093 00094 typedef _SlGenericHeader_t _SlCommandHeader_t; 00095 00096 typedef struct 00097 { 00098 _SlGenericHeader_t GenHeader; 00099 _u8 TxPoolCnt; 00100 _u8 DevStatus; 00101 _u8 SocketTXFailure; 00102 _u8 SocketNonBlocking; 00103 }_SlResponseHeader_t; 00104 00105 #define _SL_RESP_SPEC_HDR_SIZE (sizeof(_SlResponseHeader_t) - sizeof(_SlGenericHeader_t)) 00106 #define _SL_RESP_HDR_SIZE sizeof(_SlResponseHeader_t) 00107 #define _SL_CMD_HDR_SIZE sizeof(_SlCommandHeader_t) 00108 00109 #define _SL_RESP_ARGS_START(_pMsg) (((_SlResponseHeader_t *)(_pMsg)) + 1) 00110 00111 /* Used only in NWP! */ 00112 typedef struct 00113 { 00114 _SlCommandHeader_t sl_hdr; 00115 _u8 func_args_start; 00116 } T_SCMD; 00117 00118 00119 #define WLAN_CONN_STATUS_BIT 0x01 00120 #define EVENTS_Q_STATUS_BIT 0x02 00121 #define PENDING_RCV_CMD_BIT 0x04 00122 #define FW_BUSY_PACKETS_BIT 0x08 00123 00124 #define INIT_STA_OK 0x11111111 00125 #define INIT_STA_ERR 0x22222222 00126 #define INIT_AP_OK 0x33333333 00127 #define INIT_AP_ERR 0x44444444 00128 #define INIT_P2P_OK 0x55555555 00129 #define INIT_P2P_ERR 0x66666666 00130 00131 /**************************************************************************** 00132 ** OPCODES 00133 ****************************************************************************/ 00134 #define SL_IPV4_IPV6_OFFSET ( 9 ) 00135 #define SL_OPCODE_IPV4 ( 0x0 << SL_IPV4_IPV6_OFFSET ) 00136 #define SL_OPCODE_IPV6 ( 0x1 << SL_IPV4_IPV6_OFFSET ) 00137 00138 #define SL_SYNC_ASYNC_OFFSET ( 10 ) 00139 #define SL_OPCODE_SYNC (0x1 << SL_SYNC_ASYNC_OFFSET ) 00140 #define SL_OPCODE_SILO_OFFSET ( 11 ) 00141 #define SL_OPCODE_SILO_MASK ( 0xF << SL_OPCODE_SILO_OFFSET ) 00142 #define SL_OPCODE_SILO_DEVICE ( 0x0 << SL_OPCODE_SILO_OFFSET ) 00143 #define SL_OPCODE_SILO_WLAN ( 0x1 << SL_OPCODE_SILO_OFFSET ) 00144 #define SL_OPCODE_SILO_SOCKET ( 0x2 << SL_OPCODE_SILO_OFFSET ) 00145 #define SL_OPCODE_SILO_NETAPP ( 0x3 << SL_OPCODE_SILO_OFFSET ) 00146 #define SL_OPCODE_SILO_NVMEM ( 0x4 << SL_OPCODE_SILO_OFFSET ) 00147 #define SL_OPCODE_SILO_NETCFG ( 0x5 << SL_OPCODE_SILO_OFFSET ) 00148 00149 #define SL_FAMILY_SHIFT (0x4) 00150 #define SL_FLAGS_MASK (0xF) 00151 00152 #define SL_OPCODE_DEVICE_INITCOMPLETE 0x0008 00153 #define SL_OPCODE_DEVICE_ABORT 0x000C 00154 #define SL_OPCODE_DEVICE_STOP_COMMAND 0x8473 00155 #define SL_OPCODE_DEVICE_STOP_RESPONSE 0x0473 00156 #define SL_OPCODE_DEVICE_STOP_ASYNC_RESPONSE 0x0073 00157 #define SL_OPCODE_DEVICE_DEVICEASYNCDUMMY 0x0063 00158 00159 #define SL_OPCODE_DEVICE_VERSIONREADCOMMAND 0x8470 00160 #define SL_OPCODE_DEVICE_VERSIONREADRESPONSE 0x0470 00161 #define SL_OPCODE_DEVICE_ASYNC_GENERAL_ERROR 0x0078 00162 #define SL_OPCODE_WLAN_WLANCONNECTCOMMAND 0x8C80 00163 #define SL_OPCODE_WLAN_WLANCONNECTRESPONSE 0x0C80 00164 #define SL_OPCODE_WLAN_WLANASYNCCONNECTEDRESPONSE 0x0880 00165 #define SL_OPCODE_WLAN_P2P_DEV_FOUND 0x0830 00166 #define SL_OPCODE_WLAN_CONNECTION_FAILED 0x0831 00167 #define SL_OPCODE_WLAN_P2P_NEG_REQ_RECEIVED 0x0832 00168 00169 #define SL_OPCODE_WLAN_WLANDISCONNECTCOMMAND 0x8C81 00170 #define SL_OPCODE_WLAN_WLANDISCONNECTRESPONSE 0x0C81 00171 #define SL_OPCODE_WLAN_WLANASYNCDISCONNECTEDRESPONSE 0x0881 00172 #define SL_OPCODE_WLAN_WLANCONNECTEAPCOMMAND 0x8C82 00173 #define SL_OPCODE_WLAN_WLANCONNECTEAPCRESPONSE 0x0C82 00174 #define SL_OPCODE_WLAN_PROFILEADDCOMMAND 0x8C83 00175 #define SL_OPCODE_WLAN_PROFILEADDRESPONSE 0x0C83 00176 #define SL_OPCODE_WLAN_PROFILEGETCOMMAND 0x8C84 00177 #define SL_OPCODE_WLAN_PROFILEGETRESPONSE 0x0C84 00178 #define SL_OPCODE_WLAN_PROFILEDELCOMMAND 0x8C85 00179 #define SL_OPCODE_WLAN_PROFILEDELRESPONSE 0x0C85 00180 #define SL_OPCODE_WLAN_POLICYSETCOMMAND 0x8C86 00181 #define SL_OPCODE_WLAN_POLICYSETRESPONSE 0x0C86 00182 #define SL_OPCODE_WLAN_POLICYGETCOMMAND 0x8C87 00183 #define SL_OPCODE_WLAN_POLICYGETRESPONSE 0x0C87 00184 #define SL_OPCODE_WLAN_FILTERADD 0x8C88 00185 #define SL_OPCODE_WLAN_FILTERADDRESPONSE 0x0C88 00186 #define SL_OPCODE_WLAN_FILTERGET 0x8C89 00187 #define SL_OPCODE_WLAN_FILTERGETRESPONSE 0x0C89 00188 #define SL_OPCODE_WLAN_FILTERDELETE 0x8C8A 00189 #define SL_OPCODE_WLAN_FILTERDELETERESPOSNE 0x0C8A 00190 #define SL_OPCODE_WLAN_WLANGETSTATUSCOMMAND 0x8C8F 00191 #define SL_OPCODE_WLAN_WLANGETSTATUSRESPONSE 0x0C8F 00192 #define SL_OPCODE_WLAN_STARTTXCONTINUESCOMMAND 0x8CAA 00193 #define SL_OPCODE_WLAN_STARTTXCONTINUESRESPONSE 0x0CAA 00194 #define SL_OPCODE_WLAN_STOPTXCONTINUESCOMMAND 0x8CAB 00195 #define SL_OPCODE_WLAN_STOPTXCONTINUESRESPONSE 0x0CAB 00196 #define SL_OPCODE_WLAN_STARTRXSTATCOMMAND 0x8CAC 00197 #define SL_OPCODE_WLAN_STARTRXSTATRESPONSE 0x0CAC 00198 #define SL_OPCODE_WLAN_STOPRXSTATCOMMAND 0x8CAD 00199 #define SL_OPCODE_WLAN_STOPRXSTATRESPONSE 0x0CAD 00200 #define SL_OPCODE_WLAN_GETRXSTATCOMMAND 0x8CAF 00201 #define SL_OPCODE_WLAN_GETRXSTATRESPONSE 0x0CAF 00202 #define SL_OPCODE_WLAN_POLICYSETCOMMANDNEW 0x8CB0 00203 #define SL_OPCODE_WLAN_POLICYSETRESPONSENEW 0x0CB0 00204 #define SL_OPCODE_WLAN_POLICYGETCOMMANDNEW 0x8CB1 00205 #define SL_OPCODE_WLAN_POLICYGETRESPONSENEW 0x0CB1 00206 00207 #define SL_OPCODE_WLAN_SMART_CONFIG_START_COMMAND 0x8CB2 00208 #define SL_OPCODE_WLAN_SMART_CONFIG_START_RESPONSE 0x0CB2 00209 #define SL_OPCODE_WLAN_SMART_CONFIG_START_ASYNC_RESPONSE 0x08B2 00210 #define SL_OPCODE_WLAN_SMART_CONFIG_STOP_COMMAND 0x8CB3 00211 #define SL_OPCODE_WLAN_SMART_CONFIG_STOP_RESPONSE 0x0CB3 00212 #define SL_OPCODE_WLAN_SMART_CONFIG_STOP_ASYNC_RESPONSE 0x08B3 00213 #define SL_OPCODE_WLAN_SET_MODE 0x8CB4 00214 #define SL_OPCODE_WLAN_SET_MODE_RESPONSE 0x0CB4 00215 #define SL_OPCODE_WLAN_CFG_SET 0x8CB5 00216 #define SL_OPCODE_WLAN_CFG_SET_RESPONSE 0x0CB5 00217 #define SL_OPCODE_WLAN_CFG_GET 0x8CB6 00218 #define SL_OPCODE_WLAN_CFG_GET_RESPONSE 0x0CB6 00219 #define SL_OPCODE_WLAN_STA_CONNECTED 0x082E 00220 #define SL_OPCODE_WLAN_STA_DISCONNECTED 0x082F 00221 #define SL_OPCODE_WLAN_EAP_PROFILEADDCOMMAND 0x8C67 00222 #define SL_OPCODE_WLAN_EAP_PROFILEADDCOMMAND_RESPONSE 0x0C67 00223 00224 #define SL_OPCODE_SOCKET_SOCKET 0x9401 00225 #define SL_OPCODE_SOCKET_SOCKETRESPONSE 0x1401 00226 #define SL_OPCODE_SOCKET_CLOSE 0x9402 00227 #define SL_OPCODE_SOCKET_CLOSERESPONSE 0x1402 00228 #define SL_OPCODE_SOCKET_ACCEPT 0x9403 00229 #define SL_OPCODE_SOCKET_ACCEPTRESPONSE 0x1403 00230 #define SL_OPCODE_SOCKET_ACCEPTASYNCRESPONSE 0x1003 00231 #define SL_OPCODE_SOCKET_ACCEPTASYNCRESPONSE_V6 0x1203 00232 #define SL_OPCODE_SOCKET_BIND 0x9404 00233 #define SL_OPCODE_SOCKET_BIND_V6 0x9604 00234 #define SL_OPCODE_SOCKET_BINDRESPONSE 0x1404 00235 #define SL_OPCODE_SOCKET_LISTEN 0x9405 00236 #define SL_OPCODE_SOCKET_LISTENRESPONSE 0x1405 00237 #define SL_OPCODE_SOCKET_CONNECT 0x9406 00238 #define SL_OPCODE_SOCKET_CONNECT_V6 0x9606 00239 #define SL_OPCODE_SOCKET_CONNECTRESPONSE 0x1406 00240 #define SL_OPCODE_SOCKET_CONNECTASYNCRESPONSE 0x1006 00241 #define SL_OPCODE_SOCKET_SELECT 0x9407 00242 #define SL_OPCODE_SOCKET_SELECTRESPONSE 0x1407 00243 #define SL_OPCODE_SOCKET_SELECTASYNCRESPONSE 0x1007 00244 #define SL_OPCODE_SOCKET_SETSOCKOPT 0x9408 00245 #define SL_OPCODE_SOCKET_SETSOCKOPTRESPONSE 0x1408 00246 #define SL_OPCODE_SOCKET_GETSOCKOPT 0x9409 00247 #define SL_OPCODE_SOCKET_GETSOCKOPTRESPONSE 0x1409 00248 #define SL_OPCODE_SOCKET_RECV 0x940A 00249 #define SL_OPCODE_SOCKET_RECVASYNCRESPONSE 0x100A 00250 #define SL_OPCODE_SOCKET_RECVFROM 0x940B 00251 #define SL_OPCODE_SOCKET_RECVFROMASYNCRESPONSE 0x100B 00252 #define SL_OPCODE_SOCKET_RECVFROMASYNCRESPONSE_V6 0x120B 00253 #define SL_OPCODE_SOCKET_SEND 0x940C 00254 #define SL_OPCODE_SOCKET_SENDTO 0x940D 00255 #define SL_OPCODE_SOCKET_SENDTO_V6 0x960D 00256 #define SL_OPCODE_SOCKET_TXFAILEDASYNCRESPONSE 0x100E 00257 #define SL_OPCODE_SOCKET_SOCKETASYNCEVENT 0x100F 00258 #define SL_OPCODE_NETAPP_START_COMMAND 0x9C0A 00259 #define SL_OPCODE_NETAPP_START_RESPONSE 0x1C0A 00260 #define SL_OPCODE_NETAPP_NETAPPSTARTRESPONSE 0x1C0A 00261 #define SL_OPCODE_NETAPP_STOP_COMMAND 0x9C61 00262 #define SL_OPCODE_NETAPP_STOP_RESPONSE 0x1C61 00263 #define SL_OPCODE_NETAPP_NETAPPSET 0x9C0B 00264 #define SL_OPCODE_NETAPP_NETAPPSETRESPONSE 0x1C0B 00265 #define SL_OPCODE_NETAPP_NETAPPGET 0x9C27 00266 #define SL_OPCODE_NETAPP_NETAPPGETRESPONSE 0x1C27 00267 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAME 0x9C20 00268 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAMERESPONSE 0x1C20 00269 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAMEASYNCRESPONSE 0x1820 00270 #define SL_OPCODE_NETAPP_DNSGETHOSTBYNAMEASYNCRESPONSE_V6 0x1A20 00271 #define SL_OPCODE_NETAPP_NETAPP_MDNS_LOOKUP_SERVICE 0x9C71 00272 #define SL_OPCODE_NETAPP_NETAPP_MDNS_LOOKUP_SERVICE_RESPONSE 0x1C72 00273 #define SL_OPCODE_NETAPP_MDNSREGISTERSERVICE 0x9C34 00274 #define SL_OPCODE_NETAPP_MDNSREGISTERSERVICERESPONSE 0x1C34 00275 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICE 0x9C35 00276 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICERESPONSE 0x1C35 00277 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICEASYNCRESPONSE 0x1835 00278 #define SL_OPCODE_NETAPP_MDNSGETHOSTBYSERVICEASYNCRESPONSE_V6 0x1A35 00279 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDR 0x9C26 00280 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDR_V6 0x9E26 00281 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDRRESPONSE 0x1C26 00282 #define SL_OPCODE_NETAPP_DNSGETHOSTBYADDRASYNCRESPONSE 0x1826 00283 #define SL_OPCODE_NETAPP_PINGSTART 0x9C21 00284 #define SL_OPCODE_NETAPP_PINGSTART_V6 0x9E21 00285 #define SL_OPCODE_NETAPP_PINGSTARTRESPONSE 0x1C21 00286 #define SL_OPCODE_NETAPP_PINGREPORTREQUEST 0x9C22 00287 #define SL_OPCODE_NETAPP_PINGREPORTREQUESTRESPONSE 0x1822 00288 #define SL_OPCODE_NETAPP_PINGSTOP 0x9C23 00289 #define SL_OPCODE_NETAPP_PINGSTOPRESPONSE 0x1C23 00290 #define SL_OPCODE_NETAPP_ARPFLUSH 0x9C24 00291 #define SL_OPCODE_NETAPP_ARPFLUSHRESPONSE 0x1C24 00292 #define SL_OPCODE_NETAPP_IPACQUIRED 0x1825 00293 #define SL_OPCODE_NETAPP_IPV4_LOST 0x1832 00294 #define SL_OPCODE_NETAPP_DHCP_IPV4_ACQUIRE_TIMEOUT 0x1833 00295 #define SL_OPCODE_NETAPP_IPACQUIRED_V6 0x1A25 00296 #define SL_OPCODE_NETAPP_IPERFSTARTCOMMAND 0x9C28 00297 #define SL_OPCODE_NETAPP_IPERFSTARTRESPONSE 0x1C28 00298 #define SL_OPCODE_NETAPP_IPERFSTOPCOMMAND 0x9C29 00299 #define SL_OPCODE_NETAPP_IPERFSTOPRESPONSE 0x1C29 00300 #define SL_OPCODE_NETAPP_CTESTSTARTCOMMAND 0x9C2A 00301 #define SL_OPCODE_NETAPP_CTESTSTARTRESPONSE 0x1C2A 00302 #define SL_OPCODE_NETAPP_CTESTASYNCRESPONSE 0x182A 00303 #define SL_OPCODE_NETAPP_CTESTSTOPCOMMAND 0x9C2B 00304 #define SL_OPCODE_NETAPP_CTESTSTOPRESPONSE 0x1C2B 00305 #define SL_OPCODE_NETAPP_IP_LEASED 0x182C 00306 #define SL_OPCODE_NETAPP_IP_RELEASED 0x182D 00307 #define SL_OPCODE_NETAPP_HTTPGETTOKENVALUE 0x182E 00308 #define SL_OPCODE_NETAPP_HTTPSENDTOKENVALUE 0x9C2F 00309 #define SL_OPCODE_NETAPP_HTTPPOSTTOKENVALUE 0x1830 00310 #define SL_OPCODE_NVMEM_FILEOPEN 0xA43C 00311 #define SL_OPCODE_NVMEM_FILEOPENRESPONSE 0x243C 00312 #define SL_OPCODE_NVMEM_FILECLOSE 0xA43D 00313 #define SL_OPCODE_NVMEM_FILECLOSERESPONSE 0x243D 00314 #define SL_OPCODE_NVMEM_FILEREADCOMMAND 0xA440 00315 #define SL_OPCODE_NVMEM_FILEREADRESPONSE 0x2440 00316 #define SL_OPCODE_NVMEM_FILEWRITECOMMAND 0xA441 00317 #define SL_OPCODE_NVMEM_FILEWRITERESPONSE 0x2441 00318 #define SL_OPCODE_NVMEM_FILEGETINFOCOMMAND 0xA442 00319 #define SL_OPCODE_NVMEM_FILEGETINFORESPONSE 0x2442 00320 #define SL_OPCODE_NVMEM_FILEDELCOMMAND 0xA443 00321 #define SL_OPCODE_NVMEM_FILEDELRESPONSE 0x2443 00322 #define SL_OPCODE_NVMEM_NVMEMFORMATCOMMAND 0xA444 00323 #define SL_OPCODE_NVMEM_NVMEMFORMATRESPONSE 0x2444 00324 00325 #define SL_OPCODE_DEVICE_SETDEBUGLEVELCOMMAND 0x846A 00326 #define SL_OPCODE_DEVICE_SETDEBUGLEVELRESPONSE 0x046A 00327 00328 #define SL_OPCODE_DEVICE_NETCFG_SET_COMMAND 0x8432 00329 #define SL_OPCODE_DEVICE_NETCFG_SET_RESPONSE 0x0432 00330 #define SL_OPCODE_DEVICE_NETCFG_GET_COMMAND 0x8433 00331 #define SL_OPCODE_DEVICE_NETCFG_GET_RESPONSE 0x0433 00332 /* */ 00333 #define SL_OPCODE_DEVICE_SETUARTMODECOMMAND 0x846B 00334 #define SL_OPCODE_DEVICE_SETUARTMODERESPONSE 0x046B 00335 #define SL_OPCODE_DEVICE_SSISIZESETCOMMAND 0x846B 00336 #define SL_OPCODE_DEVICE_SSISIZESETRESPONSE 0x046B 00337 00338 /* */ 00339 #define SL_OPCODE_DEVICE_EVENTMASKSET 0x8464 00340 #define SL_OPCODE_DEVICE_EVENTMASKSETRESPONSE 0x0464 00341 #define SL_OPCODE_DEVICE_EVENTMASKGET 0x8465 00342 #define SL_OPCODE_DEVICE_EVENTMASKGETRESPONSE 0x0465 00343 00344 #define SL_OPCODE_DEVICE_DEVICEGET 0x8466 00345 #define SL_OPCODE_DEVICE_DEVICEGETRESPONSE 0x0466 00346 #define SL_OPCODE_DEVICE_DEVICESET 0x84B7 00347 #define SL_OPCODE_DEVICE_DEVICESETRESPONSE 0x04B7 00348 00349 #define SL_OPCODE_WLAN_SCANRESULTSGETCOMMAND 0x8C8C 00350 #define SL_OPCODE_WLAN_SCANRESULTSGETRESPONSE 0x0C8C 00351 #define SL_OPCODE_WLAN_SMARTCONFIGOPTSET 0x8C8D 00352 #define SL_OPCODE_WLAN_SMARTCONFIGOPTSETRESPONSE 0x0C8D 00353 #define SL_OPCODE_WLAN_SMARTCONFIGOPTGET 0x8C8E 00354 #define SL_OPCODE_WLAN_SMARTCONFIGOPTGETRESPONSE 0x0C8E 00355 00356 00357 /* Rx Filters opcodes */ 00358 #define SL_OPCODE_WLAN_WLANRXFILTERADDCOMMAND 0x8C6C 00359 #define SL_OPCODE_WLAN_WLANRXFILTERADDRESPONSE 0x0C6C 00360 #define SL_OPCODE_WLAN_WLANRXFILTERSETCOMMAND 0x8C6D 00361 #define SL_OPCODE_WLAN_WLANRXFILTERSETRESPONSE 0x0C6D 00362 #define SL_OPCODE_WLAN_WLANRXFILTERGETSTATISTICSINFOCOMMAND 0x8C6E 00363 #define SL_OPCODE_WLAN_WLANRXFILTERGETSTATISTICSINFORESPONSE 0x0C6E 00364 #define SL_OPCODE_WLAN_WLANRXFILTERGETCOMMAND 0x8C6F 00365 #define SL_OPCODE_WLAN_WLANRXFILTERGETRESPONSE 0x0C6F 00366 #define SL_OPCODE_WLAN_WLANRXFILTERGETINFO 0x8C70 00367 #define SL_OPCODE_WLAN_WLANRXFILTERGETINFORESPONSE 0x0C70 00368 00369 00370 /******************************************************************************************/ 00371 /* Device structs */ 00372 /******************************************************************************************/ 00373 typedef _u32 InitStatus_t; 00374 00375 00376 typedef struct 00377 { 00378 _i32 Status; 00379 }InitComplete_t; 00380 00381 typedef struct 00382 { 00383 _i16 status; 00384 _u16 padding; 00385 00386 }_BasicResponse_t; 00387 00388 typedef struct 00389 { 00390 _u16 Timeout; 00391 _u16 padding; 00392 }_DevStopCommand_t; 00393 00394 typedef struct 00395 { 00396 _u32 group; 00397 _u32 mask; 00398 }_DevMaskEventSetCommand_t; 00399 00400 typedef _BasicResponse_t _DevMaskEventSetResponse_t; 00401 00402 00403 typedef struct 00404 { 00405 _u32 group; 00406 }_DevMaskEventGetCommand_t; 00407 00408 00409 typedef struct 00410 { 00411 _u32 group; 00412 _u32 mask; 00413 }_DevMaskEventGetResponse_t; 00414 00415 00416 typedef struct 00417 { 00418 _u32 group; 00419 }_DevStatusGetCommand_t; 00420 00421 00422 typedef struct 00423 { 00424 _u32 group; 00425 _u32 status; 00426 }_DevStatusGetResponse_t; 00427 00428 typedef struct 00429 { 00430 _u32 ChipId; 00431 _u32 FwVersion[4]; 00432 _u8 PhyVersion[4]; 00433 }_Device_VersionReadResponsePart_t; 00434 00435 typedef struct 00436 { 00437 _Device_VersionReadResponsePart_t part; 00438 _u32 NwpVersion[4]; 00439 _u16 RomVersion; 00440 _u16 Padding; 00441 }_Device_VersionReadResponseFull_t; 00442 00443 00444 typedef struct 00445 { 00446 _u32 BaudRate; 00447 _u8 FlowControlEnable; 00448 }_DevUartSetModeCommand_t; 00449 00450 typedef _BasicResponse_t _DevUartSetModeResponse_t; 00451 00452 /******************************************************/ 00453 00454 typedef struct 00455 { 00456 _u8 SsiSizeInBytes; 00457 _u8 Padding[3]; 00458 }_StellarisSsiSizeSet_t; 00459 00460 /*****************************************************************************************/ 00461 /* WLAN structs */ 00462 /*****************************************************************************************/ 00463 #define MAXIMAL_PASSWORD_LENGTH (64) 00464 00465 typedef struct{ 00466 _u8 SecType; 00467 _u8 SsidLen; 00468 _u8 Bssid[6]; 00469 _u8 PasswordLen; 00470 }_WlanConnectCommon_t; 00471 00472 #define SSID_STRING(pCmd) (_i8 *)((_WlanConnectCommon_t *)(pCmd) + 1) 00473 #define PASSWORD_STRING(pCmd) (SSID_STRING(pCmd) + ((_WlanConnectCommon_t *)(pCmd))->SsidLen) 00474 00475 typedef struct{ 00476 _WlanConnectCommon_t Common; 00477 _u8 UserLen; 00478 _u8 AnonUserLen; 00479 _u8 CertIndex; 00480 _u32 EapBitmask; 00481 }_WlanConnectEapCommand_t; 00482 00483 #define EAP_SSID_STRING(pCmd) (_i8 *)((_WlanConnectEapCommand_t *)(pCmd) + 1) 00484 #define EAP_PASSWORD_STRING(pCmd) (EAP_SSID_STRING(pCmd) + ((_WlanConnectEapCommand_t *)(pCmd))->Common.SsidLen) 00485 #define EAP_USER_STRING(pCmd) (EAP_PASSWORD_STRING(pCmd) + ((_WlanConnectEapCommand_t *)(pCmd))->Common.PasswordLen) 00486 #define EAP_ANON_USER_STRING(pCmd) (EAP_USER_STRING(pCmd) + ((_WlanConnectEapCommand_t *)(pCmd))->UserLen) 00487 00488 00489 typedef struct 00490 { 00491 _u8 PolicyType; 00492 _u8 Padding; 00493 _u8 PolicyOption; 00494 _u8 PolicyOptionLen; 00495 }_WlanPoliciySetGet_t; 00496 00497 00498 typedef struct{ 00499 _u32 minDwellTime; 00500 _u32 maxDwellTime; 00501 _u32 numProbeResponse; 00502 _u32 G_Channels_mask; 00503 _i32 rssiThershold; 00504 _i32 snrThershold; 00505 _i32 defaultTXPower; 00506 _u16 intervalList[16]; 00507 }_WlanScanParamSetCommand_t; 00508 00509 00510 typedef struct{ 00511 _i8 SecType; 00512 _u8 SsidLen; 00513 _u8 Priority; 00514 _u8 Bssid[6]; 00515 _u8 PasswordLen; 00516 _u8 WepKeyId; 00517 }_WlanAddGetProfile_t; 00518 00519 00520 typedef struct{ 00521 _WlanAddGetProfile_t Common; 00522 _u8 UserLen; 00523 _u8 AnonUserLen; 00524 _u8 CertIndex; 00525 _u16 padding; 00526 _u32 EapBitmask; 00527 }_WlanAddGetEapProfile_t; 00528 00529 00530 00531 00532 #define PROFILE_SSID_STRING(pCmd) ((_i8 *)((_WlanAddGetProfile_t *)(pCmd) + 1)) 00533 #define PROFILE_PASSWORD_STRING(pCmd) (PROFILE_SSID_STRING(pCmd) + ((_WlanAddGetProfile_t *)(pCmd))->SsidLen) 00534 00535 #define EAP_PROFILE_SSID_STRING(pCmd) (_i8 *)((_WlanAddGetEapProfile_t *)(pCmd) + 1) 00536 #define EAP_PROFILE_PASSWORD_STRING(pCmd) (EAP_PROFILE_SSID_STRING(pCmd) + ((_WlanAddGetEapProfile_t *)(pCmd))->Common.SsidLen) 00537 #define EAP_PROFILE_USER_STRING(pCmd) (EAP_PROFILE_PASSWORD_STRING(pCmd) + ((_WlanAddGetEapProfile_t *)(pCmd))->Common.PasswordLen) 00538 #define EAP_PROFILE_ANON_USER_STRING(pCmd) (EAP_PROFILE_USER_STRING(pCmd) + ((_WlanAddGetEapProfile_t *)(pCmd))->UserLen) 00539 00540 00541 00542 typedef struct 00543 { 00544 _u8 index; 00545 _u8 padding[3]; 00546 }_WlanProfileDelGetCommand_t; 00547 00548 typedef _BasicResponse_t _WlanGetNetworkListResponse_t; 00549 00550 typedef struct 00551 { 00552 _u8 index; 00553 _u8 count; 00554 _i8 padding[2]; 00555 }_WlanGetNetworkListCommand_t; 00556 00557 00558 00559 00560 typedef struct 00561 { 00562 _u32 groupIdBitmask; 00563 _u8 cipher; 00564 _u8 publicKeyLen; 00565 _u8 group1KeyLen; 00566 _u8 group2KeyLen; 00567 }_WlanSmartConfigStartCommand_t; 00568 00569 #define SMART_CONFIG_START_PUBLIC_KEY_STRING(pCmd) ((_i8 *)((_WlanSmartConfigStartCommand_t *)(pCmd) + 1)) 00570 #define SMART_CONFIG_START_GROUP1_KEY_STRING(pCmd) ((_i8 *) (SMART_CONFIG_START_PUBLIC_KEY_STRING(pCmd) + ((_WlanSmartConfigStartCommand_t *)(pCmd))->publicKeyLen)) 00571 #define SMART_CONFIG_START_GROUP2_KEY_STRING(pCmd) ((_i8 *) (SMART_CONFIG_START_GROUP1_KEY_STRING(pCmd) + ((_WlanSmartConfigStartCommand_t *)(pCmd))->group1KeyLen)) 00572 00573 00574 00575 typedef struct 00576 { 00577 _u8 mode; 00578 _u8 padding[3]; 00579 }_WlanSetMode_t; 00580 00581 00582 00583 00584 typedef struct 00585 { 00586 _u16 Status; 00587 _u16 ConfigId; 00588 _u16 ConfigOpt; 00589 _u16 ConfigLen; 00590 }_WlanCfgSetGet_t; 00591 00592 00593 /* ******************************************************************************/ 00594 /* RX filters - Start */ 00595 /* ******************************************************************************/ 00596 /* -- 80 bytes */ 00597 typedef struct _WlanRxFilterAddCommand_t 00598 { 00599 /* -- 1 byte */ 00600 SlrxFilterRuleType_t RuleType; 00601 /* -- 1 byte */ 00602 SlrxFilterFlags_t FilterFlags; 00603 /* -- 1 byte */ 00604 SlrxFilterID_t FilterId; 00605 /* -- 1 byte */ 00606 _u8 Padding; 00607 /* -- 56 byte */ 00608 SlrxFilterRule_t Rule; 00609 /* -- 12 byte ( 3 padding ) */ 00610 SlrxFilterTrigger_t Trigger; 00611 /* -- 8 byte */ 00612 SlrxFilterAction_t Action; 00613 }_WlanRxFilterAddCommand_t; 00614 00615 00616 00617 /* -- 4 bytes */ 00618 typedef struct l_WlanRxFilterAddCommandReponse_t 00619 { 00620 /* -- 1 byte */ 00621 SlrxFilterID_t FilterId; 00622 /* -- 1 Byte */ 00623 _u8 Status; 00624 /* -- 2 byte */ 00625 _u8 Padding[2]; 00626 00627 }_WlanRxFilterAddCommandReponse_t; 00628 00629 00630 00631 /* 00632 * \struct _WlanRxFilterSetCommand_t 00633 */ 00634 typedef struct _WlanRxFilterSetCommand_t 00635 { 00636 _u16 InputBufferLength; 00637 /* 1 byte */ 00638 SLrxFilterOperation_t RxFilterOperation; 00639 _u8 Padding[1]; 00640 }_WlanRxFilterSetCommand_t; 00641 00642 /** 00643 * \struct _WlanRxFilterSetCommandReponse_t 00644 */ 00645 typedef struct _WlanRxFilterSetCommandReponse_t 00646 { 00647 /* 1 byte */ 00648 _u8 Status; 00649 /* 3 bytes */ 00650 _u8 Padding[3]; 00651 00652 }_WlanRxFilterSetCommandReponse_t; 00653 00654 /** 00655 * \struct _WlanRxFilterGetCommand_t 00656 */ 00657 typedef struct _WlanRxFilterGetCommand_t 00658 { 00659 _u16 OutputBufferLength; 00660 /* 1 byte */ 00661 SLrxFilterOperation_t RxFilterOperation; 00662 _u8 Padding[1]; 00663 }_WlanRxFilterGetCommand_t; 00664 00665 /** 00666 * \struct _WlanRxFilterGetCommandReponse_t 00667 */ 00668 typedef struct _WlanRxFilterGetCommandReponse_t 00669 { 00670 /* 1 byte */ 00671 _u8 Status; 00672 /* 1 bytes */ 00673 _u8 Padding; 00674 /* 2 byte */ 00675 _u16 OutputBufferLength; 00676 00677 }_WlanRxFilterGetCommandReponse_t; 00678 00679 00680 00681 /* ******************************************************************************/ 00682 /* RX filters -- End */ 00683 /* ******************************************************************************/ 00684 00685 typedef struct 00686 { 00687 _u16 status; 00688 _u8 WlanRole; /* 0 = station, 2 = AP */ 00689 _u8 Ipv6Enabled; 00690 _u8 Ipv6DhcpEnabled; 00691 00692 _u32 ipV6Global[4]; 00693 _u32 ipV6Local[4]; 00694 _u32 ipV6DnsServer[4]; 00695 _u8 Ipv6DhcpState; 00696 00697 }_NetappIpV6configRetArgs_t; 00698 00699 00700 typedef struct 00701 { 00702 _u8 ipV4[4]; 00703 _u8 ipV4Mask[4]; 00704 _u8 ipV4Gateway[4]; 00705 _u8 ipV4DnsServer[4]; 00706 _u8 ipV4Start[4]; 00707 _u8 ipV4End[4]; 00708 }_NetCfgIpV4AP_Args_t; 00709 00710 00711 00712 typedef struct 00713 { 00714 _u16 status; 00715 _u8 MacAddr[6]; 00716 } _MAC_Address_SetGet_t; 00717 00718 00719 typedef struct 00720 { 00721 _u16 Status; 00722 _u16 ConfigId; 00723 _u16 ConfigOpt; 00724 _u16 ConfigLen; 00725 }_NetCfgSetGet_t; 00726 00727 typedef struct 00728 { 00729 _u16 Status; 00730 _u16 DeviceSetId; 00731 _u16 Option; 00732 _u16 ConfigLen; 00733 }_DeviceSetGet_t; 00734 00735 00736 00737 00738 /******************************************************************************************/ 00739 /* Socket structs */ 00740 /******************************************************************************************/ 00741 00742 typedef struct 00743 { 00744 _u8 Domain; 00745 _u8 Type; 00746 _u8 Protocol; 00747 _u8 Padding; 00748 }_SocketCommand_t; 00749 00750 00751 typedef struct 00752 { 00753 _i16 statusOrLen; 00754 _u8 sd; 00755 _u8 padding; 00756 }_SocketResponse_t; 00757 00758 typedef struct 00759 { 00760 _u8 sd; 00761 _u8 family; 00762 _u8 padding1; 00763 _u8 padding2; 00764 }_AcceptCommand_t; 00765 00766 00767 typedef struct 00768 { 00769 _i16 statusOrLen; 00770 _u8 sd; 00771 _u8 family; 00772 _u16 port; 00773 _u16 paddingOrAddr; 00774 _u32 address; 00775 }_SocketAddrAsyncIPv4Response_t; 00776 00777 typedef struct 00778 { 00779 _i16 statusOrLen; 00780 _u8 sd; 00781 _u8 family; 00782 _u16 port; 00783 _u8 address[6]; 00784 }_SocketAddrAsyncIPv6EUI48Response_t; 00785 typedef struct 00786 { 00787 _i16 statusOrLen; 00788 _u8 sd; 00789 _u8 family; 00790 _u16 port; 00791 _u16 paddingOrAddr; 00792 _u32 address[4]; 00793 }_SocketAddrAsyncIPv6Response_t; 00794 00795 00796 typedef struct 00797 { 00798 _i16 lenOrPadding; 00799 _u8 sd; 00800 _u8 FamilyAndFlags; 00801 _u16 port; 00802 _u16 paddingOrAddr; 00803 _u32 address; 00804 }_SocketAddrIPv4Command_t; 00805 00806 typedef struct 00807 { 00808 _i16 lenOrPadding; 00809 _u8 sd; 00810 _u8 FamilyAndFlags; 00811 _u16 port; 00812 _u8 address[6]; 00813 }_SocketAddrIPv6EUI48Command_t; 00814 typedef struct 00815 { 00816 _i16 lenOrPadding; 00817 _u8 sd; 00818 _u8 FamilyAndFlags; 00819 _u16 port; 00820 _u16 paddingOrAddr; 00821 _u32 address[4]; 00822 }_SocketAddrIPv6Command_t; 00823 00824 typedef union { 00825 _SocketAddrIPv4Command_t IpV4; 00826 _SocketAddrIPv6EUI48Command_t IpV6EUI48; 00827 #ifdef SL_SUPPORT_IPV6 00828 _SocketAddrIPv6Command_t IpV6; 00829 #endif 00830 } _SocketAddrCommand_u; 00831 00832 typedef union { 00833 _SocketAddrAsyncIPv4Response_t IpV4; 00834 _SocketAddrAsyncIPv6EUI48Response_t IpV6EUI48; 00835 #ifdef SL_SUPPORT_IPV6 00836 _SocketAddrAsyncIPv6Response_t IpV6; 00837 #endif 00838 } _SocketAddrResponse_u; 00839 00840 typedef struct 00841 { 00842 _u8 sd; 00843 _u8 backlog; 00844 _u8 padding1; 00845 _u8 padding2; 00846 }_ListenCommand_t; 00847 00848 typedef struct 00849 { 00850 _u8 sd; 00851 _u8 padding0; 00852 _u8 padding1; 00853 _u8 padding2; 00854 }_CloseCommand_t; 00855 00856 00857 typedef struct 00858 { 00859 _u8 nfds; 00860 _u8 readFdsCount; 00861 _u8 writeFdsCount; 00862 _u8 padding; 00863 _u16 readFds; 00864 _u16 writeFds; 00865 _u16 tv_usec; 00866 _u16 tv_sec; 00867 }_SelectCommand_t; 00868 00869 00870 typedef struct 00871 { 00872 _u16 status; 00873 _u8 readFdsCount; 00874 _u8 writeFdsCount; 00875 _u16 readFds; 00876 _u16 writeFds; 00877 }_SelectAsyncResponse_t; 00878 00879 typedef struct 00880 { 00881 _u8 sd; 00882 _u8 level; 00883 _u8 optionName; 00884 _u8 optionLen; 00885 }_setSockOptCommand_t; 00886 00887 typedef struct 00888 { 00889 _u8 sd; 00890 _u8 level; 00891 _u8 optionName; 00892 _u8 optionLen; 00893 }_getSockOptCommand_t; 00894 00895 typedef struct 00896 { 00897 _i16 status; 00898 _u8 sd; 00899 _u8 optionLen; 00900 }_getSockOptResponse_t; 00901 00902 00903 typedef struct 00904 { 00905 _u16 StatusOrLen; 00906 _u8 sd; 00907 _u8 FamilyAndFlags; 00908 }_sendRecvCommand_t; 00909 00910 /***************************************************************************************** 00911 * NETAPP structs 00912 ******************************************************************************************/ 00913 00914 00915 typedef _BasicResponse_t _NetAppStartStopResponse_t; 00916 00917 typedef struct 00918 { 00919 _u32 appId; 00920 }_NetAppStartStopCommand_t; 00921 00922 typedef struct 00923 { 00924 _u16 Status; 00925 _u16 AppId; 00926 _u16 ConfigOpt; 00927 _u16 ConfigLen; 00928 }_NetAppSetGet_t; 00929 typedef struct 00930 { 00931 _u16 port_number; 00932 } _NetAppHttpServerGetSet_port_num_t; 00933 00934 typedef struct 00935 { 00936 _u8 auth_enable; 00937 }_NetAppHttpServerGetSet_auth_enable_t; 00938 00939 typedef struct _sl_NetAppHttpServerGetToken_t 00940 { 00941 _u8 token_name_len; 00942 _u8 padd1; 00943 _u16 padd2; 00944 }sl_NetAppHttpServerGetToken_t; 00945 00946 typedef struct _sl_NetAppHttpServerSendToken_t 00947 { 00948 _u8 token_value_len; 00949 _u8 token_name_len; 00950 _u8 token_name[MAX_TOKEN_NAME_LEN]; 00951 _u16 padd; 00952 }sl_NetAppHttpServerSendToken_t; 00953 00954 typedef struct _sl_NetAppHttpServerPostToken_t 00955 { 00956 _u8 post_action_len; 00957 _u8 token_name_len; 00958 _u8 token_value_len; 00959 _u8 padding; 00960 }sl_NetAppHttpServerPostToken_t; 00961 00962 00963 typedef struct 00964 { 00965 _u16 Len; 00966 _u8 family; 00967 _u8 padding; 00968 }_GetHostByNameCommand_t; 00969 00970 typedef struct 00971 { 00972 _u16 status; 00973 _u16 padding; 00974 _u32 ip0; 00975 _u32 ip1; 00976 _u32 ip2; 00977 _u32 ip3; 00978 }_GetHostByNameIPv6AsyncResponse_t; 00979 00980 typedef struct 00981 { 00982 _u16 status; 00983 _u8 padding1; 00984 _u8 padding2; 00985 _u32 ip0; 00986 }_GetHostByNameIPv4AsyncResponse_t; 00987 00988 00989 00990 00991 typedef enum 00992 { 00993 CTST_BSD_UDP_TX, 00994 CTST_BSD_UDP_RX, 00995 CTST_BSD_TCP_TX, 00996 CTST_BSD_TCP_RX, 00997 CTST_BSD_TCP_SERVER_BI_DIR, 00998 CTST_BSD_TCP_CLIENT_BI_DIR, 00999 CTST_BSD_UDP_BI_DIR, 01000 CTST_BSD_RAW_TX, 01001 CTST_BSD_RAW_RX, 01002 CTST_BSD_RAW_BI_DIR, 01003 CTST_BSD_SECURED_TCP_TX, 01004 CTST_BSD_SECURED_TCP_RX, 01005 CTST_BSD_SECURED_TCP_SERVER_BI_DIR, 01006 CTST_BSD_SECURED_TCP_CLIENT_BI_DIR 01007 }CommTest_e; 01008 01009 typedef struct _sl_protocol_CtestStartCommand_t 01010 { 01011 _u32 Test; 01012 _u16 DestPort; 01013 _u16 SrcPort; 01014 _u32 DestAddr[4]; 01015 _u32 PayloadSize; 01016 _u32 timeout; 01017 _u32 csEnabled; 01018 _u32 secure; 01019 _u32 rawProtocol; 01020 _u8 reserved1[4]; 01021 }_CtestStartCommand_t; 01022 01023 typedef struct 01024 { 01025 _u8 test; 01026 _u8 socket; 01027 _i16 status; 01028 _u32 startTime; 01029 _u32 endTime; 01030 _u16 txKbitsSec; 01031 _u16 rxKbitsSec; 01032 _u32 outOfOrderPackets; 01033 _u32 missedPackets; 01034 _i16 token; 01035 }_CtestAsyncResponse_t; 01036 01037 typedef struct 01038 { 01039 _u32 pingIntervalTime; 01040 _u16 PingSize; 01041 _u16 pingRequestTimeout; 01042 _u32 totalNumberOfAttempts; 01043 _u32 flags; 01044 _u32 ip0; 01045 _u32 ip1OrPaadding; 01046 _u32 ip2OrPaadding; 01047 _u32 ip3OrPaadding; 01048 }_PingStartCommand_t; 01049 01050 typedef struct 01051 { 01052 _u16 status; 01053 _u16 rttMin; 01054 _u16 rttMax; 01055 _u16 rttAvg; 01056 _u32 numSuccsessPings; 01057 _u32 numSendsPings; 01058 _u32 testTime; 01059 }_PingReportResponse_t; 01060 01061 01062 typedef struct 01063 { 01064 _u32 ip; 01065 _u32 gateway; 01066 _u32 dns; 01067 }_IpV4AcquiredAsync_t; 01068 01069 01070 typedef enum 01071 { 01072 ACQUIRED_IPV6_LOCAL = 1, 01073 ACQUIRED_IPV6_GLOBAL 01074 }IpV6AcquiredType_e; 01075 01076 01077 typedef struct 01078 { 01079 _u32 type; 01080 _u32 ip[4]; 01081 _u32 gateway[4]; 01082 _u32 dns[4]; 01083 }_IpV6AcquiredAsync_t; 01084 01085 01086 typedef union 01087 { 01088 _SocketCommand_t EventMask; 01089 _sendRecvCommand_t DeviceInit; 01090 }_device_commands_t; 01091 01092 /***************************************************************************************** 01093 * FS structs 01094 ******************************************************************************************/ 01095 01096 typedef struct 01097 { 01098 _u32 FileHandle; 01099 _u32 Offset; 01100 _u16 Len; 01101 _u16 Padding; 01102 }_FsReadCommand_t; 01103 01104 typedef struct 01105 { 01106 _u32 Mode; 01107 _u32 Token; 01108 }_FsOpenCommand_t; 01109 01110 typedef struct 01111 { 01112 _u32 FileHandle; 01113 _u32 Token; 01114 }_FsOpenResponse_t; 01115 01116 01117 typedef struct 01118 { 01119 _u32 FileHandle; 01120 _u32 CertificFileNameLength; 01121 _u32 SignatureLen; 01122 }_FsCloseCommand_t; 01123 01124 01125 typedef _BasicResponse_t _FsReadResponse_t; 01126 typedef _BasicResponse_t _FsDeleteResponse_t; 01127 typedef _BasicResponse_t _FsCloseResponse_t; 01128 01129 typedef struct 01130 { 01131 _u16 Status; 01132 _u16 flags; 01133 _u32 FileLen; 01134 _u32 AllocatedLen; 01135 _u32 Token[4]; 01136 }_FsGetInfoResponse_t; 01137 01138 typedef struct 01139 { 01140 _u8 DeviceID; 01141 _u8 Padding[3]; 01142 }_FsFormatCommand_t; 01143 01144 typedef _BasicResponse_t _FsFormatResponse_t; 01145 01146 typedef struct 01147 { 01148 _u32 Token; 01149 }_FsDeleteCommand_t; 01150 01151 typedef _FsDeleteCommand_t _FsGetInfoCommand_t; 01152 01153 typedef struct 01154 { 01155 _u32 FileHandle; 01156 _u32 Offset; 01157 _u16 Len; 01158 _u16 Padding; 01159 }_FsWriteCommand_t; 01160 01161 typedef _BasicResponse_t _FsWriteResponse_t; 01162 01163 01164 01165 /* TODO: Set MAx Async Payload length depending on flavor (Tiny, Small, etc.) */ 01166 01167 01168 #ifdef SL_TINY_EXT 01169 #define SL_ASYNC_MAX_PAYLOAD_LEN 120 /* size must be aligned to 4 */ 01170 #else 01171 #define SL_ASYNC_MAX_PAYLOAD_LEN 160 /* size must be aligned to 4 */ 01172 #endif 01173 01174 #define SL_ASYNC_MAX_MSG_LEN (_SL_RESP_HDR_SIZE + SL_ASYNC_MAX_PAYLOAD_LEN) 01175 01176 #define RECV_ARGS_SIZE (sizeof(_SocketResponse_t)) 01177 #define RECVFROM_IPV4_ARGS_SIZE (sizeof(_SocketAddrAsyncIPv4Response_t)) 01178 #define RECVFROM_IPV6_ARGS_SIZE (sizeof(_SocketAddrAsyncIPv6Response_t)) 01179 01180 #define SL_IPV4_ADDRESS_SIZE (sizeof(_u32)) 01181 #define SL_IPV6_ADDRESS_SIZE (4 * sizeof(_u32)) 01182 01183 #endif /* _SL_PROTOCOL_TYPES_H_ */
Generated on Tue Jul 12 2022 12:06:49 by 1.7.2