1 /*
2  * errors.h - CC31xx/CC32xx Host Driver Implementation
3  *
4  * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
5  *
6  *
7  *  Redistribution and use in source and binary forms, with or without
8  *  modification, are permitted provided that the following conditions
9  *  are met:
10  *
11  *    Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  *
14  *    Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the
17  *    distribution.
18  *
19  *    Neither the name of Texas Instruments Incorporated nor the names of
20  *    its contributors may be used to endorse or promote products derived
21  *    from this software without specific prior written permission.
22  *
23  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  *
35 */
36 
37 
38 
39 #ifndef __ERROR_H__
40 #define __ERROR_H__
41 
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 
48 #define SL_RET_CODE_OK                                                  (0L)    /* Success */
49 
50 #define SL_ERROR_GENERAL_DEVICE                                         (-6L)   /* General device error */
51 
52 /* BSD SOCKET ERRORS CODES */
53 
54 #define SL_ERROR_BSD_SOC_ERROR                                          (-1L)   /* Failure */
55 #define SL_ERROR_BSD_EINTR                                              (-4L)   /* Interrupted system call */
56 #define SL_ERROR_BSD_E2BIG                                              (-7L)   /* length too big */
57 #define SL_ERROR_BSD_INEXE                                              (-8L)   /* socket command in execution  */
58 #define SL_ERROR_BSD_EBADF                                              (-9L)   /* Bad file number */
59 #define SL_ERROR_BSD_ENSOCK                                             (-10L)  /* The system limit on the total number of open socket, has been reached */
60 #define SL_ERROR_BSD_EAGAIN                                             (-11L)  /* Try again */
61 #define SL_ERROR_BSD_EWOULDBLOCK                                        SL_ERROR_BSD_EAGAIN
62 #define SL_ERROR_BSD_ENOMEM                                             (-12L)  /* Out of memory */
63 #define SL_ERROR_BSD_EACCES                                             (-13L)  /* Permission denied */
64 #define SL_ERROR_BSD_EFAULT                                             (-14L)  /* Bad address */
65 #define SL_ERROR_BSD_ECLOSE                                             (-15L)  /* close socket operation failed to transmit all queued packets */
66 #define SL_ERROR_BSD_EALREADY_ENABLED                                   (-21L)  /* Transceiver - Transceiver already ON. there could be only one */
67 #define SL_ERROR_BSD_EINVAL                                             (-22L)  /* Invalid argument */
68 #define SL_ERROR_BSD_EAUTO_CONNECT_OR_CONNECTING                        (-69L)  /* Transceiver - During connection, connected or auto mode started */
69 #define SL_ERROR_BSD_CONNECTION_PENDING                                 (-72L)  /* Transceiver - Device is connected, disconnect first to open transceiver */
70 #define SL_ERROR_BSD_EUNSUPPORTED_ROLE                                  (-86L)  /* Transceiver - Trying to start when WLAN role is AP or P2P GO */
71 #define SL_ERROR_BSD_EDESTADDRREQ                                       (-89L)  /* Destination address required */
72 #define SL_ERROR_BSD_EPROTOTYPE                                         (-91L)  /* Protocol wrong type for socket */
73 #define SL_ERROR_BSD_ENOPROTOOPT                                        (-92L)  /* Protocol not available */
74 #define SL_ERROR_BSD_EPROTONOSUPPORT                                    (-93L)  /* Protocol not supported */
75 #define SL_ERROR_BSD_ESOCKTNOSUPPORT                                    (-94L)  /* Socket type not supported */
76 #define SL_ERROR_BSD_EOPNOTSUPP                                         (-95L)  /* Operation not supported on transport endpoint */
77 #define SL_ERROR_BSD_EAFNOSUPPORT                                       (-97L)  /* Address family not supported by protocol */
78 #define SL_ERROR_BSD_EADDRINUSE                                         (-98L)  /* Address already in use */
79 #define SL_ERROR_BSD_EADDRNOTAVAIL                                      (-99L)  /* Cannot assign requested address */
80 #define SL_ERROR_BSD_ENETUNREACH                                        (-101L) /* Network is unreachable */
81 #define SL_ERROR_BSD_ENOBUFS                                            (-105L) /* No buffer space available */
82 #define SL_ERROR_BSD_EOBUFF                                             SL_ENOBUFS
83 #define SL_ERROR_BSD_EISCONN                                            (-106L) /* Transport endpoint is already connected */
84 #define SL_ERROR_BSD_ENOTCONN                                           (-107L) /* Transport endpoint is not connected */
85 #define SL_ERROR_BSD_ETIMEDOUT                                          (-110L) /* Connection timed out */
86 #define SL_ERROR_BSD_ECONNREFUSED                                       (-111L) /* Connection refused */
87 #define SL_ERROR_BSD_EALREADY                                           (-114L) /* Non blocking connect in progress, try again */
88 
89 /* ssl tls security start with -300 offset */
90 #define SL_ERROR_BSD_ESEC_CLOSE_NOTIFY                                  (-300L) /* ssl/tls alerts */
91 #define SL_ERROR_BSD_ESEC_UNEXPECTED_MESSAGE                            (-310L) /* ssl/tls alerts */
92 #define SL_ERROR_BSD_ESEC_BAD_RECORD_MAC                                (-320L) /* ssl/tls alerts */
93 #define SL_ERROR_BSD_ESEC_DECRYPTION_FAILED                             (-321L) /* ssl/tls alerts */
94 #define SL_ERROR_BSD_ESEC_RECORD_OVERFLOW                               (-322L) /* ssl/tls alerts */
95 #define SL_ERROR_BSD_ESEC_DECOMPRESSION_FAILURE                         (-330L) /* ssl/tls alerts */
96 #define SL_ERROR_BSD_ESEC_HANDSHAKE_FAILURE                             (-340L) /* ssl/tls alerts */
97 #define SL_ERROR_BSD_ESEC_NO_CERTIFICATE                                (-341L) /* ssl/tls alerts */
98 #define SL_ERROR_BSD_ESEC_BAD_CERTIFICATE                               (-342L) /* ssl/tls alerts */
99 #define SL_ERROR_BSD_ESEC_UNSUPPORTED_CERTIFICATE                       (-343L) /* ssl/tls alerts */
100 #define SL_ERROR_BSD_ESEC_CERTIFICATE_REVOKED                           (-344L) /* ssl/tls alerts */
101 #define SL_ERROR_BSD_ESEC_CERTIFICATE_EXPIRED                           (-345L) /* ssl/tls alerts */
102 #define SL_ERROR_BSD_ESEC_CERTIFICATE_UNKNOWN                           (-346L) /* ssl/tls alerts */
103 
104 #define SL_ERROR_BSD_ESEC_ILLEGAL_PARAMETER                             (-347L) /* ssl/tls alerts */
105 #define SL_ERROR_BSD_ESEC_ACCESS_DENIED                                 (-349L) /* ssl/tls alerts */
106 #define SL_ERROR_BSD_ESEC_DECODE_ERROR                                  (-350L) /* ssl/tls alerts */
107 #define SL_ERROR_BSD_ESEC_DECRYPT_ERROR1                                (-351L) /* ssl/tls alerts */
108 #define SL_ERROR_BSD_ESEC_EXPORT_RESTRICTION                            (-360L) /* ssl/tls alerts */
109 #define SL_ERROR_BSD_ESEC_PROTOCOL_VERSION                              (-370L) /* ssl/tls alerts */
110 #define SL_ERROR_BSD_ESEC_INSUFFICIENT_SECURITY                         (-371L) /* ssl/tls alerts */
111 #define SL_ERROR_BSD_ESEC_INTERNAL_ERROR                                (-380L) /* ssl/tls alerts */
112 #define SL_ERROR_BSD_ESEC_USER_CANCELLED                                (-390L) /* ssl/tls alerts */
113 #define SL_ERROR_BSD_ESEC_NO_RENEGOTIATION                              (-400L) /* ssl/tls alerts */
114 #define SL_ERROR_BSD_ESEC_UNSUPPORTED_EXTENSION                         (-410L) /* ssl/tls alerts */
115 #define SL_ERROR_BSD_ESEC_CERTIFICATE_UNOBTAINABLE                      (-411L) /* ssl/tls alerts */
116 #define SL_ERROR_BSD_ESEC_UNRECOGNIZED_NAME                             (-412L) /* ssl/tls alerts */
117 #define SL_ERROR_BSD_ESEC_BAD_CERTIFICATE_STATUS_RESPONSE               (-413L) /* ssl/tls alerts */
118 #define SL_ERROR_BSD_ESEC_BAD_CERTIFICATE_HASH_VALUE                    (-414L) /* ssl/tls alerts */
119 /* propriety secure */
120 #define SL_ERROR_BSD_ESECGENERAL                                        (-450L) /* error secure level general error */
121 #define SL_ERROR_BSD_ESECDECRYPT                                        (-451L) /* error secure level, decrypt recv packet fail */
122 #define SL_ERROR_BSD_ESECCLOSED                                         (-452L) /* secure layrer is closed by other size , tcp is still connected  */
123 #define SL_ERROR_BSD_ESECSNOVERIFY                                      (-453L) /* Connected without server verification */
124 #define SL_ERROR_BSD_ESECNOCAFILE                                       (-454L) /* error secure level CA file not found*/
125 #define SL_ERROR_BSD_ESECMEMORY                                         (-455L) /* error secure level No memory  space available */
126 #define SL_ERROR_BSD_ESECBADCAFILE                                      (-456L) /* error secure level bad CA file */
127 #define SL_ERROR_BSD_ESECBADCERTFILE                                    (-457L) /* error secure level bad Certificate file */
128 #define SL_ERROR_BSD_ESECBADPRIVATEFILE                                 (-458L) /* error secure level bad private file */
129 #define SL_ERROR_BSD_ESECBADDHFILE                                      (-459L) /* error secure level bad DH file */
130 #define SL_ERROR_BSD_ESECT00MANYSSLOPENED                               (-460L) /* MAX SSL Sockets are opened */
131 #define SL_ERROR_BSD_ESECDATEERROR                                      (-461L) /* connected with certificate date verification error */
132 #define SL_ERROR_BSD_ESECHANDSHAKETIMEDOUT                              (-462L) /* connection timed out due to handshake time */
133 #define SL_ERROR_BSD_ESECTXBUFFERNOTEMPTY                               (-463L) /* cannot start ssl connection while send buffer is full */
134 #define SL_ERROR_BSD_ESECRXBUFFERNOTEMPTY                               (-464L) /* cannot start ssl connection while recv buffer is full */
135 #define SL_ERROR_BSD_ESECSSLDURINGHANDSHAKE                             (-465L) /* cannot use while in hanshaking */
136 #define SL_ERROR_BSD_ESECNOTALLOWEDWHENLISTENING                        (-466L) /* the operation is not allowed when listening, do before listen*/
137 #define SL_ERROR_BSD_ESECCERTIFICATEREVOKED                             (-467L) /* connected but on of the certificates in the chain is revoked */
138 #define SL_ERROR_BSD_ESECUNKNOWNROOTCA                                  (-468L) /* connected but the root CA used to validate the peer is unknown */
139 #define SL_ERROR_BSD_ESECWRONGPEERCERT                                  (-469L) /* wrong peer cert (server cert) was received while trying to connect to server */
140 #define SL_ERROR_BSD_ESECTCPDISCONNECTEDUNCOMPLETERECORD                (-470L) /* the other side disconnected the TCP layer and didn't send the whole ssl record */
141 
142 #define SL_ERROR_BSD_ESEC_BUFFER_E                                      (-632L) /* output buffer too small or input too large */
143 #define SL_ERROR_BSD_ESEC_ALGO_ID_E                                     (-633L) /* setting algo id error */
144 #define SL_ERROR_BSD_ESEC_PUBLIC_KEY_E                                  (-634L) /* setting public key error */
145 #define SL_ERROR_BSD_ESEC_DATE_E                                        (-635L) /* setting date validity error */
146 #define SL_ERROR_BSD_ESEC_SUBJECT_E                                     (-636L) /* setting subject name error */
147 #define SL_ERROR_BSD_ESEC_ISSUER_E                                      (-637L) /* setting issuer  name error */
148 #define SL_ERROR_BSD_ESEC_CA_TRUE_E                                     (-638L) /* setting CA basic constraint true error */
149 #define SL_ERROR_BSD_ESEC_EXTENSIONS_E                                  (-639L) /* setting extensions error */
150 #define SL_ERROR_BSD_ESEC_ASN_PARSE_E                                   (-640L) /* ASN parsing error, invalid input */
151 #define SL_ERROR_BSD_ESEC_ASN_VERSION_E                                 (-641L) /* ASN version error, invalid number */
152 #define SL_ERROR_BSD_ESEC_ASN_GETINT_E                                  (-642L) /* ASN get big int error, invalid data */
153 #define SL_ERROR_BSD_ESEC_ASN_RSA_KEY_E                                 (-643L) /* ASN key init error, invalid input */
154 #define SL_ERROR_BSD_ESEC_ASN_OBJECT_ID_E                               (-644L) /* ASN object id error, invalid id */
155 #define SL_ERROR_BSD_ESEC_ASN_TAG_NULL_E                                (-645L) /* ASN tag error, not null */
156 #define SL_ERROR_BSD_ESEC_ASN_EXPECT_0_E                                (-646L) /* ASN expect error, not zero */
157 #define SL_ERROR_BSD_ESEC_ASN_BITSTR_E                                  (-647L) /* ASN bit string error, wrong id */
158 #define SL_ERROR_BSD_ESEC_ASN_UNKNOWN_OID_E                             (-648L) /* ASN oid error, unknown sum id */
159 #define SL_ERROR_BSD_ESEC_ASN_DATE_SZ_E                                 (-649L) /* ASN date error, bad size */
160 #define SL_ERROR_BSD_ESEC_ASN_BEFORE_DATE_E                             (-650L) /* ASN date error, current date before */
161 #define SL_ERROR_BSD_ESEC_ASN_AFTER_DATE_E                              (-651L) /* ASN date error, current date after */
162 #define SL_ERROR_BSD_ESEC_ASN_SIG_OID_E                                 (-652L) /* ASN signature error, mismatched oid */
163 #define SL_ERROR_BSD_ESEC_ASN_TIME_E                                    (-653L) /* ASN time error, unknown time type */
164 #define SL_ERROR_BSD_ESEC_ASN_INPUT_E                                   (-654L) /* ASN input error, not enough data */
165 #define SL_ERROR_BSD_ESEC_ASN_SIG_CONFIRM_E                             (-655L) /* ASN sig error, confirm failure */
166 #define SL_ERROR_BSD_ESEC_ASN_SIG_HASH_E                                (-656L) /* ASN sig error, unsupported hash type */
167 #define SL_ERROR_BSD_ESEC_ASN_SIG_KEY_E                                 (-657L) /* ASN sig error, unsupported key type */
168 #define SL_ERROR_BSD_ESEC_ASN_DH_KEY_E                                  (-658L) /* ASN key init error, invalid input */
169 #define SL_ERROR_BSD_ESEC_ASN_NTRU_KEY_E                                (-659L) /* ASN ntru key decode error, invalid input */
170 #define SL_ERROR_BSD_ESEC_ASN_CRIT_EXT_E                                (-660L) /* ASN unsupported critical extension */
171 #define SL_ERROR_BSD_ESEC_ECC_BAD_ARG_E                                 (-670L) /* ECC input argument of wrong type */
172 #define SL_ERROR_BSD_ESEC_ASN_ECC_KEY_E                                 (-671L) /* ASN ECC bad input */
173 #define SL_ERROR_BSD_ESEC_ECC_CURVE_OID_E                               (-672L) /* Unsupported ECC OID curve type */
174 #define SL_ERROR_BSD_ESEC_BAD_FUNC_ARG                                  (-673L) /* Bad function argument provided */
175 #define SL_ERROR_BSD_ESEC_NOT_COMPILED_IN                               (-674L) /* Feature not compiled in */
176 #define SL_ERROR_BSD_ESEC_UNICODE_SIZE_E                                (-675L) /* Unicode password too big */
177 #define SL_ERROR_BSD_ESEC_NO_PASSWORD                                   (-676L) /* no password provided by user */
178 #define SL_ERROR_BSD_ESEC_ALT_NAME_E                                    (-677L) /* alt name size problem, too big */
179 #define SL_ERROR_BSD_ESEC_ASN_NO_SIGNER_E                               (-688L) /* ASN no signer to confirm failure */
180 #define SL_ERROR_BSD_ESEC_ASN_CRL_CONFIRM_E                             (-689L) /* ASN CRL signature confirm failure */
181 #define SL_ERROR_BSD_ESEC_ASN_CRL_NO_SIGNER_E                           (-690L) /* ASN CRL no signer to confirm failure */
182 #define SL_ERROR_BSD_ESEC_ASN_OCSP_CONFIRM_E                            (-691L) /* ASN OCSP signature confirm failure */
183 #define SL_ERROR_BSD_ESEC_VERIFY_FINISHED_ERROR                         (-704L) /* verify problem on finished */
184 #define SL_ERROR_BSD_ESEC_VERIFY_MAC_ERROR                              (-705L) /* verify mac problem */
185 #define SL_ERROR_BSD_ESEC_PARSE_ERROR                                   (-706L) /* parse error on header */
186 #define SL_ERROR_BSD_ESEC_UNKNOWN_HANDSHAKE_TYPE                        (-707L) /* weird handshake type */
187 #define SL_ERROR_BSD_ESEC_SOCKET_ERROR_E                                (-708L) /* error state on socket */
188 #define SL_ERROR_BSD_ESEC_SOCKET_NODATA                                 (-709L) /* expected data, not there */
189 #define SL_ERROR_BSD_ESEC_INCOMPLETE_DATA                               (-710L) /* don't have enough data to complete task */
190 #define SL_ERROR_BSD_ESEC_UNKNOWN_RECORD_TYPE                           (-711L) /* unknown type in record hdr */
191 #define SL_ERROR_BSD_ESEC_INNER_DECRYPT_ERROR                           (-712L) /* error during decryption */
192 #define SL_ERROR_BSD_ESEC_FATAL_ERROR                                   (-713L) /* recvd alert fatal error */
193 #define SL_ERROR_BSD_ESEC_ENCRYPT_ERROR                                 (-714L) /* error during encryption */
194 #define SL_ERROR_BSD_ESEC_FREAD_ERROR                                   (-715L) /* fread problem */
195 #define SL_ERROR_BSD_ESEC_NO_PEER_KEY                                   (-716L) /* need peer's key */
196 #define SL_ERROR_BSD_ESEC_NO_PRIVATE_KEY                                (-717L) /* need the private key */
197 #define SL_ERROR_BSD_ESEC_RSA_PRIVATE_ERROR                             (-718L) /* error during rsa priv op */
198 #define SL_ERROR_BSD_ESEC_NO_DH_PARAMS                                  (-719L) /* server missing DH params */
199 #define SL_ERROR_BSD_ESEC_BUILD_MSG_ERROR                               (-720L) /* build message failure */
200 #define SL_ERROR_BSD_ESEC_BAD_HELLO                                     (-721L) /* client hello malformed */
201 #define SL_ERROR_BSD_ESEC_DOMAIN_NAME_MISMATCH                          (-722L) /* peer subject name mismatch */
202 #define SL_ERROR_BSD_ESEC_WANT_READ                                     (-723L) /* want read, call again */
203 #define SL_ERROR_BSD_ESEC_NOT_READY_ERROR                               (-724L) /* handshake layer not ready */
204 #define SL_ERROR_BSD_ESEC_PMS_VERSION_ERROR                             (-725L) /* pre m secret version error */
205 #define SL_ERROR_BSD_ESEC_WANT_WRITE                                    (-727L) /* want write, call again */
206 #define SL_ERROR_BSD_ESEC_BUFFER_ERROR                                  (-728L) /* malformed buffer input */
207 #define SL_ERROR_BSD_ESEC_VERIFY_CERT_ERROR                             (-729L) /* verify cert error */
208 #define SL_ERROR_BSD_ESEC_VERIFY_SIGN_ERROR                             (-730L) /* verify sign error */
209 #define SL_ERROR_BSD_ESEC_LENGTH_ERROR                                  (-741L) /* record layer length error */
210 #define SL_ERROR_BSD_ESEC_PEER_KEY_ERROR                                (-742L) /* can't decode peer key */
211 #define SL_ERROR_BSD_ESEC_ZERO_RETURN                                   (-743L) /* peer sent close notify */
212 #define SL_ERROR_BSD_ESEC_SIDE_ERROR                                    (-744L) /* wrong client/server type */
213 #define SL_ERROR_BSD_ESEC_NO_PEER_CERT                                  (-745L) /* peer didn't send key */
214 #define SL_ERROR_BSD_ESEC_ECC_CURVETYPE_ERROR                           (-750L) /* Bad ECC Curve Type */
215 #define SL_ERROR_BSD_ESEC_ECC_CURVE_ERROR                               (-751L) /* Bad ECC Curve */
216 #define SL_ERROR_BSD_ESEC_ECC_PEERKEY_ERROR                             (-752L) /* Bad Peer ECC Key */
217 #define SL_ERROR_BSD_ESEC_ECC_MAKEKEY_ERROR                             (-753L) /* Bad Make ECC Key */
218 #define SL_ERROR_BSD_ESEC_ECC_EXPORT_ERROR                              (-754L) /* Bad ECC Export Key */
219 #define SL_ERROR_BSD_ESEC_ECC_SHARED_ERROR                              (-755L) /* Bad ECC Shared Secret */
220 #define SL_ERROR_BSD_ESEC_NOT_CA_ERROR                                  (-757L) /* Not a CA cert error */
221 #define SL_ERROR_BSD_ESEC_BAD_PATH_ERROR                                (-758L) /* Bad path for opendir */
222 #define SL_ERROR_BSD_ESEC_BAD_CERT_MANAGER_ERROR                        (-759L) /* Bad Cert Manager */
223 #define SL_ERROR_BSD_ESEC_OCSP_CERT_REVOKED                             (-760L) /* OCSP Certificate revoked */
224 #define SL_ERROR_BSD_ESEC_CRL_CERT_REVOKED                              (-761L) /* CRL Certificate revoked */
225 #define SL_ERROR_BSD_ESEC_CRL_MISSING                                   (-762L) /* CRL Not loaded */
226 #define SL_ERROR_BSD_ESEC_MONITOR_RUNNING_E                             (-763L) /* CRL Monitor already running */
227 #define SL_ERROR_BSD_ESEC_THREAD_CREATE_E                               (-764L) /* Thread Create Error */
228 #define SL_ERROR_BSD_ESEC_OCSP_NEED_URL                                 (-765L) /* OCSP need an URL for lookup */
229 #define SL_ERROR_BSD_ESEC_OCSP_CERT_UNKNOWN                             (-766L) /* OCSP responder doesn't know */
230 #define SL_ERROR_BSD_ESEC_OCSP_LOOKUP_FAIL                              (-767L) /* OCSP lookup not successful */
231 #define SL_ERROR_BSD_ESEC_MAX_CHAIN_ERROR                               (-768L) /* max chain depth exceeded */
232 #define SL_ERROR_BSD_ESEC_NO_PEER_VERIFY                                (-778L) /* Need peer cert verify Error */
233 #define SL_ERROR_BSD_ESEC_UNSUPPORTED_SUITE                             (-790L) /* unsupported cipher suite */
234 #define SL_ERROR_BSD_ESEC_MATCH_SUITE_ERROR                             (-791L) /* can't match cipher suite */
235 
236 
237 /* WLAN ERRORS CODES*/
238 #define  SL_ERROR_WLAN_KEY_ERROR                                        (-2049L)
239 #define  SL_ERROR_WLAN_INVALID_ROLE                                     (-2050L)
240 #define  SL_ERROR_WLAN_PREFERRED_NETWORKS_FILE_LOAD_FAILED              (-2051L)
241 #define  SL_ERROR_WLAN_CANNOT_CONFIG_SCAN_DURING_PROVISIONING           (-2052L)
242 #define  SL_ERROR_WLAN_INVALID_SECURITY_TYPE                            (-2054L)
243 #define  SL_ERROR_WLAN_PASSPHRASE_TOO_LONG                              (-2055L)
244 #define  SL_ERROR_WLAN_EAP_WRONG_METHOD                                 (-2057L)
245 #define  SL_ERROR_WLAN_PASSWORD_ERROR                                   (-2058L)
246 #define  SL_ERROR_WLAN_EAP_ANONYMOUS_LEN_ERROR                          (-2059L)
247 #define  SL_ERROR_WLAN_SSID_LEN_ERROR                                   (-2060L)
248 #define  SL_ERROR_WLAN_USER_ID_LEN_ERROR                                (-2061L)
249 #define  SL_ERROR_WLAN_PREFERRED_NETWORK_LIST_FULL                      (-2062L)
250 #define  SL_ERROR_WLAN_PREFERRED_NETWORKS_FILE_WRITE_FAILED             (-2063L)
251 #define  SL_ERROR_WLAN_ILLEGAL_WEP_KEY_INDEX                            (-2064L)
252 #define  SL_ERROR_WLAN_INVALID_DWELL_TIME_VALUES                        (-2065L)
253 #define  SL_ERROR_WLAN_INVALID_POLICY_TYPE                              (-2066L)
254 #define  SL_ERROR_WLAN_PM_POLICY_INVALID_OPTION                         (-2067L)
255 #define  SL_ERROR_WLAN_PM_POLICY_INVALID_PARAMS                         (-2068L)
256 #define  SL_ERROR_WLAN_WIFI_NOT_CONNECTED                               (-2069L)
257 #define  SL_ERROR_WLAN_ILLEGAL_CHANNEL                                  (-2070L)
258 #define  SL_ERROR_WLAN_WIFI_ALREADY_DISCONNECTED                        (-2071L)
259 #define  SL_ERROR_WLAN_TRANSCEIVER_ENABLED                              (-2072L)
260 #define  SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN                          (-2073L)
261 #define  SL_ERROR_WLAN_GET_PROFILE_INVALID_INDEX                        (-2074L)
262 #define  SL_ERROR_WLAN_FAST_CONN_DATA_INVALID                           (-2075L)
263 #define  SL_ERROR_WLAN_NO_FREE_PROFILE                                  (-2076L)
264 #define  SL_ERROR_WLAN_AP_SCAN_INTERVAL_TOO_LOW                         (-2077L)
265 #define  SL_ERROR_WLAN_SCAN_POLICY_INVALID_PARAMS                       (-2078L)
266 
267 #define SL_RXFL_OK                                                      (0L)     /*  O.K */
268 #define SL_ERROR_RXFL_RANGE_COMPARE_PARAMS_ARE_INVALID                  (-2079L)
269 #define SL_ERROR_RXFL_RXFL_INVALID_PATTERN_LENGTH                       (-2080L) /* requested length for L1/L4 payload matching must not exceed 16 bytes */
270 #define SL_ERROR_RXFL_ACTION_USER_EVENT_ID_TOO_BIG                      (-2081L) /* user action id for host event must not exceed SL_WLAN_RX_FILTER_MAX_USER_EVENT_ID */
271 #define SL_ERROR_RXFL_OFFSET_TOO_BIG                                    (-2082L) /* requested offset for L1/L4 payload matching must not exceed 1535 bytes  */
272 #define SL_ERROR_RXFL_STAT_UNSUPPORTED                                  (-2083L) /* get rx filters statistics not supported */
273 #define SL_ERROR_RXFL_INVALID_FILTER_ARG_UPDATE                         (-2084L) /* invalid filter args request */
274 #define SL_ERROR_RXFL_INVALID_SYSTEM_STATE_TRIGGER_FOR_FILTER_TYPE      (-2085L) /* system state not supported for this filter type */
275 #define SL_ERROR_RXFL_INVALID_FUNC_ID_FOR_FILTER_TYPE                   (-2086L) /* function id not supported for this filter type */
276 #define SL_ERROR_RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_3                   (-2087L) /* filter parent doesn't exist */
277 #define SL_ERROR_RXFL_OUTPUT_OR_INPUT_BUFFER_LENGTH_TOO_SMALL           (-2088L) /* ! The output buffer length is smaller than required for that operation */
278 #define SL_ERROR_RXFL_DEPENDENT_FILTER_SOFTWARE_FILTER_NOT_FIT          (-2089L) /* Node filter can't be child of software filter and vice_versa */
279 #define SL_ERROR_RXFL_DEPENDENCY_IS_NOT_PERSISTENT                      (-2090L) /*  Dependency filter is not persistent */
280 #define SL_ERROR_RXFL_RXFL_ALLOCATION_PROBLEM                           (-2091L)
281 #define SL_ERROR_RXFL_SYSTEM_STATE_NOT_SUPPORTED_FOR_THIS_FILTER        (-2092L) /*  System state is not supported */
282 #define SL_ERROR_RXFL_TRIGGER_USE_REG5_TO_REG8                          (-2093L) /*  Only counters 5 - 8 are allowed, for Tigger */
283 #define SL_ERROR_RXFL_TRIGGER_USE_REG1_TO_REG4                          (-2094L) /*  Only counters 1 - 4 are allowed, for trigger */
284 #define SL_ERROR_RXFL_ACTION_USE_REG5_TO_REG8                           (-2095L) /*  Only counters 5 - 8 are allowed, for action */
285 #define SL_ERROR_RXFL_ACTION_USE_REG1_TO_REG4                           (-2096L) /*  Only counters 1 - 4 are allowed, for action */
286 #define SL_ERROR_RXFL_FIELD_SUPPORT_ONLY_EQUAL_AND_NOTEQUAL             (-2097L) /*  Rule compare function Id is out of range */
287 #define SL_ERROR_RXFL_WRONG_MULTICAST_BROADCAST_ADDRESS                 (-2098L) /*  The address should be of type mutlicast or broadcast */
288 #define SL_ERROR_RXFL_THE_FILTER_IS_NOT_OF_HEADER_TYPE                  (-2099L) /*  The filter should be of header type */
289 #define SL_ERROR_RXFL_WRONG_COMPARE_FUNC_FOR_BROADCAST_ADDRESS          (-2100L) /*  The compare funcion is not suitable for broadcast address */
290 #define SL_ERROR_RXFL_WRONG_MULTICAST_ADDRESS                           (-2101L) /*  The address should be of muticast type */
291 #define SL_ERROR_RXFL_DEPENDENT_FILTER_IS_NOT_PERSISTENT                (-2102L) /*  The dependency filter is not persistent */
292 #define SL_ERROR_RXFL_DEPENDENT_FILTER_IS_NOT_ENABLED                   (-2103L) /*  The dependency filter is not enabled */
293 #define SL_ERROR_RXFL_FILTER_HAS_CHILDS                                 (-2104L) /*  The filter has childs and can't be removed */
294 #define SL_ERROR_RXFL_CHILD_IS_ENABLED                                  (-2105L) /*  Can't disable filter while the child is enabled */
295 #define SL_ERROR_RXFL_DEPENDENCY_IS_DISABLED                            (-2106L) /*  Can't enable filetr in case its depndency filter is disabled */
296 #define SL_ERROR_RXFL_MAC_SEND_MATCHDB_FAILED                           (-2107L)
297 #define SL_ERROR_RXFL_MAC_SEND_ARG_DB_FAILED                            (-2108L)
298 #define SL_ERROR_RXFL_MAC_SEND_NODEDB_FAILED                            (-2109L)
299 #define SL_ERROR_RXFL_MAC_OPERTATION_RESUME_FAILED                      (-2110L)
300 #define SL_ERROR_RXFL_MAC_OPERTATION_HALT_FAILED                        (-2111L)
301 #define SL_ERROR_RXFL_NUMBER_OF_CONNECTION_POINTS_EXCEEDED              (-2112L) /*  Number of connection points exceeded */
302 #define SL_ERROR_RXFL_DEPENDENT_FILTER_DEPENDENCY_ACTION_IS_DROP        (-2113L) /*  The dependent filter has Drop action, thus the filter can't be created */
303 #define SL_ERROR_RXFL_FILTER_DO_NOT_EXISTS                              (-2114L) /*  The filter doesn't exists */
304 #define SL_ERROR_RXFL_DEPEDENCY_NOT_ON_THE_SAME_LAYER                   (-2115L) /*  The filter and its dependency must be on the same layer */
305 #define SL_ERROR_RXFL_NUMBER_OF_ARGS_EXCEEDED                           (-2116L) /*  Number of arguments excceded */
306 #define SL_ERROR_RXFL_ACTION_NO_REG_NUMBER                              (-2117L) /*  Action require counter number */
307 #define SL_ERROR_RXFL_DEPENDENT_FILTER_LAYER_DO_NOT_FIT                 (-2118L) /*  the filter and its dependency should be from the same layer */
308 #define SL_ERROR_RXFL_DEPENDENT_FILTER_SYSTEM_STATE_DO_NOT_FIT          (-2119L) /*  The filter and its dependency system state don't fit  */
309 #define SL_ERROR_RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_2                   (-2120L) /*  The parent filter don't exist  */
310 #define SL_ERROR_RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_1                   (-2121L) /*  The parent filter is null */
311 #define SL_ERROR_RXFL_RULE_HEADER_ACTION_TYPE_NOT_SUPPORTED             (-2122L) /*  The action type is not supported */
312 #define SL_ERROR_RXFL_RULE_HEADER_TRIGGER_COMPARE_FUNC_OUT_OF_RANGE     (-2123L) /*  The Trigger comparision function is out of range */
313 #define SL_ERROR_RXFL_RULE_HEADER_TRIGGER_OUT_OF_RANGE                  (-2124L) /*  The Trigger is out of range */
314 #define SL_ERROR_RXFL_RULE_HEADER_COMPARE_FUNC_OUT_OF_RANGE             (-2125L) /*  The rule compare function is out of range */
315 #define SL_ERROR_RXFL_FRAME_TYPE_NOT_SUPPORTED                          (-2126L) /*  ASCII frame type string is illegal */
316 #define SL_ERROR_RXFL_RULE_FIELD_ID_NOT_SUPPORTED                       (-2127L) /*  Rule field ID is out of range */
317 #define SL_ERROR_RXFL_RULE_HEADER_FIELD_ID_ASCII_NOT_SUPPORTED          (-2128L) /*  This ASCII field ID is not supported */
318 #define SL_ERROR_RXFL_RULE_HEADER_NOT_SUPPORTED                         (-2129L) /*  The header rule is not supported on current release */
319 #define SL_ERROR_RXFL_RULE_HEADER_OUT_OF_RANGE                          (-2130L) /*  The header rule is out of range */
320 #define SL_ERROR_RXFL_RULE_HEADER_COMBINATION_OPERATOR_OUT_OF_RANGE     (-2131L) /*  Combination function Id is out of ramge */
321 #define SL_ERROR_RXFL_RULE_HEADER_FIELD_ID_OUT_OF_RANGE                 (-2132L) /*  rule field Id is out of range */
322 #define SL_ERROR_RXFL_UPDATE_NOT_SUPPORTED                              (-2133L) /*  Update not supported */
323 #define SL_ERROR_RXFL_NO_FILTER_DATABASE_ALLOCATE                       (-2134L)
324 #define SL_ERROR_RXFL_ALLOCATION_FOR_GLOBALS_STRUCTURE_FAILED           (-2135L)
325 #define SL_ERROR_RXFL_ALLOCATION_FOR_DB_NODE_FAILED                     (-2136L)
326 #define SL_ERROR_RXFL_READ_FILE_FILTER_ID_ILLEGAL                       (-2137L)
327 #define SL_ERROR_RXFL_READ_FILE_NUMBER_OF_FILTER_FAILED                 (-2138L)
328 #define SL_ERROR_RXFL_READ_FILE_FAILED                                  (-2139L)
329 #define SL_ERROR_RXFL_NO_FILTERS_ARE_DEFINED                            (-2140L) /*  No filters are defined in the system */
330 #define SL_ERROR_RXFL_NUMBER_OF_FILTER_EXCEEDED                         (-2141L) /*  Number of max filters excceded */
331 #define SL_ERROR_RXFL_BAD_FILE_MODE                                     (-2142L)
332 #define SL_ERROR_RXFL_FAILED_READ_NVFILE                                (-2143L)
333 #define SL_ERROR_RXFL_FAILED_INIT_STORAGE                               (-2144L)
334 #define SL_ERROR_RXFL_CONTINUE_WRITE_MUST_BE_MOD_4                      (-2145L)
335 #define SL_ERROR_RXFL_FAILED_LOAD_FILE                                  (-2146L)
336 #define SL_ERROR_RXFL_INVALID_HANDLE                                    (-2147L)
337 #define SL_ERROR_RXFL_FAILED_TO_WRITE                                   (-2148L)
338 #define SL_ERROR_RXFL_OFFSET_OUT_OF_RANGE                               (-2149L)
339 #define SL_ERROR_RXFL_ALLOC                                             (-2150L)
340 #define SL_ERROR_RXFL_READ_DATA_LENGTH                                  (-2151L)
341 #define SL_ERROR_RXFL_INVALID_FILE_ID                                   (-2152L)
342 #define SL_ERROR_RXFL_FILE_FILTERS_NOT_EXISTS                           (-2153L)
343 #define SL_ERROR_RXFL_FILE_ALREADY_IN_USE                               (-2154L)
344 #define SL_ERROR_RXFL_INVALID_ARGS                                      (-2155L)
345 #define SL_ERROR_RXFL_FAILED_TO_CREATE_FILE                             (-2156L)
346 #define SL_ERROR_RXFL_FS_ALREADY_LOADED                                 (-2157L)
347 #define SL_ERROR_RXFL_UNKNOWN                                           (-2158L)
348 #define SL_ERROR_RXFL_FAILED_TO_CREATE_LOCK_OBJ                         (-2159L)
349 #define SL_ERROR_RXFL_DEVICE_NOT_LOADED                                 (-2160L)
350 #define SL_ERROR_RXFL_INVALID_MAGIC_NUM                                 (-2161L)
351 #define SL_ERROR_RXFL_FAILED_TO_READ                                    (-2162L)
352 #define SL_ERROR_RXFL_NOT_SUPPORTED                                     (-2163L)
353 #define SL_ERROR_WLAN_INVALID_COUNTRY_CODE                              (-2164L)
354 #define SL_ERROR_WLAN_NVMEM_ACCESS_FAILED                               (-2165L)
355 #define SL_ERROR_WLAN_OLD_FILE_VERSION                                  (-2166L)
356 #define SL_ERROR_WLAN_TX_POWER_OUT_OF_RANGE                             (-2167L)
357 #define SL_ERROR_WLAN_INVALID_AP_PASSWORD_LENGTH                        (-2168L)
358 #define SL_ERROR_WLAN_PROVISIONING_ABORT_PROVISIONING_ALREADY_STARTED   (-2169L)
359 #define SL_ERROR_WLAN_PROVISIONING_ABORT_HTTP_SERVER_DISABLED           (-2170L)
360 #define SL_ERROR_WLAN_PROVISIONING_ABORT_PROFILE_LIST_FULL              (-2171L)
361 #define SL_ERROR_WLAN_PROVISIONING_ABORT_INVALID_PARAM                  (-2172L)
362 #define SL_ERROR_WLAN_PROVISIONING_ABORT_GENERAL_ERROR                  (-2173L)
363 #define SL_ERROR_WLAN_MULTICAST_EXCEED_MAX_ADDR                         (-2174L)
364 #define SL_ERROR_WLAN_MULTICAST_INVAL_ADDR                              (-2175L)
365 #define SL_ERROR_WLAN_AP_SCAN_INTERVAL_TOO_SHORT                        (-2176L)
366 #define SL_ERROR_WLAN_PROVISIONING_CMD_NOT_EXPECTED                     (-2177L)
367 
368 
369 #define SL_ERROR_WLAN_AP_ACCESS_LIST_NO_ADDRESS_TO_DELETE               (-2178L) /*  List is empty, no address to delete */
370 #define SL_ERROR_WLAN_AP_ACCESS_LIST_FULL                               (-2179L) /*  access list is full */
371 #define SL_ERROR_WLAN_AP_ACCESS_LIST_DISABLED                           (-2180L) /*  access list is disabled */
372 #define SL_ERROR_WLAN_AP_ACCESS_LIST_MODE_NOT_SUPPORTED                 (-2181L) /*  Trying to switch to unsupported mode */
373 #define SL_ERROR_WLAN_AP_STA_NOT_FOUND                                  (-2182L) /*  trying to disconnect station which is not connected */
374 #define SL_ERROR_WLAN_DMS_REQUEST_DENIED                                (-2185L) /* Warning - DMS request was denied (IGMP process succeeded) */
375 #define SL_ERROR_WLAN_DMS_REQUEST_TIMEOUT                               (-2186L) /* Warning - DMS request was timed out (IGMP process succeeded) */
376 #define SL_ERROR_WLAN_DMS_NOT_SUPPORTED_BY_AP                           (-2187L) /* Warning - AP does not support DMS (IGMP process succeeded) */
377 
378 /* DEVICE ERRORS CODES*/
379 #define SL_ERROR_SUPPLICANT_ERROR                                       (-4097L)
380 #define SL_ERROR_HOSTAPD_INIT_FAIL                                      (-4098L)
381 #define SL_ERROR_HOSTAPD_INIT_IF_FAIL                                   (-4099L)
382 #define SL_ERROR_WLAN_DRV_INIT_FAIL                                     (-4100L)
383 #define SL_ERROR_FS_FILE_TABLE_LOAD_FAILED                              (-4102L) /*  init file system failed */
384 #define SL_ERROR_MDNS_ENABLE_FAIL                                       (-4103L) /*  mDNS enable failed */
385 #define SL_ERROR_ROLE_STA_ERR                                           (-4107L) /*  Failure to load MAC/PHY in STA role */
386 #define SL_ERROR_ROLE_AP_ERR                                            (-4108L) /*  Failure to load MAC/PHY in AP role */
387 #define SL_ERROR_ROLE_P2P_ERR                                           (-4109L) /*  Failure to load MAC/PHY in P2P role */
388 #define SL_ERROR_CALIB_FAIL                                             (-4110L) /*  Failure of calibration */
389 #define SL_ERROR_FS_CORRUPTED_ERR                                       (-4111L) /*  FS is corrupted, Return to Factory Image or Program new image should be invoked (see sl_FsCtl, sl_FsProgram) */
390 #define SL_ERROR_FS_ALERT_ERR                                           (-4112L) /*  Device is locked, Return to Factory Image or Program new image should be invoked (see sl_FsCtl, sl_FsProgram) */
391 #define SL_ERROR_RESTORE_IMAGE_COMPLETE                                 (-4113L) /*  Return to factory image completed, perform reset */
392 #define SL_ERROR_UNKNOWN_ERR                                            (-4114L)
393 #define SL_ERROR_GENERAL_ERR                                            (-4115L) /*  General error during init */
394 #define SL_ERROR_WRONG_ROLE                                             (-4116L)
395 #define SL_ERROR_INCOMPLETE_PROGRAMMING                                 (-4117L) /*  Error during programming, Program new image should be invoked (see sl_FsProgram) */
396 
397 
398 #define SL_ERROR_PENDING_TXRX_STOP_TIMEOUT_EXP                          (-4118L) /*  Timeout expired before completing all TX\RX */
399 #define SL_ERROR_PENDING_TXRX_NO_TIMEOUT                                (-4119L) /*  No Timeout , still have pending  TX\RX */
400 #define SL_ERROR_INVALID_PERSISTENT_CONFIGURATION                       (-4120L) /*  persistency configuration can only be set to 0 (disabled) or 1 (enabled) */
401 #define SL_ERROR_ROLE_TAG_ERR                                           (-4121L) /* Failure to start device in TAG role */
402 #define SL_ERROR_FIPS_ERR                                               (-4122L) /* Failure to start with FIPS mode enabled */
403 /* NETAPP ERRORS CODES*/
404 #define SL_ERROR_MDNS_CREATE_FAIL                                       (-6145L) /*  mDNS create failed */
405 #define SL_ERROR_DEVICE_NAME_LEN_ERR                                    (-6146L) /*  Set Dev name error codes */
406 #define SL_ERROR_DEVICE_NAME_INVALID                                    (-6147L) /*  Set Dev name error codes */
407 #define SL_ERROR_DOMAIN_NAME_LEN_ERR                                    (-6148L) /*  Set domain name error codes */
408 #define SL_ERROR_DOMAIN_NAME_INVALID                                    (-6149L) /*  Set domain name error codes */
409 #define SL_ERROR_NET_APP_DNS_QUERY_NO_RESPONSE                          (-6150L) /*  DNS query failed, no response */
410 #define SL_ERROR_NET_APP_DNS_ERROR                                      (-6151L) /*  DNS internal error */
411 #define SL_ERROR_NET_APP_DNS_NO_SERVER                                  (-6152L) /*  No DNS server was specified */
412 #define SL_ERROR_NET_APP_DNS_TIMEOUTR                                   (-6153L) /*  mDNS parameters error */
413 #define SL_ERROR_NET_APP_DNS_QUERY_FAILED                               (-6154L) /*  DNS query failed; no DNS server sent an 'answer' */
414 #define SL_ERROR_NET_APP_DNS_BAD_ADDRESS_ERROR                          (-6155L) /*  Improperly formatted IPv4 or IPv6 address  */
415 #define SL_ERROR_NET_APP_DNS_SIZE_ERROR                                 (-6156L) /*  DNS destination size is too small */
416 #define SL_ERROR_NET_APP_DNS_MALFORMED_PACKET                           (-6157L) /*  Improperly formed or corrupted DNS packet received */
417 #define SL_ERROR_NET_APP_DNS_BAD_ID_ERROR                               (-6158L) /*  DNS packet from server does not match query ID */
418 #define SL_ERROR_NET_APP_DNS_PARAM_ERROR                                (-6159L) /*  Invalid params */
419 #define SL_ERROR_NET_APP_DNS_SERVER_NOT_FOUND                           (-6160L) /*  Server not found in Client list of DNS servers */
420 #define SL_ERROR_NET_APP_DNS_PACKET_CREATE_ERROR                        (-6161L) /*  Error creating DNS packet */
421 #define SL_ERROR_NET_APP_DNS_EMPTY_DNS_SERVER_LIST                      (-6162L) /*  DNS Client's list of DNS servers is empty */
422 #define SL_ERROR_NET_APP_DNS_SERVER_AUTH_ERROR                          (-6163L) /*  Server not able to authenticate answer/authority data */
423 #define SL_ERROR_NET_APP_DNS_ZERO_GATEWAY_IP_ADDRESS                    (-6164L) /*  DNS Client IP instance has a zero gateway IP address  */
424 #define SL_ERROR_NET_APP_DNS_MISMATCHED_RESPONSE                        (-6165L) /*  Server response type does not match the query request */
425 #define SL_ERROR_NET_APP_DNS_DUPLICATE_ENTRY                            (-6166L) /*  Duplicate entry exists in DNS server table */
426 #define SL_ERROR_NET_APP_DNS_RETRY_A_QUERY                              (-6167L) /*  SOA status returned; web site only exists as IPv4 */
427 #define SL_ERROR_NET_APP_DNS_INVALID_ADDRESS_TYPE                       (-6168L) /*  IP address type (e.g. IPv6L) not supported */
428 #define SL_ERROR_NET_APP_DNS_IPV6_NOT_SUPPORTED                         (-6169L) /*  IPv6 disabled */
429 #define SL_ERROR_NET_APP_DNS_NEED_MORE_RECORD_BUFFER                    (-6170L) /*  The buffer size is not enough. */
430 #define SL_ERROR_NET_APP_MDNS_ERROR                                     (-6171L) /*  MDNS internal error. */
431 #define SL_ERROR_NET_APP_MDNS_PARAM_ERROR                               (-6172L) /*  MDNS parameters error. */
432 #define SL_ERROR_NET_APP_MDNS_CACHE_ERROR                               (-6173L) /*  The Cache size is not enough. */
433 #define SL_ERROR_NET_APP_MDNS_UNSUPPORTED_TYPE                          (-6174L) /*  The unsupported resource record type. */
434 #define SL_ERROR_NET_APP_MDNS_DATA_SIZE_ERROR                           (-6175L) /*  The data size is too big. */
435 #define SL_ERROR_NET_APP_MDNS_AUTH_ERROR                                (-6176L) /*  Attempting to parse too large a data. */
436 #define SL_ERROR_NET_APP_MDNS_PACKET_ERROR                              (-6177L) /*  The packet can not add the resource record. */
437 #define SL_ERROR_NET_APP_MDNS_DEST_ADDRESS_ERROR                        (-6178L) /*  The destination address error. */
438 #define SL_ERROR_NET_APP_MDNS_UDP_PORT_ERROR                            (-6179L) /*  The udp port error. */
439 #define SL_ERROR_NET_APP_MDNS_NOT_LOCAL_LINK                            (-6180L) /*  The message that not originate from the local link. */
440 #define SL_ERROR_NET_APP_MDNS_EXCEED_MAX_LABEL                          (-6181L) /*  The data exceed the max laber size. */
441 #define SL_ERROR_NET_APP_MDNS_EXIST_UNIQUE_RR                           (-6182L) /*  At least one Unqiue record in the cache. */
442 #define SL_ERROR_NET_APP_MDNS_EXIST_ANSWER                              (-6183L) /*  At least one answer record in the cache. */
443 #define SL_ERROR_NET_APP_MDNS_EXIST_SAME_QUERY                          (-6184L) /*  Exist the same query. */
444 #define SL_ERROR_NET_APP_MDNS_DUPLICATE_SERVICE                         (-6185L) /*  Duplicate service. */
445 #define SL_ERROR_NET_APP_MDNS_NO_ANSWER                                 (-6186L) /*  No response for one-shot query. */
446 #define SL_ERROR_NET_APP_MDNS_NO_KNOWN_ANSWER                           (-6187L) /*  No known answer for query. */
447 #define SL_ERROR_NET_APP_MDNS_NAME_MISMATCH                             (-6188L) /*  The name mismatch. */
448 #define SL_ERROR_NET_APP_MDNS_NOT_STARTED                               (-6189L) /*  MDNS does not start. */
449 #define SL_ERROR_NET_APP_MDNS_HOST_NAME_ERROR                           (-6190L) /*  MDNS host name error. */
450 #define SL_ERROR_NET_APP_MDNS_NO_MORE_ENTRIES                           (-6191L) /*  No more entries be found. */
451 #define SL_ERROR_NET_APP_MDNS_SERVICE_TYPE_MISMATCH                     (-6192L) /*  The service type mismatch */
452 #define SL_ERROR_NET_APP_MDNS_LOOKUP_INDEX_ERROR                        (-6193L) /*  Index is bigger than number of services. */
453 #define SL_ERROR_NET_APP_MDNS_MAX_SERVICES_ERROR                        (-6194L)
454 #define SL_ERROR_NET_APP_MDNS_IDENTICAL_SERVICES_ERROR                  (-6195L)
455 #define SL_ERROR_NET_APP_MDNS_EXISTED_SERVICE_ERROR                     (-6196L)
456 #define SL_ERROR_NET_APP_MDNS_ERROR_SERVICE_NAME_ERROR                  (-6197L)
457 #define SL_ERROR_NET_APP_MDNS_RX_PACKET_ALLOCATION_ERROR                (-6198L)
458 #define SL_ERROR_NET_APP_MDNS_BUFFER_SIZE_ERROR                         (-6199L)
459 #define SL_ERROR_NET_APP_MDNS_NET_APP_SET_ERROR                         (-6200L)
460 #define SL_ERROR_NET_APP_MDNS_GET_SERVICE_LIST_FLAG_ERROR               (-6201L)
461 #define SL_ERROR_NET_APP_MDNS_MDNS_NO_CONFIGURATION_ERROR               (-6202L)
462 #define SL_ERROR_NET_APP_MDNS_STATUS_ERROR                              (-6203L)
463 #define SL_ERROR_NET_APP_ENOBUFS                                        (-6204L)
464 #define SL_ERROR_NET_APP_DNS_IPV6_REQ_BUT_IPV6_DISABLED                 (-6205L) /*  trying to issue ipv6 DNS request but ipv6 is disabled */
465 #define SL_ERROR_NET_APP_DNS_INVALID_FAMILY_TYPE                        (-6206L) /*  Family type is not ipv4 and not ipv6 */
466 #define SL_ERROR_NET_APP_DNS_REQ_TOO_BIG                                (-6207L) /*  DNS request size is too big */
467 #define SL_ERROR_NET_APP_DNS_ALLOC_ERROR                                (-6208L) /*  Allocation error */
468 #define SL_ERROR_NET_APP_DNS_EXECUTION_ERROR                            (-6209L) /*  Execution error */
469 #define SL_ERROR_NET_APP_P2P_ROLE_IS_NOT_CONFIGURED                     (-6210L) /*  role p2p is not configured yet, should be CL or GO in order to execute command */
470 #define SL_ERROR_NET_APP_INCORECT_ROLE_FOR_APP                          (-6211L) /*  incorrect role for specific application */
471 #define SL_ERROR_NET_APP_INCORECT_APP_MASK                              (-6212L) /*  mask does not match any app */
472 #define SL_ERROR_NET_APP_MDNS_ALREADY_STARTED                           (-6213L) /*  mdns application already started */
473 #define SL_ERROR_NET_APP_HTTP_SERVER_ALREADY_STARTED                    (-6214L) /*  http server application already started */
474 
475 #define SL_ERROR_NET_APP_HTTP_GENERAL_ERROR                             (-6216L) /*  New error - Http handle request failed */
476 #define SL_ERROR_NET_APP_HTTP_INVALID_TIMEOUT                           (-6217L) /*  New error - Http timeout invalid argument */
477 #define SL_ERROR_NET_APP_INVALID_URN_LENGTH                             (-6218L) /*  invalid URN length  */
478 #define SL_ERROR_NET_APP_RX_BUFFER_LENGTH                               (-6219L) /*  size of the requested services is smaller than size of the user buffer */
479 #define SL_ERROR_NET_APP_CMD_PING_TOO_BIG                               (-6220L) /* Ping size is too big  */
480 #define SL_ERROR_NET_APP_CMD_PING_INTERNAL_FAILURE                      (-6221L) /* Ping internal failure  */
481 #define SL_ERROR_NET_APP_CMD_PING_NOT_CONNECTED                         (-6222L) /* Wifi is not connected  */
482 #define SL_ERROR_NET_APP_CMD_PING_FAILURE                               (-6223L) /* Ping failure  */
483 #define SL_ERROR_NET_APP_CMD_PING_OPERATION_FAILED                      (-6224L) /* Ping operation failed  */
484 #define SL_ERROR_NET_APP_CMD_PING_DELETE_FAILED                         (-6225L) /* Ping internal delete failed  */
485 #define SL_ERROR_NET_APP_CMD_PING_STATE_ERROR                           (-6226L) /* Ping state machine error  */
486 #define SL_ERROR_NET_APP_HTTP_INVALID_PARAMETER                         (-6227L) /* HTTP configuration with wrong value   */
487 
488 /* NETCFG ERRORS CODES*/
489 #define SL_ERROR_STATIC_ADDR_SUBNET_ERROR                               (-8193L)
490 #define SL_ERROR_INCORRECT_IPV6_STATIC_LOCAL_ADDR                       (-8194L) /*  Ipv6 Local address perfix is wrong */
491 #define SL_ERROR_INCORRECT_IPV6_STATIC_GLOBAL_ADDR                      (-8195L) /*  Ipv6 Global address perfix is wrong */
492 #define SL_ERROR_IPV6_LOCAL_ADDR_SHOULD_BE_SET_FIRST                    (-8196L) /* Attempt to set ipv6 global address before ipv6 local address is set */
493 
494 
495 /* FS ERRORS CODES*/
496 #define SL_FS_OK                                                        (0L)
497 #define SL_ERROR_FS_EXTRACTION_WILL_START_AFTER_RESET                   (-10241L)
498 #define SL_ERROR_FS_NO_CERTIFICATE_STORE                                (-10242L)
499 #define SL_ERROR_FS_IMAGE_SHOULD_BE_AUTHENTICATE                        (-10243L)
500 #define SL_ERROR_FS_IMAGE_SHOULD_BE_ENCRYPTED                           (-10244L)
501 #define SL_ERROR_FS_IMAGE_CANT_BE_ENCRYPTED                             (-10245L)
502 #define SL_ERROR_FS_DEVELOPMENT_BOARD_WRONG_MAC                         (-10246L)
503 #define SL_ERROR_FS_DEVICE_NOT_SECURED                                  (-10247L)
504 #define SL_ERROR_FS_SYSTEM_FILE_ACCESS_DENIED                           (-10248L)
505 #define SL_ERROR_FS_IMAGE_EXTRACT_EXPECTING_USER_KEY                    (-10249L)
506 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_CLOSE_FILE                  (-10250L)
507 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_WRITE_FILE                  (-10251L)
508 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_OPEN_FILE                   (-10252L)
509 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_GET_IMAGE_HEADER            (-10253L)
510 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_GET_IMAGE_INFO              (-10254L)
511 #define SL_ERROR_FS_IMAGE_EXTRACT_SET_ID_NOT_EXIST                      (-10255L)
512 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_DELETE_FILE                 (-10256L)
513 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_FORMAT_FS                   (-10257L)
514 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_LOAD_FS                     (-10258L)
515 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_GET_DEV_INFO                (-10259L)
516 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_DELETE_STORAGE              (-10260L)
517 #define SL_ERROR_FS_IMAGE_EXTRACT_INCORRECT_IMAGE_LOCATION              (-10261L)
518 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_CREATE_IMAGE_FILE           (-10262L)
519 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_INIT                        (-10263L)
520 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_LOAD_FILE_TABLE             (-10264L)
521 #define SL_ERROR_FS_IMAGE_EXTRACT_ILLEGAL_COMMAND                       (-10266L)
522 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_WRITE_FAT                   (-10267L)
523 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_RET_FACTORY_DEFAULT         (-10268L)
524 #define SL_ERROR_FS_IMAGE_EXTRACT_FAILED_TO_READ_NV                     (-10269L)
525 #define SL_ERROR_FS_PROGRAMMING_IMAGE_NOT_EXISTS                        (-10270L)
526 #define SL_ERROR_FS_PROGRAMMING_IN_PROCESS                              (-10271L)
527 #define SL_ERROR_FS_PROGRAMMING_ALREADY_STARTED                         (-10272L)
528 #define SL_ERROR_FS_CERT_IN_THE_CHAIN_REVOKED_SECURITY_ALERT            (-10273L)
529 #define SL_ERROR_FS_INIT_CERTIFICATE_STORE                              (-10274L)
530 #define SL_ERROR_FS_PROGRAMMING_ILLEGAL_FILE                            (-10275L)
531 #define SL_ERROR_FS_PROGRAMMING_NOT_STARTED                             (-10276L)
532 #define SL_ERROR_FS_IMAGE_EXTRACT_NO_FILE_SYSTEM                        (-10277L)
533 #define SL_ERROR_FS_WRONG_INPUT_SIZE                                    (-10278L)
534 #define SL_ERROR_FS_WRONG_INPUT_SIZE_INTERNAL_SHIFTED_16_LEFT           (-673579008L)
535 #define SL_ERROR_FS_BUNDLE_FILE_SHOULD_BE_CREATED_WITH_FAILSAFE         (-10279L)
536 #define SL_ERROR_FS_BUNDLE_NOT_CONTAIN_FILES                            (-10280L)
537 #define SL_ERROR_FS_BUNDLE_ALREADY_IN_STATE                             (-10281L)
538 #define SL_ERROR_FS_BUNDLE_NOT_IN_CORRECT_STATE                         (-10282L)
539 #define SL_ERROR_FS_BUNDLE_FILES_ARE_OPENED                             (-10283L)
540 #define SL_ERROR_FS_INCORRECT_FILE_STATE_FOR_OPERATION                  (-10284L)
541 #define SL_ERROR_FS_EMPTY_SFLASH                                        (-10285L)
542 #define SL_ERROR_FS_FILE_IS_NOT_SECURE_AND_SIGN                         (-10286L)
543 #define SL_ERROR_FS_ROOT_CA_IS_UNKOWN                                   (-10287L)
544 #define SL_ERROR_FS_FILE_HAS_NOT_BEEN_CLOSE_CORRECTLY                   (-10288L)
545 #define SL_ERROR_FS_WRONG_SIGNATURE_SECURITY_ALERT                      (-10289L)
546 #define SL_ERROR_FS_WRONG_SIGNATURE_OR_CERTIFIC_NAME_LENGTH             (-10290L)
547 #define SL_ERROR_FS_NOT_16_ALIGNED                                      (-10291L)
548 #define SL_ERROR_FS_NOT_16_ALIGNED_INTERNAL_SHIFTED_16_LEFT             (-674430976L)
549 #define SL_ERROR_FS_CERT_CHAIN_ERROR_SECURITY_ALERT                     (-10292L)
550 #define SL_ERROR_FS_FILE_NAME_EXIST                                     (-10293L)
551 #define SL_ERROR_FS_EXTENDED_BUF_ALREADY_ALLOC                          (-10294L)
552 #define SL_ERROR_FS_FILE_SYSTEM_NOT_SECURED                             (-10295L)
553 #define SL_ERROR_FS_OFFSET_NOT_16_BYTE_ALIGN                            (-10296L)
554 #define SL_ERROR_FS_FAILED_READ_NVMEM                                   (-10297L)
555 #define SL_ERROR_FS_WRONG_FILE_NAME                                     (-10298L)
556 #define SL_ERROR_FS_FILE_SYSTEM_IS_LOCKED                               (-10299L)
557 #define SL_ERROR_FS_SECURITY_ALERT                                      (-10300L)
558 #define SL_ERROR_FS_FILE_INVALID_FILE_SIZE                              (-10301L)
559 #define SL_ERROR_FS_INVALID_TOKEN                                       (-10302L)
560 #define SL_ERROR_FS_NO_DEVICE_IS_LOADED                                 (-10303L)
561 #define SL_ERROR_FS_SECURE_CONTENT_INTEGRITY_FAILURE                    (-10304L)
562 #define SL_ERROR_FS_SECURE_CONTENT_RETRIVE_ASYMETRIC_KEY_ERROR          (-10305L)
563 #define SL_ERROR_FS_OVERLAP_DETECTION_THRESHHOLD                        (-10306L)
564 #define SL_ERROR_FS_FILE_HAS_RESERVED_NV_INDEX                          (-10307L)
565 #define SL_ERROR_FS_FILE_MAX_SIZE_EXCEEDED                              (-10310L)
566 #define SL_ERROR_FS_INVALID_READ_BUFFER                                 (-10311L)
567 #define SL_ERROR_FS_INVALID_WRITE_BUFFER                                (-10312L)
568 #define SL_ERROR_FS_FILE_IMAGE_IS_CORRUPTED                             (-10313L)
569 #define SL_ERROR_FS_SIZE_OF_FILE_EXT_EXCEEDED                           (-10314L)
570 #define SL_ERROR_FS_WARNING_FILE_NAME_NOT_KEPT                          (-10315L)
571 #define SL_ERROR_FS_MAX_OPENED_FILE_EXCEEDED                            (-10316L)
572 #define SL_ERROR_FS_FAILED_WRITE_NVMEM_HEADER                           (-10317L)
573 #define SL_ERROR_FS_NO_AVAILABLE_NV_INDEX                               (-10318L)
574 #define SL_ERROR_FS_FAILED_TO_ALLOCATE_MEM                              (-10319L)
575 #define SL_ERROR_FS_OPERATION_BLOCKED_BY_VENDOR                         (-10320L)
576 #define SL_ERROR_FS_FAILED_TO_READ_NVMEM_FILE_SYSTEM                    (-10321L)
577 #define SL_ERROR_FS_NOT_ENOUGH_STORAGE_SPACE                            (-10322L)
578 #define SL_ERROR_FS_INIT_WAS_NOT_CALLED                                 (-10323L)
579 #define SL_ERROR_FS_FILE_SYSTEM_IS_BUSY                                 (-10324L)
580 #define SL_ERROR_FS_INVALID_ACCESS_TYPE                                 (-10325L)
581 #define SL_ERROR_FS_FILE_ALREADY_EXISTS                                 (-10326L)
582 #define SL_ERROR_FS_PROGRAM_FAILURE                                     (-10327L)
583 #define SL_ERROR_FS_NO_ENTRIES_AVAILABLE                                (-10328L)
584 #define SL_ERROR_FS_FILE_ACCESS_IS_DIFFERENT                            (-10329L)
585 #define SL_ERROR_FS_INVALID_FILE_MODE                                   (-10330L)
586 #define SL_ERROR_FS_FAILED_READ_NVFILE                                  (-10331L)
587 #define SL_ERROR_FS_FAILED_INIT_STORAGE                                 (-10332L)
588 #define SL_ERROR_FS_FILE_HAS_NO_FAILSAFE                                (-10333L)
589 #define SL_ERROR_FS_NO_VALID_COPY_EXISTS                                (-10334L)
590 #define SL_ERROR_FS_INVALID_HANDLE                                      (-10335L)
591 #define SL_ERROR_FS_FAILED_TO_WRITE                                     (-10336L)
592 #define SL_ERROR_FS_OFFSET_OUT_OF_RANGE                                 (-10337L)
593 #define SL_ERROR_FS_NO_MEMORY                                           (-10338L)
594 #define SL_ERROR_FS_INVALID_LENGTH_FOR_READ                             (-10339L)
595 #define SL_ERROR_FS_WRONG_FILE_OPEN_FLAGS                               (-10340L)
596 #define SL_ERROR_FS_FILE_NOT_EXISTS                                     (-10341L)
597 #define SL_ERROR_FS_IGNORE_COMMIT_ROLLBAC_FLAG                          (-10342L) /* commit rollback flag is not supported upon creation */
598 #define SL_ERROR_FS_INVALID_ARGS                                        (-10343L)
599 #define SL_ERROR_FS_FILE_IS_PENDING_COMMIT                              (-10344L)
600 #define SL_ERROR_FS_SECURE_CONTENT_SESSION_ALREADY_EXIST                (-10345L)
601 #define SL_ERROR_FS_UNKNOWN                                             (-10346L)
602 #define SL_ERROR_FS_FILE_NAME_RESERVED                                  (-10347L)
603 #define SL_ERROR_FS_NO_FILE_SYSTEM                                      (-10348L)
604 #define SL_ERROR_FS_INVALID_MAGIC_NUM                                   (-10349L)
605 #define SL_ERROR_FS_FAILED_TO_READ_NVMEM                                (-10350L)
606 #define SL_ERROR_FS_NOT_SUPPORTED                                       (-10351L)
607 #define SL_ERROR_FS_JTAG_IS_OPENED_NO_FORMAT_TO_PRDUCTION               (-10352L)
608 #define SL_ERROR_FS_CONFIG_FILE_RET_READ_FAILED                         (-10353L)
609 #define SL_ERROR_FS_CONFIG_FILE_CHECSUM_ERROR_SECURITY_ALERT            (-10354L)
610 #define SL_ERROR_FS_CONFIG_FILE_NO_SUCH_FILE                            (-10355L)
611 #define SL_ERROR_FS_CONFIG_FILE_MEMORY_ALLOCATION_FAILED                (-10356L)
612 #define SL_ERROR_FS_IMAGE_HEADER_READ_FAILED                            (-10357L)
613 #define SL_ERROR_FS_CERT_STORE_OR_SP_DOWNGRADE                          (-10358L)
614 #define SL_ERROR_FS_PROGRAMMING_IMAGE_NOT_VALID                         (-10359L)
615 #define SL_ERROR_FS_PROGRAMMING_IMAGE_NOT_VERIFIED                      (-10360L)
616 #define SL_ERROR_FS_RESERVE_SIZE_IS_SMALLER                             (-10361L)
617 #define SL_ERROR_FS_WRONG_ALLOCATION_TABLE                              (-10362L)
618 #define SL_ERROR_FS_ILLEGAL_SIGNATURE                                   (-10363L)
619 #define SL_ERROR_FS_FILE_ALREADY_OPENED_IN_PENDING_STATE                (-10364L)
620 #define SL_ERROR_FS_INVALID_TOKEN_SECURITY_ALERT                        (-10365L)
621 #define SL_ERROR_FS_NOT_SECURE                                          (-10366L)
622 #define SL_ERROR_FS_RESET_DURING_PROGRAMMING                            (-10367L)
623 #define SL_ERROR_FS_CONFIG_FILE_RET_WRITE_FAILED                        (-10368L)
624 #define SL_ERROR_FS_FILE_IS_ALREADY_OPENED                              (-10369L)
625 #define SL_ERROR_FS_FILE_IS_OPEN_FOR_WRITE                              (-10370L)
626 #define SL_ERROR_FS_ALERT_CANT_BE_SET_ON_NON_SECURE_DEVICE              (-10371L) /* Alerts can be configured on non-secure device. */
627 #define SL_ERROR_FS_WRONG_CERTIFICATE_FILE_NAME                         (-10372L)
628 
629 
630 /* NETUTIL ERRORS CODES */
631 #define SL_ERROR_NETUTIL_CRYPTO_GENERAL                                 (-12289L)
632 #define SL_ERROR_NETUTIL_CRYPTO_INVALID_INDEX                           (-12290L)
633 #define SL_ERROR_NETUTIL_CRYPTO_INVALID_PARAM                           (-12291L)
634 #define SL_ERROR_NETUTIL_CRYPTO_MEM_ALLOC                               (-12292L)
635 #define SL_ERROR_NETUTIL_CRYPTO_INVALID_DB_VER                          (-12293L)
636 #define SL_ERROR_NETUTIL_CRYPTO_UNSUPPORTED_OPTION                      (-12294L)
637 #define SL_ERROR_NETUTIL_CRYPTO_BUFFER_TOO_SMALL                        (-12295L)
638 #define SL_ERROR_NETUTIL_CRYPTO_EMPTY_DB_ENTRY                          (-12296L)
639 #define SL_ERROR_NETUTIL_CRYPTO_NON_TEMPORARY_KEY                       (-12297L)
640 #define SL_ERROR_NETUTIL_CRYPTO_DB_ENTRY_NOT_FREE                       (-12298L)
641 #define SL_ERROR_NETUTIL_CRYPTO_CORRUPTED_DB_FILE                       (-12299L)
642 #define SL_ERROR_UTILS_GENERAL                                          (-12300L)
643 #define SL_ERROR_UTILS_INVALID_PARAM                                    (-12301L)
644 #define SL_ERROR_UTILS_MEM_ALLOC                                        (-12302L)
645 #define SL_ERROR_UTILS_IP_NOT_FOUND                                     (-12303L)
646 #define SL_ERROR_UTILS_IP_NOT_ALLOWED                                   (-12304L)
647 
648 
649 /* GENERAL ERRORS CODES*/
650 #define SL_ERROR_INVALID_OPCODE                                         (-14337L)
651 #define SL_ERROR_INVALID_PARAM                                          (-14338L)
652 #define SL_ERROR_STATUS_ERROR                                           (-14341L)
653 #define SL_ERROR_NVMEM_ACCESS_FAILED                                    (-14342L)
654 #define SL_ERROR_NOT_ALLOWED_NWP_LOCKED                                 (-14343L) /* Device is locked, Return to Factory Image or Program new image should be invoked (see sl_FsCtl, sl_FsProgram) */
655 #define SL_ERROR_RANDOM_TEST_FAILED                                     (-14344L)
656 
657 /* SECURITY ERRORS CODE */
658 #define SL_ERROR_LOADING_CERTIFICATE_STORE                              (-28673L)
659 
660 /* Device is Locked! Return to Factory Image or Program new
661    image should be invoked (see sl_FsCtl, sl_FsProgram) */
662 #define SL_ERROR_DEVICE_LOCKED_SECURITY_ALERT                           (-28674L)
663 
664 #define SL_ERROR_LENGTH_ERROR_PREFIX                                    (-30734L)
665 #define SL_ERROR_WAKELOCK_ERROR_PREFIX                                  (-30735L)
666 #define SL_ERROR_DRV_START_FAIL                                         (-30736L)
667 #define SL_ERROR_VALIDATION_ERROR                                       (-30737L)
668 #define SL_ERROR_SETUP_FAILURE                                          (-30738L)
669 #define SL_ERROR_HTTP_SERVER_ENABLE_FAILED                              (-30739L)
670 #define SL_ERROR_DHCP_SERVER_ENABLE_FAILED                              (-30740L)
671 #define SL_ERROR_WPS_NO_PIN_OR_WRONG_PIN_LEN                            (-30741L)
672 
673 
674 /* INTERNAL HOST ERRORS CODES*/
675 
676 /* Receive this error in case there are no resources to issue the command
677    If possible, increase the number of MAX_CONCURRENT_ACTIONS (result in memory increaseL)
678    If not, try again later */
679 #define SL_POOL_IS_EMPTY                                                (-2000L)
680 
681 /* Receive this error in case a given length for RX buffer was too small.
682    Receive payload was bigger than the given buffer size. Therefore, payload is cut according to receive size
683    Recommend to increase buffer size */
684 #define SL_ESMALLBUF                                                    (-2001L)
685 
686 /* Receive this error in case zero length is supplied to a "get" API
687    Recommend to supply length according to requested information (view options defines for helpL) */
688 #define SL_EZEROLEN                                                     (-2002L)
689 
690 /* User supplied invalid parameter */
691 #define SL_INVALPARAM                                                   (-2003L)
692 
693 /* Failed to open interface  */
694 #define SL_BAD_INTERFACE                                                (-2004L)
695 
696 /* API has been aborted due to an error detected by host driver */
697 #define SL_API_ABORTED                                                  (-2005L)
698 
699 /* Parameters are invalid */
700 #define SL_RET_CODE_INVALID_INPUT                                       (-2006L)
701 
702 /* Driver internal return value */
703 #define SL_RET_OBJ_NOT_SET                                              (-2007L)
704 
705 /* NWP internal error */
706 #define SL_RET_CODE_NWP_IF_ERROR                                        (-2008L)
707 
708 /* malloc error */
709 #define SL_RET_CODE_MALLOC_ERROR                                        (-2009L)
710 
711 /* protocol error */
712 #define SL_RET_CODE_PROTOCOL_ERROR                                      (-2010L)
713 
714 /* API has been aborted, command is not allowed in device lock state */
715 #define SL_RET_CODE_DEV_LOCKED                                          (-2011L)
716 
717 /* sl_Start cannot be invoked twice */
718 #define SL_RET_CODE_DEV_ALREADY_STARTED                                 (-2012L)
719 
720 /* SL API is in progress */
721 #define SL_RET_CODE_API_COMMAND_IN_PROGRESS                             (-2013L)
722 
723 /* Provisioning is in progress -  */
724 #define SL_RET_CODE_PROVISIONING_IN_PROGRESS                            (-2014L)
725 
726 /* Wrong ping parameters - ping cannot be called with the following parameters:
727 1. infinite ping packet
728 2. report only when finished
729 3. no callback supplied  */
730 #define SL_RET_CODE_NET_APP_PING_INVALID_PARAMS                         (-2015L)
731 
732 /* SL select already in progress.
733    this error will be returned if app will try to call
734    sl_select blocking when there is already select trigger in progress */
735 #define SL_RET_CODE_SOCKET_SELECT_IN_PROGRESS_ERROR                     (-2016L)
736 
737 #define SL_RET_CODE_STOP_IN_PROGRESS                                    (-2017L)
738 
739 /* The device has not been started yet  */
740 #define SL_RET_CODE_DEV_NOT_STARTED                                     (-2018L)
741 
742 /* The event link was not found in the list */
743 #define SL_RET_CODE_EVENT_LINK_NOT_FOUND                                (-2019L)
744 
745 /* In case there are no free buffers for async event which arrived
746    during command context. In this case user needs to increase
747    MAX_CONCURRENT_ACTIONS at user.h */
748 #define SL_RET_CODE_NO_FREE_ASYNC_BUFFERS_ERROR                         (-2020L)
749 
750 /* SPI/UART interface closed */
751 #define SL_RET_CODE_INTERFACE_CLOSED                                    (-2021L)
752 
753 /* In case of RX start was called and device statistics is already running.
754  * RX and device statistics cannot run in parallel*/
755 #define SL_RET_CODE_DEVICE_STAT_IN_PROGRESS                             (-2022L)
756 #define SL_RET_CODE_WLAN_RX_STAT_IN_PROGRESS                            (-2023L)
757 
758 /* In case of StartTLS API was called already on the same socket and it's
759  * still in progress */
760 #define SL_RET_CODE_STARTTLS_IN_PROGRESS_ON_THIS_SD                     (-2024L)
761 
762 #ifdef  __cplusplus
763 }
764 #endif /*  __cplusplus */
765 
766 #endif  /*  __ERROR_H__ */
767