1 /*
2  * Copyright (c) 2017-2019, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 
34 /*****************************************************************************/
35 /* Include files                                                             */
36 /*****************************************************************************/
37 
38 #ifndef __SL_NET_ERR_H__
39 #define __SL_NET_ERR_H__
40 
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /*!
47     \defgroup SlNetErr SlNetErr group
48 
49     \short Provide BSD and proprietary errors
50 
51 */
52 /*!
53 
54     \addtogroup SlNetErr
55     @{
56 
57 */
58 
59 /*****************************************************************************/
60 /* Macro declarations                                                        */
61 /*****************************************************************************/
62 
63 #define SLNETERR_RET_CODE_OK                                            (0L)     /**< Success                                                                 */
64 
65 #define SLNETERR_GENERAL_DEVICE                                         (-6L)    /**< General device error                                                    */
66 
67 /* BSD SOCKET ERRORS CODES */
68 
69 #define SLNETERR_BSD_SOC_ERROR                                          (-1L)    /**< Failure                                                                 */
70 #define SLNETERR_BSD_ENXIO                                              (-6L)    /**< No such device or address                                               */
71 #define SLNETERR_BSD_INEXE                                              (-8L)    /**< socket command in execution                                             */
72 #define SLNETERR_BSD_EBADF                                              (-9L)    /**< Bad file number                                                         */
73 #define SLNETERR_BSD_ENSOCK                                             (-10L)   /**< The system limit on the total number of open sockets, has been reached   */
74 #define SLNETERR_BSD_EAGAIN                                             (-11L)   /**< Try again                                                               */
75 #define SLNETERR_BSD_EWOULDBLOCK                                        SLNETERR_BSD_EAGAIN
76 #define SLNETERR_BSD_ENOMEM                                             (-12L)   /**< Out of memory                                                           */
77 #define SLNETERR_BSD_EACCES                                             (-13L)   /**< Permission denied                                                       */
78 #define SLNETERR_BSD_EFAULT                                             (-14L)   /**< Bad address                                                             */
79 #define SLNETERR_BSD_ECLOSE                                             (-15L)   /**< close socket operation failed to transmit all queued packets            */
80 #define SLNETERR_BSD_EALREADY_ENABLED                                   (-21L)   /**< Transceiver - Transceiver already ON. there could be only one           */
81 #define SLNETERR_BSD_EINVAL                                             (-22L)   /**< Invalid argument                                                        */
82 #define SLNETERR_BSD_EAUTO_CONNECT_OR_CONNECTING                        (-69L)   /**< Transceiver - During connection, connected or auto mode started         */
83 #define SLNETERR_BSD_CONNECTION_PENDING                                 (-72L)   /**< Transceiver - Device is connected, disconnect first to open transceiver */
84 #define SLNETERR_BSD_EUNSUPPORTED_ROLE                                  (-86L)   /**< Transceiver - Trying to start when WLAN role is AP or P2P GO            */
85 #define SLNETERR_BSD_ENOTSOCK                                           (-88L)   /**< Socket operation on non-socket                                          */
86 #define SLNETERR_BSD_EDESTADDRREQ                                       (-89L)   /**< Destination address required                                            */
87 #define SLNETERR_BSD_EMSGSIZE                                           (-90L)   /**< Message too long                                                        */
88 #define SLNETERR_BSD_EPROTOTYPE                                         (-91L)   /**< Protocol wrong type for socket                                          */
89 #define SLNETERR_BSD_ENOPROTOOPT                                        (-92L)   /**< Protocol not available                                                  */
90 #define SLNETERR_BSD_EPROTONOSUPPORT                                    (-93L)   /**< Protocol not supported                                                  */
91 #define SLNETERR_BSD_ESOCKTNOSUPPORT                                    (-94L)   /**< Socket type not supported                                               */
92 #define SLNETERR_BSD_EOPNOTSUPP                                         (-95L)   /**< Operation not supported on transport endpoint                           */
93 #define SLNETERR_BSD_EAFNOSUPPORT                                       (-97L)   /**< Address family not supported by protocol                                */
94 #define SLNETERR_BSD_EADDRINUSE                                         (-98L)   /**< Address already in use                                                  */
95 #define SLNETERR_BSD_EADDRNOTAVAIL                                      (-99L)   /**< Cannot assign requested address                                         */
96 #define SLNETERR_BSD_ENETDOWN                                           (-100L)  /**< Network is down                                                         */
97 #define SLNETERR_BSD_ENETUNREACH                                        (-101L)  /**< Network is unreachable                                                  */
98 #define SLNETERR_BSD_ECONNABORTED                                       (-103L)  /**< Software caused connection abort                                        */
99 #define SLNETERR_BSD_ECONNRESET                                         (-104L)  /**< Connection reset by peer                                                */
100 #define SLNETERR_BSD_ENOBUFS                                            (-105L)  /**< No buffer space available                                               */
101 #define SLNETERR_BSD_EOBUFF                                             SLNETERR_BSD_ENOBUFS
102 #define SLNETERR_BSD_EISCONN                                            (-106L)  /**< Transport endpoint is already connected                                 */
103 #define SLNETERR_BSD_ENOTCONN                                           (-107L)  /**< Transport endpoint is not connected                                     */
104 #define SLNETERR_BSD_ESHUTDOWN                                          (-108L)  /**< Cannot send after transport endpoint shutdown                           */
105 #define SLNETERR_BSD_ETIMEDOUT                                          (-110L)  /**< Connection timed out                                                    */
106 #define SLNETERR_BSD_ECONNREFUSED                                       (-111L)  /**< Connection refused                                                      */
107 #define SLNETERR_BSD_EHOSTDOWN                                          (-112L)  /**< Host is down                                                            */
108 #define SLNETERR_BSD_EHOSTUNREACH                                       (-113L)  /**< No route to host                                                        */
109 #define SLNETERR_BSD_EALREADY                                           (-114L)  /**< Non blocking connect in progress, try again                             */
110 #define SLNETERR_BSD_EDOM                                               (-115L)  /**< Mathematics argument out of domain of function.                         */
111 #define SLNETERR_BSD_ENOSPC                                             (-116L)  /**< No space left on device.                                                */
112 
113 /* ssl tls security start with -300 offset */
114 #define SLNETERR_ESEC_CLOSE_NOTIFY                                      (-300L)  /**< ssl/tls alerts */
115 #define SLNETERR_ESEC_UNEXPECTED_MESSAGE                                (-310L)  /**< ssl/tls alerts */
116 #define SLNETERR_ESEC_BAD_RECORD_MAC                                    (-320L)  /**< ssl/tls alerts */
117 #define SLNETERR_ESEC_DECRYPTION_FAILED                                 (-321L)  /**< ssl/tls alerts */
118 #define SLNETERR_ESEC_RECORD_OVERFLOW                                   (-322L)  /**< ssl/tls alerts */
119 #define SLNETERR_ESEC_DECOMPRESSION_FAILURE                             (-330L)  /**< ssl/tls alerts */
120 #define SLNETERR_ESEC_HANDSHAKE_FAILURE                                 (-340L)  /**< ssl/tls alerts */
121 #define SLNETERR_ESEC_NO_CERTIFICATE                                    (-341L)  /**< ssl/tls alerts */
122 #define SLNETERR_ESEC_BAD_CERTIFICATE                                   (-342L)  /**< ssl/tls alerts */
123 #define SLNETERR_ESEC_UNSUPPORTED_CERTIFICATE                           (-343L)  /**< ssl/tls alerts */
124 #define SLNETERR_ESEC_ILLEGAL_PARAMETER                                 (-347L)  /**< ssl/tls alerts */
125 #define SLNETERR_ESEC_ACCESS_DENIED                                     (-349L)  /**< ssl/tls alerts */
126 #define SLNETERR_ESEC_DECODE_ERROR                                      (-350L)  /**< ssl/tls alerts */
127 #define SLNETERR_ESEC_DECRYPT_ERROR1                                    (-351L)  /**< ssl/tls alerts */
128 #define SLNETERR_ESEC_EXPORT_RESTRICTION                                (-360L)  /**< ssl/tls alerts */
129 #define SLNETERR_ESEC_PROTOCOL_VERSION                                  (-370L)  /**< ssl/tls alerts */
130 #define SLNETERR_ESEC_INSUFFICIENT_SECURITY                             (-371L)  /**< ssl/tls alerts */
131 #define SLNETERR_ESEC_INTERNAL_ERROR                                    (-380L)  /**< ssl/tls alerts */
132 #define SLNETERR_ESEC_USER_CANCELLED                                    (-390L)  /**< ssl/tls alerts */
133 #define SLNETERR_ESEC_NO_RENEGOTIATION                                  (-400L)  /**< ssl/tls alerts */
134 #define SLNETERR_ESEC_UNSUPPORTED_EXTENSION                             (-410L)  /**< ssl/tls alerts */
135 #define SLNETERR_ESEC_CERTIFICATE_UNOBTAINABLE                          (-411L)  /**< ssl/tls alerts */
136 #define SLNETERR_ESEC_UNRECOGNIZED_NAME                                 (-412L)  /**< ssl/tls alerts */
137 #define SLNETERR_ESEC_BAD_CERTIFICATE_STATUS_RESPONSE                   (-413L)  /**< ssl/tls alerts */
138 #define SLNETERR_ESEC_BAD_CERTIFICATE_HASH_VALUE                        (-414L)  /**< ssl/tls alerts */
139 
140 
141 /* proprietary secure */
142 #define SLNETERR_ESEC_GENERAL                                           (-450L)  /**< error secure level general error                                               */
143 #define SLNETERR_ESEC_DECRYPT                                           (-451L)  /**< error secure level, decrypt recv packet fail                                   */
144 #define SLNETERR_ESEC_CLOSED                                            (-452L)  /**< secure layer is closed by other side, tcp is still connected                   */
145 #define SLNETERR_ESEC_SNO_VERIFY                                        (-453L)  /**< Connected without server verification                                          */
146 #define SLNETERR_ESEC_NO_CA_FILE                                        (-454L)  /**< error secure level CA file not found                                           */
147 #define SLNETERR_ESEC_MEMORY                                            (-455L)  /**< error secure level No memory  space available                                  */
148 #define SLNETERR_ESEC_BAD_CA_FILE                                       (-456L)  /**< error secure level bad CA file                                                 */
149 #define SLNETERR_ESEC_BAD_CERT_FILE                                     (-457L)  /**< error secure level bad Certificate file                                        */
150 #define SLNETERR_ESEC_BAD_PRIVATE_FILE                                  (-458L)  /**< error secure level bad private file                                            */
151 #define SLNETERR_ESEC_BAD_DH_FILE                                       (-459L)  /**< error secure level bad DH file                                                 */
152 #define SLNETERR_ESEC_T00_MANY_SSL_OPENED                               (-460L)  /**< MAX SSL Sockets are opened                                                     */
153 #define SLNETERR_ESEC_DATE_ERROR                                        (-461L)  /**< connected with certificate date verification error                             */
154 #define SLNETERR_ESEC_HAND_SHAKE_TIMED_OUT                              (-462L)  /**< connection timed out due to handshake time                                     */
155 #define SLNETERR_ESEC_TX_BUFFER_NOT_EMPTY                               (-463L)  /**< cannot start ssl connection while send buffer is full                          */
156 #define SLNETERR_ESEC_RX_BUFFER_NOT_EMPTY                               (-464L)  /**< cannot start ssl connection while recv buffer is full                          */
157 #define SLNETERR_ESEC_SSL_DURING_HAND_SHAKE                             (-465L)  /**< cannot use while in handshaking                                                */
158 #define SLNETERR_ESEC_NOT_ALLOWED_WHEN_LISTENING                        (-466L)  /**< the operation is not allowed when listening, do before listen                  */
159 #define SLNETERR_ESEC_CERTIFICATE_REVOKED                               (-467L)  /**< connected but one of the certificates in the chain is revoked                  */
160 #define SLNETERR_ESEC_UNKNOWN_ROOT_CA                                   (-468L)  /**< connected but the root CA used to validate the peer is unknown                 */
161 #define SLNETERR_ESEC_WRONG_PEER_CERT                                   (-469L)  /**< wrong peer cert (server cert) was received while trying to connect to server   */
162 #define SLNETERR_ESEC_TCP_DISCONNECTED_UNCOMPLETE_RECORD                (-470L)  /**< the other side disconnected the TCP layer and didn't send the whole ssl record */
163 #define SLNETERR_ESEC_HELLO_VERIFY_ERROR                                (-471L)  /**< Hello verification failed in DTLS                                              */
164 
165 #define SLNETERR_ESEC_BUFFER_E                                          (-632L)  /**< output buffer too small or input too large */
166 #define SLNETERR_ESEC_ALGO_ID_E                                         (-633L)  /**< setting algo id error                      */
167 #define SLNETERR_ESEC_PUBLIC_KEY_E                                      (-634L)  /**< setting public key error                   */
168 #define SLNETERR_ESEC_DATE_E                                            (-635L)  /**< setting date validity error                */
169 #define SLNETERR_ESEC_SUBJECT_E                                         (-636L)  /**< setting subject name error                 */
170 #define SLNETERR_ESEC_ISSUER_E                                          (-637L)  /**< setting issuer  name error                 */
171 #define SLNETERR_ESEC_CA_TRUE_E                                         (-638L)  /**< setting CA basic constraint true error     */
172 #define SLNETERR_ESEC_EXTENSIONS_E                                      (-639L)  /**< setting extensions error                   */
173 #define SLNETERR_ESEC_ASN_PARSE_E                                       (-640L)  /**< ASN parsing error, invalid input           */
174 #define SLNETERR_ESEC_ASN_VERSION_E                                     (-641L)  /**< ASN version error, invalid number          */
175 #define SLNETERR_ESEC_ASN_GETINT_E                                      (-642L)  /**< ASN get big int error, invalid data        */
176 #define SLNETERR_ESEC_ASN_RSA_KEY_E                                     (-643L)  /**< ASN key init error, invalid input          */
177 #define SLNETERR_ESEC_ASN_OBJECT_ID_E                                   (-644L)  /**< ASN object id error, invalid id            */
178 #define SLNETERR_ESEC_ASN_TAG_NULL_E                                    (-645L)  /**< ASN tag error, not null                    */
179 #define SLNETERR_ESEC_ASN_EXPECT_0_E                                    (-646L)  /**< ASN expect error, not zero                 */
180 #define SLNETERR_ESEC_ASN_BITSTR_E                                      (-647L)  /**< ASN bit string error, wrong id             */
181 #define SLNETERR_ESEC_ASN_UNKNOWN_OID_E                                 (-648L)  /**< ASN oid error, unknown sum id              */
182 #define SLNETERR_ESEC_ASN_DATE_SZ_E                                     (-649L)  /**< ASN date error, bad size                   */
183 #define SLNETERR_ESEC_ASN_BEFORE_DATE_E                                 (-650L)  /**< ASN date error, current date before        */
184 #define SLNETERR_ESEC_ASN_AFTER_DATE_E                                  (-651L)  /**< ASN date error, current date after         */
185 #define SLNETERR_ESEC_ASN_SIG_OID_E                                     (-652L)  /**< ASN signature error, mismatched oid        */
186 #define SLNETERR_ESEC_ASN_TIME_E                                        (-653L)  /**< ASN time error, unknown time type          */
187 #define SLNETERR_ESEC_ASN_INPUT_E                                       (-654L)  /**< ASN input error, not enough data           */
188 #define SLNETERR_ESEC_ASN_SIG_CONFIRM_E                                 (-655L)  /**< ASN sig error, confirm failure             */
189 #define SLNETERR_ESEC_ASN_SIG_HASH_E                                    (-656L)  /**< ASN sig error, unsupported hash type       */
190 #define SLNETERR_ESEC_ASN_SIG_KEY_E                                     (-657L)  /**< ASN sig error, unsupported key type        */
191 #define SLNETERR_ESEC_ASN_DH_KEY_E                                      (-658L)  /**< ASN key init error, invalid input          */
192 #define SLNETERR_ESEC_ASN_NTRU_KEY_E                                    (-659L)  /**< ASN ntru key decode error, invalid input   */
193 #define SLNETERR_ESEC_ASN_CRIT_EXT_E                                    (-660L)  /**< ASN unsupported critical extension         */
194 #define SLNETERR_ESEC_ECC_BAD_ARG_E                                     (-670L)  /**< ECC input argument of wrong type           */
195 #define SLNETERR_ESEC_ASN_ECC_KEY_E                                     (-671L)  /**< ASN ECC bad input                          */
196 #define SLNETERR_ESEC_ECC_CURVE_OID_E                                   (-672L)  /**< Unsupported ECC OID curve type             */
197 #define SLNETERR_ESEC_BAD_FUNC_ARG                                      (-673L)  /**< Bad function argument provided             */
198 #define SLNETERR_ESEC_NOT_COMPILED_IN                                   (-674L)  /**< Feature not compiled in                    */
199 #define SLNETERR_ESEC_UNICODE_SIZE_E                                    (-675L)  /**< Unicode password too big                   */
200 #define SLNETERR_ESEC_NO_PASSWORD                                       (-676L)  /**< no password provided by user               */
201 #define SLNETERR_ESEC_ALT_NAME_E                                        (-677L)  /**< alt name size problem, too big             */
202 #define SLNETERR_ESEC_ASN_NO_SIGNER_E                                   (-688L)  /**< ASN no signer to confirm failure           */
203 #define SLNETERR_ESEC_ASN_CRL_CONFIRM_E                                 (-689L)  /**< ASN CRL signature confirm failure          */
204 #define SLNETERR_ESEC_ASN_CRL_NO_SIGNER_E                               (-690L)  /**< ASN CRL no signer to confirm failure       */
205 #define SLNETERR_ESEC_ASN_OCSP_CONFIRM_E                                (-691L)  /**< ASN OCSP signature confirm failure         */
206 #define SLNETERR_ESEC_VERIFY_FINISHED_ERROR                             (-704L)  /**< verify problem on finished                 */
207 #define SLNETERR_ESEC_VERIFY_MAC_ERROR                                  (-705L)  /**< verify mac problem                         */
208 #define SLNETERR_ESEC_PARSE_ERROR                                       (-706L)  /**< parse error on header                      */
209 #define SLNETERR_ESEC_UNKNOWN_HANDSHAKE_TYPE                            (-707L)  /**< weird handshake type                       */
210 #define SLNETERR_ESEC_SOCKET_ERROR_E                                    (-708L)  /**< error state on socket                      */
211 #define SLNETERR_ESEC_SOCKET_NODATA                                     (-709L)  /**< expected data, not there                   */
212 #define SLNETERR_ESEC_INCOMPLETE_DATA                                   (-710L)  /**< don't have enough data to complete task    */
213 #define SLNETERR_ESEC_UNKNOWN_RECORD_TYPE                               (-711L)  /**< unknown type in record hdr                 */
214 #define SLNETERR_ESEC_INNER_DECRYPT_ERROR                               (-712L)  /**< error during decryption                    */
215 #define SLNETERR_ESEC_FATAL_ERROR                                       (-713L)  /**< recvd alert fatal error                    */
216 #define SLNETERR_ESEC_ENCRYPT_ERROR                                     (-714L)  /**< error during encryption                    */
217 #define SLNETERR_ESEC_FREAD_ERROR                                       (-715L)  /**< fread problem                              */
218 #define SLNETERR_ESEC_NO_PEER_KEY                                       (-716L)  /**< need peer's key                            */
219 #define SLNETERR_ESEC_NO_PRIVATE_KEY                                    (-717L)  /**< need the private key                       */
220 #define SLNETERR_ESEC_RSA_PRIVATE_ERROR                                 (-718L)  /**< error during rsa priv op                   */
221 #define SLNETERR_ESEC_NO_DH_PARAMS                                      (-719L)  /**< server missing DH params                   */
222 #define SLNETERR_ESEC_BUILD_MSG_ERROR                                   (-720L)  /**< build message failure                      */
223 #define SLNETERR_ESEC_BAD_HELLO                                         (-721L)  /**< client hello malformed                     */
224 #define SLNETERR_ESEC_DOMAIN_NAME_MISMATCH                              (-722L)  /**< peer subject name mismatch                 */
225 #define SLNETERR_ESEC_WANT_READ                                         (-723L)  /**< want read, call again                      */
226 #define SLNETERR_ESEC_NOT_READY_ERROR                                   (-724L)  /**< handshake layer not ready                  */
227 #define SLNETERR_ESEC_PMS_VERSION_ERROR                                 (-725L)  /**< pre m secret version error                 */
228 #define SLNETERR_ESEC_WANT_WRITE                                        (-727L)  /**< want write, call again                     */
229 #define SLNETERR_ESEC_BUFFER_ERROR                                      (-728L)  /**< malformed buffer input                     */
230 #define SLNETERR_ESEC_VERIFY_CERT_ERROR                                 (-729L)  /**< verify cert error                          */
231 #define SLNETERR_ESEC_VERIFY_SIGN_ERROR                                 (-730L)  /**< verify sign error                          */
232 #define SLNETERR_ESEC_LENGTH_ERROR                                      (-741L)  /**< record layer length error                  */
233 #define SLNETERR_ESEC_PEER_KEY_ERROR                                    (-742L)  /**< can't decode peer key                      */
234 #define SLNETERR_ESEC_ZERO_RETURN                                       (-743L)  /**< peer sent close notify                     */
235 #define SLNETERR_ESEC_SIDE_ERROR                                        (-744L)  /**< wrong client/server type                   */
236 #define SLNETERR_ESEC_NO_PEER_CERT                                      (-745L)  /**< peer didn't send key                       */
237 #define SLNETERR_ESEC_ECC_CURVETYPE_ERROR                               (-750L)  /**< Bad ECC Curve Type                         */
238 #define SLNETERR_ESEC_ECC_CURVE_ERROR                                   (-751L)  /**< Bad ECC Curve                              */
239 #define SLNETERR_ESEC_ECC_PEERKEY_ERROR                                 (-752L)  /**< Bad Peer ECC Key                           */
240 #define SLNETERR_ESEC_ECC_MAKEKEY_ERROR                                 (-753L)  /**< Bad Make ECC Key                           */
241 #define SLNETERR_ESEC_ECC_EXPORT_ERROR                                  (-754L)  /**< Bad ECC Export Key                         */
242 #define SLNETERR_ESEC_ECC_SHARED_ERROR                                  (-755L)  /**< Bad ECC Shared Secret                      */
243 #define SLNETERR_ESEC_NOT_CA_ERROR                                      (-757L)  /**< Not a CA cert error                        */
244 #define SLNETERR_ESEC_BAD_PATH_ERROR                                    (-758L)  /**< Bad path for opendir                       */
245 #define SLNETERR_ESEC_BAD_CERT_MANAGER_ERROR                            (-759L)  /**< Bad Cert Manager                           */
246 #define SLNETERR_ESEC_OCSP_CERT_REVOKED                                 (-760L)  /**< OCSP Certificate revoked                   */
247 #define SLNETERR_ESEC_CRL_CERT_REVOKED                                  (-761L)  /**< CRL Certificate revoked                    */
248 #define SLNETERR_ESEC_CRL_MISSING                                       (-762L)  /**< CRL Not loaded                             */
249 #define SLNETERR_ESEC_MONITOR_RUNNING_E                                 (-763L)  /**< CRL Monitor already running                */
250 #define SLNETERR_ESEC_THREAD_CREATE_E                                   (-764L)  /**< Thread Create Error                        */
251 #define SLNETERR_ESEC_OCSP_NEED_URL                                     (-765L)  /**< OCSP need an URL for lookup                */
252 #define SLNETERR_ESEC_OCSP_CERT_UNKNOWN                                 (-766L)  /**< OCSP responder doesn't know                */
253 #define SLNETERR_ESEC_OCSP_LOOKUP_FAIL                                  (-767L)  /**< OCSP lookup not successful                 */
254 #define SLNETERR_ESEC_MAX_CHAIN_ERROR                                   (-768L)  /**< max chain depth exceeded                   */
255 #define SLNETERR_ESEC_NO_PEER_VERIFY                                    (-778L)  /**< Need peer cert verify Error                */
256 #define SLNETERR_ESEC_UNSUPPORTED_SUITE                                 (-790L)  /**< unsupported cipher suite                   */
257 #define SLNETERR_ESEC_MATCH_SUITE_ERROR                                 (-791L)  /**< can't match cipher suite                   */
258 
259 
260 
261 /* WLAN ERRORS CODES*/
262 
263 #define SLNETERR_WLAN_KEY_ERROR                                         (-2049L)
264 #define SLNETERR_WLAN_INVALID_ROLE                                      (-2050L)
265 #define SLNETERR_WLAN_PREFERRED_NETWORKS_FILE_LOAD_FAILED               (-2051L)
266 #define SLNETERR_WLAN_CANNOT_CONFIG_SCAN_DURING_PROVISIONING            (-2052L)
267 #define SLNETERR_WLAN_INVALID_SECURITY_TYPE                             (-2054L)
268 #define SLNETERR_WLAN_PASSPHRASE_TOO_LONG                               (-2055L)
269 #define SLNETERR_WLAN_EAP_WRONG_METHOD                                  (-2057L)
270 #define SLNETERR_WLAN_PASSWORD_ERROR                                    (-2058L)
271 #define SLNETERR_WLAN_EAP_ANONYMOUS_LEN_ERROR                           (-2059L)
272 #define SLNETERR_WLAN_SSID_LEN_ERROR                                    (-2060L)
273 #define SLNETERR_WLAN_USER_ID_LEN_ERROR                                 (-2061L)
274 #define SLNETERR_WLAN_PREFERRED_NETWORK_LIST_FULL                       (-2062L)
275 #define SLNETERR_WLAN_PREFERRED_NETWORKS_FILE_WRITE_FAILED              (-2063L)
276 #define SLNETERR_WLAN_ILLEGAL_WEP_KEY_INDEX                             (-2064L)
277 #define SLNETERR_WLAN_INVALID_DWELL_TIME_VALUES                         (-2065L)
278 #define SLNETERR_WLAN_INVALID_POLICY_TYPE                               (-2066L)
279 #define SLNETERR_WLAN_PM_POLICY_INVALID_OPTION                          (-2067L)
280 #define SLNETERR_WLAN_PM_POLICY_INVALID_PARAMS                          (-2068L)
281 #define SLNETERR_WLAN_WIFI_NOT_CONNECTED                                (-2069L)
282 #define SLNETERR_WLAN_ILLEGAL_CHANNEL                                   (-2070L)
283 #define SLNETERR_WLAN_WIFI_ALREADY_DISCONNECTED                         (-2071L)
284 #define SLNETERR_WLAN_TRANSCEIVER_ENABLED                               (-2072L)
285 #define SLNETERR_WLAN_GET_NETWORK_LIST_EAGAIN                           (-2073L)
286 #define SLNETERR_WLAN_GET_PROFILE_INVALID_INDEX                         (-2074L)
287 #define SLNETERR_WLAN_FAST_CONN_DATA_INVALID                            (-2075L)
288 #define SLNETERR_WLAN_NO_FREE_PROFILE                                   (-2076L)
289 #define SLNETERR_WLAN_AP_SCAN_INTERVAL_TOO_LOW                          (-2077L)
290 #define SLNETERR_WLAN_SCAN_POLICY_INVALID_PARAMS                        (-2078L)
291 
292 #define SLNETERR_RXFL_OK                                                (0L)     /**< O.K                                                                                     */
293 #define SLNETERR_RXFL_RANGE_COMPARE_PARAMS_ARE_INVALID                  (-2079L)
294 #define SLNETERR_RXFL_RXFL_INVALID_PATTERN_LENGTH                       (-2080L) /**< requested length for L1/L4 payload matching must not exceed 16 bytes                    */
295 #define SLNETERR_RXFL_ACTION_USER_EVENT_ID_TOO_BIG                      (-2081L) /**< user action id for host event must not exceed SLNETERR_WLAN_RX_FILTER_MAX_USER_EVENT_ID */
296 #define SLNETERR_RXFL_OFFSET_TOO_BIG                                    (-2082L) /**< requested offset for L1/L4 payload matching must not exceed 1535 bytes                  */
297 #define SLNETERR_RXFL_STAT_UNSUPPORTED                                  (-2083L) /**< get rx filters statistics not supported                                                 */
298 #define SLNETERR_RXFL_INVALID_FILTER_ARG_UPDATE                         (-2084L) /**< invalid filter args request                                                             */
299 #define SLNETERR_RXFL_INVALID_SYSTEM_STATE_TRIGGER_FOR_FILTER_TYPE      (-2085L) /**< system state not supported for this filter type                                         */
300 #define SLNETERR_RXFL_INVALID_FUNC_ID_FOR_FILTER_TYPE                   (-2086L) /**< function id not supported for this filter type                                          */
301 #define SLNETERR_RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_3                   (-2087L) /**< filter parent doesn't exist                                                             */
302 #define SLNETERR_RXFL_OUTPUT_OR_INPUT_BUFFER_LENGTH_TOO_SMALL           (-2088L) /**< ! The output buffer length is smaller than required for that operation                  */
303 #define SLNETERR_RXFL_DEPENDENT_FILTER_SOFTWARE_FILTER_NOT_FIT          (-2089L) /**< Node filter can't be child of software filter and vice_versa                            */
304 #define SLNETERR_RXFL_DEPENDENCY_IS_NOT_PERSISTENT                      (-2090L) /**< Dependency filter is not persistent                                                     */
305 #define SLNETERR_RXFL_RXFL_ALLOCATION_PROBLEM                           (-2091L)
306 #define SLNETERR_RXFL_SYSTEM_STATE_NOT_SUPPORTED_FOR_THIS_FILTER        (-2092L) /**< System state is not supported                                                           */
307 #define SLNETERR_RXFL_TRIGGER_USE_REG5_TO_REG8                          (-2093L) /**< Only counters 5 - 8 are allowed, for trigger                                            */
308 #define SLNETERR_RXFL_TRIGGER_USE_REG1_TO_REG4                          (-2094L) /**< Only counters 1 - 4 are allowed, for trigger                                            */
309 #define SLNETERR_RXFL_ACTION_USE_REG5_TO_REG8                           (-2095L) /**< Only counters 5 - 8 are allowed, for action                                             */
310 #define SLNETERR_RXFL_ACTION_USE_REG1_TO_REG4                           (-2096L) /**< Only counters 1 - 4 are allowed, for action                                             */
311 #define SLNETERR_RXFL_FIELD_SUPPORT_ONLY_EQUAL_AND_NOTEQUAL             (-2097L) /**< Rule compare function Id is out of range                                                */
312 #define SLNETERR_RXFL_WRONG_MULTICAST_BROADCAST_ADDRESS                 (-2098L) /**< The address should be of type multicast or broadcast                                    */
313 #define SLNETERR_RXFL_THE_FILTER_IS_NOT_OF_HEADER_TYPE                  (-2099L) /**< The filter should be of header type                                                     */
314 #define SLNETERR_RXFL_WRONG_COMPARE_FUNC_FOR_BROADCAST_ADDRESS          (-2100L) /**< The compare function is not suitable for broadcast address                              */
315 #define SLNETERR_RXFL_WRONG_MULTICAST_ADDRESS                           (-2101L) /**< The address should be of multicast type                                                 */
316 #define SLNETERR_RXFL_DEPENDENT_FILTER_IS_NOT_PERSISTENT                (-2102L) /**< The dependency filter is not persistent                                                 */
317 #define SLNETERR_RXFL_DEPENDENT_FILTER_IS_NOT_ENABLED                   (-2103L) /**< The dependency filter is not enabled                                                    */
318 #define SLNETERR_RXFL_FILTER_HAS_CHILDS                                 (-2104L) /**< The filter has childs and can't be removed                                              */
319 #define SLNETERR_RXFL_CHILD_IS_ENABLED                                  (-2105L) /**< Can't disable filter while the child is enabled                                         */
320 #define SLNETERR_RXFL_DEPENDENCY_IS_DISABLED                            (-2106L) /**< Can't enable filter in case its dependency filter is disabled                           */
321 #define SLNETERR_RXFL_MAC_SEND_MATCHDB_FAILED                           (-2107L)
322 #define SLNETERR_RXFL_MAC_SEND_ARG_DB_FAILED                            (-2108L)
323 #define SLNETERR_RXFL_MAC_SEND_NODEDB_FAILED                            (-2109L)
324 #define SLNETERR_RXFL_MAC_OPERTATION_RESUME_FAILED                      (-2110L)
325 #define SLNETERR_RXFL_MAC_OPERTATION_HALT_FAILED                        (-2111L)
326 #define SLNETERR_RXFL_NUMBER_OF_CONNECTION_POINTS_EXCEEDED              (-2112L) /**< Number of connection points exceeded                                                    */
327 #define SLNETERR_RXFL_DEPENDENT_FILTER_DEPENDENCY_ACTION_IS_DROP        (-2113L) /**< The dependent filter has Drop action, thus the filter can't be created                  */
328 #define SLNETERR_RXFL_FILTER_DO_NOT_EXISTS                              (-2114L) /**< The filter doesn't exists                                                               */
329 #define SLNETERR_RXFL_DEPEDENCY_NOT_ON_THE_SAME_LAYER                   (-2115L) /**< The filter and its dependency must be on the same layer                                 */
330 #define SLNETERR_RXFL_NUMBER_OF_ARGS_EXCEEDED                           (-2116L) /**< Number of arguments exceeded                                                            */
331 #define SLNETERR_RXFL_ACTION_NO_REG_NUMBER                              (-2117L) /**< Action require counter number                                                           */
332 #define SLNETERR_RXFL_DEPENDENT_FILTER_LAYER_DO_NOT_FIT                 (-2118L) /**< the filter and its dependency should be from the same layer                             */
333 #define SLNETERR_RXFL_DEPENDENT_FILTER_SYSTEM_STATE_DO_NOT_FIT          (-2119L) /**< The filter and its dependency system state don't fit                                    */
334 #define SLNETERR_RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_2                   (-2120L) /**< The parent filter don't exist                                                           */
335 #define SLNETERR_RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_1                   (-2121L) /**< The parent filter is null                                                               */
336 #define SLNETERR_RXFL_RULE_HEADER_ACTION_TYPE_NOT_SUPPORTED             (-2122L) /**< The action type is not supported                                                        */
337 #define SLNETERR_RXFL_RULE_HEADER_TRIGGER_COMPARE_FUNC_OUT_OF_RANGE     (-2123L) /**< The Trigger comparison function is out of range                                         */
338 #define SLNETERR_RXFL_RULE_HEADER_TRIGGER_OUT_OF_RANGE                  (-2124L) /**< The Trigger is out of range                                                             */
339 #define SLNETERR_RXFL_RULE_HEADER_COMPARE_FUNC_OUT_OF_RANGE             (-2125L) /**< The rule compare function is out of range                                               */
340 #define SLNETERR_RXFL_FRAME_TYPE_NOT_SUPPORTED                          (-2126L) /**< ASCII frame type string is illegal                                                      */
341 #define SLNETERR_RXFL_RULE_FIELD_ID_NOT_SUPPORTED                       (-2127L) /**< Rule field ID is out of range                                                           */
342 #define SLNETERR_RXFL_RULE_HEADER_FIELD_ID_ASCII_NOT_SUPPORTED          (-2128L) /**< This ASCII field ID is not supported                                                    */
343 #define SLNETERR_RXFL_RULE_HEADER_NOT_SUPPORTED                         (-2129L) /**< The header rule is not supported on current release                                     */
344 #define SLNETERR_RXFL_RULE_HEADER_OUT_OF_RANGE                          (-2130L) /**< The header rule is out of range                                                         */
345 #define SLNETERR_RXFL_RULE_HEADER_COMBINATION_OPERATOR_OUT_OF_RANGE     (-2131L) /**< Combination function Id is out of range                                                 */
346 #define SLNETERR_RXFL_RULE_HEADER_FIELD_ID_OUT_OF_RANGE                 (-2132L) /**< rule field Id is out of range                                                           */
347 #define SLNETERR_RXFL_UPDATE_NOT_SUPPORTED                              (-2133L) /**< Update not supported                                                                    */
348 #define SLNETERR_RXFL_NO_FILTER_DATABASE_ALLOCATE                       (-2134L)
349 #define SLNETERR_RXFL_ALLOCATION_FOR_GLOBALS_STRUCTURE_FAILED           (-2135L)
350 #define SLNETERR_RXFL_ALLOCATION_FOR_DB_NODE_FAILED                     (-2136L)
351 #define SLNETERR_RXFL_READ_FILE_FILTER_ID_ILLEGAL                       (-2137L)
352 #define SLNETERR_RXFL_READ_FILE_NUMBER_OF_FILTER_FAILED                 (-2138L)
353 #define SLNETERR_RXFL_READ_FILE_FAILED                                  (-2139L)
354 #define SLNETERR_RXFL_NO_FILTERS_ARE_DEFINED                            (-2140L) /**< No filters are defined in the system                                                    */
355 #define SLNETERR_RXFL_NUMBER_OF_FILTER_EXCEEDED                         (-2141L) /**< Number of max filters exceeded                                                          */
356 #define SLNETERR_RXFL_BAD_FILE_MODE                                     (-2142L)
357 #define SLNETERR_RXFL_FAILED_READ_NVFILE                                (-2143L)
358 #define SLNETERR_RXFL_FAILED_INIT_STORAGE                               (-2144L)
359 #define SLNETERR_RXFL_CONTINUE_WRITE_MUST_BE_MOD_4                      (-2145L)
360 #define SLNETERR_RXFL_FAILED_LOAD_FILE                                  (-2146L)
361 #define SLNETERR_RXFL_INVALID_HANDLE                                    (-2147L)
362 #define SLNETERR_RXFL_FAILED_TO_WRITE                                   (-2148L)
363 #define SLNETERR_RXFL_OFFSET_OUT_OF_RANGE                               (-2149L)
364 #define SLNETERR_RXFL_ALLOC                                             (-2150L)
365 #define SLNETERR_RXFL_READ_DATA_LENGTH                                  (-2151L)
366 #define SLNETERR_RXFL_INVALID_FILE_ID                                   (-2152L)
367 #define SLNETERR_RXFL_FILE_FILTERS_NOT_EXISTS                           (-2153L)
368 #define SLNETERR_RXFL_FILE_ALREADY_IN_USE                               (-2154L)
369 #define SLNETERR_RXFL_INVALID_ARGS                                      (-2155L)
370 #define SLNETERR_RXFL_FAILED_TO_CREATE_FILE                             (-2156L)
371 #define SLNETERR_RXFL_FS_ALREADY_LOADED                                 (-2157L)
372 #define SLNETERR_RXFL_UNKNOWN                                           (-2158L)
373 #define SLNETERR_RXFL_FAILED_TO_CREATE_LOCK_OBJ                         (-2159L)
374 #define SLNETERR_RXFL_DEVICE_NOT_LOADED                                 (-2160L)
375 #define SLNETERR_RXFL_INVALID_MAGIC_NUM                                 (-2161L)
376 #define SLNETERR_RXFL_FAILED_TO_READ                                    (-2162L)
377 #define SLNETERR_RXFL_NOT_SUPPORTED                                     (-2163L)
378 #define SLNETERR_WLAN_INVALID_COUNTRY_CODE                              (-2164L)
379 #define SLNETERR_WLAN_NVMEM_ACCESS_FAILED                               (-2165L)
380 #define SLNETERR_WLAN_OLD_FILE_VERSION                                  (-2166L)
381 #define SLNETERR_WLAN_TX_POWER_OUT_OF_RANGE                             (-2167L)
382 #define SLNETERR_WLAN_INVALID_AP_PASSWORD_LENGTH                        (-2168L)
383 #define SLNETERR_WLAN_PROVISIONING_ABORT_PROVISIONING_ALREADY_STARTED   (-2169L)
384 #define SLNETERR_WLAN_PROVISIONING_ABORT_HTTP_SERVER_DISABLED           (-2170L)
385 #define SLNETERR_WLAN_PROVISIONING_ABORT_PROFILE_LIST_FULL              (-2171L)
386 #define SLNETERR_WLAN_PROVISIONING_ABORT_INVALID_PARAM                  (-2172L)
387 #define SLNETERR_WLAN_PROVISIONING_ABORT_GENERAL_ERROR                  (-2173L)
388 #define SLNETERR_WLAN_MULTICAST_EXCEED_MAX_ADDR                         (-2174L)
389 #define SLNETERR_WLAN_MULTICAST_INVAL_ADDR                              (-2175L)
390 #define SLNETERR_WLAN_AP_SCAN_INTERVAL_TOO_SHORT                        (-2176L)
391 #define SLNETERR_WLAN_PROVISIONING_CMD_NOT_EXPECTED                     (-2177L)
392 
393 
394 #define SLNETERR_WLAN_AP_ACCESS_LIST_NO_ADDRESS_TO_DELETE               (-2178L) /**< List is empty, no address to delete                 */
395 #define SLNETERR_WLAN_AP_ACCESS_LIST_FULL                               (-2179L) /**< access list is full                                 */
396 #define SLNETERR_WLAN_AP_ACCESS_LIST_DISABLED                           (-2180L) /**< access list is disabled                             */
397 #define SLNETERR_WLAN_AP_ACCESS_LIST_MODE_NOT_SUPPORTED                 (-2181L) /**< Trying to switch to unsupported mode                */
398 #define SLNETERR_WLAN_AP_STA_NOT_FOUND                                  (-2182L) /**< trying to disconnect station which is not connected */
399 
400 
401 
402 /* DEVICE ERRORS CODES*/
403 #define SLNETERR_SUPPLICANT_ERROR                                       (-4097L)
404 #define SLNETERR_HOSTAPD_INIT_FAIL                                      (-4098L)
405 #define SLNETERR_HOSTAPD_INIT_IF_FAIL                                   (-4099L)
406 #define SLNETERR_WLAN_DRV_INIT_FAIL                                     (-4100L)
407 #define SLNETERR_MDNS_ENABLE_FAIL                                       (-4103L) /**< mDNS enable failed                                                                                            */
408 #define SLNETERR_ROLE_STA_ERR                                           (-4107L) /**< Failure to load MAC/PHY in STA role                                                                           */
409 #define SLNETERR_ROLE_AP_ERR                                            (-4108L) /**< Failure to load MAC/PHY in AP role                                                                            */
410 #define SLNETERR_ROLE_P2P_ERR                                           (-4109L) /**< Failure to load MAC/PHY in P2P role                                                                           */
411 #define SLNETERR_CALIB_FAIL                                             (-4110L) /**< Failure of calibration                                                                                        */
412 #define SLNETERR_RESTORE_IMAGE_COMPLETE                                 (-4113L) /**< Return to factory image completed, perform reset                                                              */
413 #define SLNETERR_UNKNOWN_ERR                                            (-4114L)
414 #define SLNETERR_GENERAL_ERR                                            (-4115L) /**< General error during init                                                                                     */
415 #define SLNETERR_WRONG_ROLE                                             (-4116L)
416 #define SLNETERR_INCOMPLETE_PROGRAMMING                                 (-4117L) /**< Error during programming, Program new image should be invoked (see sl_FsProgram)                              */
417 
418 
419 #define SLNETERR_PENDING_TXRX_STOP_TIMEOUT_EXP                          (-4118L) /**< Timeout expired before completing all TX/RX                                                                   */
420 #define SLNETERR_PENDING_TXRX_NO_TIMEOUT                                (-4119L) /**< No Timeout, still have pending  TX/RX                                                                         */
421 #define SLNETERR_INVALID_PERSISTENT_CONFIGURATION                       (-4120L) /**< persistent configuration can only be set to 0 (disabled) or 1 (enabled)                                      */
422 
423 
424 
425 /* NETAPP ERRORS CODES*/
426 #define SLNETERR_MDNS_CREATE_FAIL                                       (-6145L) /**< mDNS create failed                                   */
427 #define SLNETERR_DEVICE_NAME_LEN_ERR                                    (-6146L) /**< Set Dev name error codes                             */
428 #define SLNETERR_DEVICE_NAME_INVALID                                    (-6147L) /**< Set Dev name error codes                             */
429 #define SLNETERR_DOMAIN_NAME_LEN_ERR                                    (-6148L) /**< Set domain name error codes                          */
430 #define SLNETERR_DOMAIN_NAME_INVALID                                    (-6149L) /**< Set domain name error codes                          */
431 #define SLNETERR_NET_APP_DNS_QUERY_NO_RESPONSE                          (-6150L) /**< DNS query failed, no response                        */
432 #define SLNETERR_NET_APP_DNS_ERROR                                      (-6151L) /**< DNS internal error                                   */
433 #define SLNETERR_NET_APP_DNS_NO_SERVER                                  (-6152L) /**< No DNS server was specified                          */
434 #define SLNETERR_NET_APP_DNS_TIMEOUTR                                   (-6153L) /**< mDNS parameters error                                */
435 #define SLNETERR_NET_APP_DNS_QUERY_FAILED                               (-6154L) /**< DNS query failed; no DNS server sent an 'answer'     */
436 #define SLNETERR_NET_APP_DNS_BAD_ADDRESS_ERROR                          (-6155L) /**< Improperly formatted IPv4 or IPv6 address            */
437 #define SLNETERR_NET_APP_DNS_SIZE_ERROR                                 (-6156L) /**< DNS destination size is too small                    */
438 #define SLNETERR_NET_APP_DNS_MALFORMED_PACKET                           (-6157L) /**< Improperly formed or corrupted DNS packet received   */
439 #define SLNETERR_NET_APP_DNS_BAD_ID_ERROR                               (-6158L) /**< DNS packet from server does not match query ID       */
440 #define SLNETERR_NET_APP_DNS_PARAM_ERROR                                (-6159L) /**< Invalid params                                       */
441 #define SLNETERR_NET_APP_DNS_SERVER_NOT_FOUND                           (-6160L) /**< Server not found in Client list of DNS servers       */
442 #define SLNETERR_NET_APP_DNS_PACKET_CREATE_ERROR                        (-6161L) /**< Error creating DNS packet                            */
443 #define SLNETERR_NET_APP_DNS_EMPTY_DNS_SERVER_LIST                      (-6162L) /**< DNS Client's list of DNS servers is empty            */
444 #define SLNETERR_NET_APP_DNS_SERVER_AUTH_ERROR                          (-6163L) /**< Server not able to authenticate answer/authority data*/
445 #define SLNETERR_NET_APP_DNS_ZERO_GATEWAY_IP_ADDRESS                    (-6164L) /**< DNS Client IP instance has a zero gateway IP address */
446 #define SLNETERR_NET_APP_DNS_MISMATCHED_RESPONSE                        (-6165L) /**< Server response type does not match the query request*/
447 #define SLNETERR_NET_APP_DNS_DUPLICATE_ENTRY                            (-6166L) /**< Duplicate entry exists in DNS server table           */
448 #define SLNETERR_NET_APP_DNS_RETRY_A_QUERY                              (-6167L) /**< SOA status returned; web site only exists as IPv4    */
449 #define SLNETERR_NET_APP_DNS_INVALID_ADDRESS_TYPE                       (-6168L) /**< IP address type (e.g. IPv6L) not supported           */
450 #define SLNETERR_NET_APP_DNS_IPV6_NOT_SUPPORTED                         (-6169L) /**< IPv6 disabled                                        */
451 #define SLNETERR_NET_APP_DNS_NEED_MORE_RECORD_BUFFER                    (-6170L) /**< The buffer size is not enough.                       */
452 #define SLNETERR_NET_APP_MDNS_ERROR                                     (-6171L) /**< MDNS internal error.                                 */
453 #define SLNETERR_NET_APP_MDNS_PARAM_ERROR                               (-6172L) /**< MDNS parameters error.                               */
454 #define SLNETERR_NET_APP_MDNS_CACHE_ERROR                               (-6173L) /**< The Cache size is not enough.                        */
455 #define SLNETERR_NET_APP_MDNS_UNSUPPORTED_TYPE                          (-6174L) /**< The unsupported resource record type.                */
456 #define SLNETERR_NET_APP_MDNS_DATA_SIZE_ERROR                           (-6175L) /**< The data size is too big.                            */
457 #define SLNETERR_NET_APP_MDNS_AUTH_ERROR                                (-6176L) /**< Attempting to parse too large a data.                */
458 #define SLNETERR_NET_APP_MDNS_PACKET_ERROR                              (-6177L) /**< The packet can not add the resource record.          */
459 #define SLNETERR_NET_APP_MDNS_DEST_ADDRESS_ERROR                        (-6178L) /**< The destination address error.                       */
460 #define SLNETERR_NET_APP_MDNS_UDP_PORT_ERROR                            (-6179L) /**< The udp port error.                                  */
461 #define SLNETERR_NET_APP_MDNS_NOT_LOCAL_LINK                            (-6180L) /**< The message that not originate from the local link.  */
462 #define SLNETERR_NET_APP_MDNS_EXCEED_MAX_LABEL                          (-6181L) /**< The data exceed the max label size.                  */
463 #define SLNETERR_NET_APP_MDNS_EXIST_UNIQUE_RR                           (-6182L) /**< At least one unique record in the cache.             */
464 #define SLNETERR_NET_APP_MDNS_EXIST_ANSWER                              (-6183L) /**< At least one answer record in the cache.             */
465 #define SLNETERR_NET_APP_MDNS_EXIST_SAME_QUERY                          (-6184L) /**< Exist the same query.                                */
466 #define SLNETERR_NET_APP_MDNS_DUPLICATE_SERVICE                         (-6185L) /**< Duplicate service.                                   */
467 #define SLNETERR_NET_APP_MDNS_NO_ANSWER                                 (-6186L) /**< No response for one-shot query.                      */
468 #define SLNETERR_NET_APP_MDNS_NO_KNOWN_ANSWER                           (-6187L) /**< No known answer for query.                           */
469 #define SLNETERR_NET_APP_MDNS_NAME_MISMATCH                             (-6188L) /**< The name mismatch.                                   */
470 #define SLNETERR_NET_APP_MDNS_NOT_STARTED                               (-6189L) /**< MDNS does not start.                                 */
471 #define SLNETERR_NET_APP_MDNS_HOST_NAME_ERROR                           (-6190L) /**< MDNS host name error.                                */
472 #define SLNETERR_NET_APP_MDNS_NO_MORE_ENTRIES                           (-6191L) /**< No more entries be found.                            */
473 #define SLNETERR_NET_APP_MDNS_SERVICE_TYPE_MISMATCH                     (-6192L) /**< The service type mismatch                            */
474 #define SLNETERR_NET_APP_MDNS_LOOKUP_INDEX_ERROR                        (-6193L) /**< Index is bigger than number of services.             */
475 #define SLNETERR_NET_APP_MDNS_MAX_SERVICES_ERROR                        (-6194L)
476 #define SLNETERR_NET_APP_MDNS_IDENTICAL_SERVICES_ERROR                  (-6195L)
477 #define SLNETERR_NET_APP_MDNS_EXISTED_SERVICE_ERROR                     (-6196L)
478 #define SLNETERR_NET_APP_MDNS_ERROR_SERVICE_NAME_ERROR                  (-6197L)
479 #define SLNETERR_NET_APP_MDNS_RX_PACKET_ALLOCATION_ERROR                (-6198L)
480 #define SLNETERR_NET_APP_MDNS_BUFFER_SIZE_ERROR                         (-6199L)
481 #define SLNETERR_NET_APP_MDNS_NET_APP_SET_ERROR                         (-6200L)
482 #define SLNETERR_NET_APP_MDNS_GET_SERVICE_LIST_FLAG_ERROR               (-6201L)
483 #define SLNETERR_NET_APP_MDNS_MDNS_NO_CONFIGURATION_ERROR               (-6202L)
484 #define SLNETERR_NET_APP_MDNS_STATUS_ERROR                              (-6203L)
485 #define SLNETERR_NET_APP_ENOBUFS                                        (-6204L)
486 #define SLNETERR_NET_APP_DNS_IPV6_REQ_BUT_IPV6_DISABLED                 (-6205L) /**< trying to issue ipv6 DNS request but ipv6 is disabled                          */
487 #define SLNETERR_NET_APP_DNS_INVALID_FAMILY_TYPE                        (-6206L) /**< Family type is not ipv4 and not ipv6                                           */
488 #define SLNETERR_NET_APP_DNS_REQ_TOO_BIG                                (-6207L) /**< DNS request size is too big                                                    */
489 #define SLNETERR_NET_APP_DNS_ALLOC_ERROR                                (-6208L) /**< Allocation error                                                               */
490 #define SLNETERR_NET_APP_DNS_EXECUTION_ERROR                            (-6209L) /**< Execution error                                                                */
491 #define SLNETERR_NET_APP_P2P_ROLE_IS_NOT_CONFIGURED                     (-6210L) /**< role p2p is not configured yet, should be CL or GO in order to execute command */
492 #define SLNETERR_NET_APP_INCORECT_ROLE_FOR_APP                          (-6211L) /**< incorrect role for specific application                                        */
493 #define SLNETERR_NET_APP_INCORECT_APP_MASK                              (-6212L) /**< mask does not match any app                                                    */
494 #define SLNETERR_NET_APP_MDNS_ALREADY_STARTED                           (-6213L) /**< mdns application already started                                               */
495 #define SLNETERR_NET_APP_HTTP_SERVER_ALREADY_STARTED                    (-6214L) /**< http server application already started                                        */
496 
497 #define SLNETERR_NET_APP_HTTP_GENERAL_ERROR                             (-6216L) /**< New error - Http handle request failed                                         */
498 #define SLNETERR_NET_APP_HTTP_INVALID_TIMEOUT                           (-6217L) /**< New error - Http timeout invalid argument                                      */
499 #define SLNETERR_NET_APP_INVALID_URN_LENGTH                             (-6218L) /**< invalid URN length                                                             */
500 #define SLNETERR_NET_APP_RX_BUFFER_LENGTH                               (-6219L) /**< size of the requested services is smaller than size of the user buffer */
501 
502 
503 
504 /*< NETCFG ERRORS CODES*/
505 #define SLNETERR_STATIC_ADDR_SUBNET_ERROR                               (-8193L)
506 #define SLNETERR_INCORRECT_IPV6_STATIC_LOCAL_ADDR                       (-8194L) /**< Ipv6 Local address prefix is wrong */
507 #define SLNETERR_INCORRECT_IPV6_STATIC_GLOBAL_ADDR                      (-8195L) /**< Ipv6 Global address prefix is wrong */
508 #define SLNETERR_IPV6_LOCAL_ADDR_SHOULD_BE_SET_FIRST                    (-8195L) /**< Attempt to set ipv6 global address before ipv6 local address is set */
509 
510 
511 
512 /* NETUTIL ERRORS CODES */
513 #define SLNETERR_NETUTIL_CRYPTO_GENERAL                                 (-12289L)
514 #define SLNETERR_NETUTIL_CRYPTO_INVALID_INDEX                           (-12290L)
515 #define SLNETERR_NETUTIL_CRYPTO_INVALID_PARAM                           (-12291L)
516 #define SLNETERR_NETUTIL_CRYPTO_MEM_ALLOC                               (-12292L)
517 #define SLNETERR_NETUTIL_CRYPTO_INVALID_DB_VER                          (-12293L)
518 #define SLNETERR_NETUTIL_CRYPTO_UNSUPPORTED_OPTION                      (-12294L)
519 #define SLNETERR_NETUTIL_CRYPTO_BUFFER_TOO_SMALL                        (-12295L)
520 #define SLNETERR_NETUTIL_CRYPTO_EMPTY_DB_ENTRY                          (-12296L)
521 #define SLNETERR_NETUTIL_CRYPTO_NON_TEMPORARY_KEY                       (-12297L)
522 #define SLNETERR_NETUTIL_CRYPTO_DB_ENTRY_NOT_FREE                       (-12298L)
523 #define SLNETERR_NETUTIL_CRYPTO_CORRUPTED_DB_FILE                       (-12299L)
524 
525 
526 
527 /* GENERAL ERRORS CODES*/
528 #define SLNETERR_INVALID_OPCODE                                         (-14337L)
529 #define SLNETERR_INVALID_PARAM                                          (-14338L)
530 #define SLNETERR_STATUS_ERROR                                           (-14341L)
531 #define SLNETERR_NVMEM_ACCESS_FAILED                                    (-14342L)
532 #define SLNETERR_NOT_ALLOWED_NWP_LOCKED                                 (-14343L) /**< Device is locked, Return to Factory Image or Program new image should be invoked (see sl_FsCtl, sl_FsProgram) */
533 
534 /* SECURITY ERRORS CODE */
535 #define SLNETERR_LOADING_CERTIFICATE_STORE                              (-28673L)
536 
537 /* Device is Locked! Return to Factory Image or Program new
538    image should be invoked (see sl_FsCtl, sl_FsProgram) */
539 #define SLNETERR_DEVICE_LOCKED_SECURITY_ALERT                           (-28674L)
540 
541 
542 
543 /* INTERNAL HOST ERRORS CODES*/
544 
545 /* Receive this error in case there are no resources to issue the command
546    If possible, increase the number of MAX_CONCURRENT_ACTIONS (result in memory increase)
547    If not, try again later */
548 #define SLNETERR_POOL_IS_EMPTY                                          (-2000L)
549 
550 /* Receive this error in case a given length for RX buffer was too small.
551    Receive payload was bigger than the given buffer size. Therefore, payload is cut according to receive size
552    Recommend to increase buffer size */
553 #define SLNETERR_ESMALLBUF                                              (-2001L)
554 
555 /* Receive this error in case zero length is supplied to a "get" API
556    Recommend to supply length according to requested information (view options defines for help) */
557 #define SLNETERR_EZEROLEN                                               (-2002L)
558 
559 /* User supplied invalid parameter */
560 #define SLNETERR_INVALPARAM                                             (-2003L)
561 
562 /* Failed to open interface  */
563 #define SLNETERR_BAD_INTERFACE                                          (-2004L)
564 
565 /* API has been aborted due to an error detected by host driver */
566 #define SLNETERR_API_ABORTED                                            (-2005L)
567 
568 /* Parameters are invalid */
569 #define SLNETERR_RET_CODE_INVALID_INPUT                                 (-2006L)
570 
571 /* Driver internal error */
572 #define SLNETERR_RET_CODE_SELF_ERROR                                    (-2007L)
573 
574 /* NWP internal error */
575 #define SLNETERR_RET_CODE_NWP_IF_ERROR                                  (-2008L)
576 
577 /* malloc error */
578 #define SLNETERR_RET_CODE_MALLOC_ERROR                                  (-2009L)
579 
580 /* protocol error */
581 #define SLNETERR_RET_CODE_PROTOCOL_ERROR                                (-2010L)
582 
583 /* API has been aborted, command is not allowed in device lock state */
584 #define SLNETERR_RET_CODE_DEV_LOCKED                                    (-2011L)
585 
586 /* SlNetSock_Start cannot be invoked twice */
587 #define SLNETERR_RET_CODE_DEV_ALREADY_STARTED                           (-2012L)
588 
589 /* SL Net API is in progress */
590 #define SLNETERR_RET_CODE_API_COMMAND_IN_PROGRESS                       (-2013L)
591 
592 /* Provisioning is in progress -  */
593 #define SLNETERR_RET_CODE_PROVISIONING_IN_PROGRESS                      (-2014L)
594 
595 /* Wrong ping parameters - ping cannot be called with the following parameters:
596 1. infinite ping packet
597 2. report only when finished
598 3. no callback supplied  */
599 #define SLNETERR_RET_CODE_NET_APP_PING_INVALID_PARAMS                   (-2015L)
600 
601 
602 /* SlNetSock select already in progress.
603    this error will be returned if app will try to call
604    SlNetSock_select blocking when there is already select trigger in progress */
605 #define SLNETERR_RET_CODE_SOCKET_SELECT_IN_PROGRESS_ERROR               (-2016L)
606 
607 #define SLNETERR_RET_CODE_STOP_IN_PROGRESS                              (-2017L)
608 
609 
610 /* The device has not been started yet */
611 #define SLNETERR_RET_CODE_DEV_NOT_STARTED                               (-2018L)
612 
613 /* The event link was not found in the list */
614 #define SLNETERR_RET_CODE_EVENT_LINK_NOT_FOUND                          (-2019L)
615 
616 /* Function couldn't find any free space/location */
617 #define SLNETERR_RET_CODE_NO_FREE_SPACE                                 (-2020L)
618 
619 /* Function couldn't execute correctly */
620 #define SLNETERR_RET_CODE_FUNCTION_FAILED                               (-2021L)
621 
622 /* Mutex creation failed */
623 #define SLNETERR_RET_CODE_MUTEX_CREATION_FAILED                         (-2022L)
624 
625 /* Function couldn't find the requested resource */
626 #define SLNETERR_RET_CODE_COULDNT_FIND_RESOURCE                         (-2023L)
627 
628 /* Interface doesn't support the non mandatory function */
629 #define SLNETERR_RET_CODE_DOESNT_SUPPORT_NON_MANDATORY_FXN              (-2024L)
630 
631 /* Socket creation in progress */
632 #define SLNETERR_RET_CODE_SOCKET_CREATION_IN_PROGRESS                   (-2025L)
633 
634 /* Unsupported scenario, option or feature */
635 #define SLNETERR_RET_CODE_UNSUPPORTED                                   (-2026L)
636 
637 
638 /* sock related API's from SlNetIf_Config_t failed */
639 #define SLNETSOCK_ERR_SOCKCREATE_FAILED                                 (-3000L)
640 #define SLNETSOCK_ERR_SOCKCLOSE_FAILED                                  (-3001L)
641 #define SLNETSOCK_ERR_SOCKSELECT_FAILED                                 (-3002L)
642 #define SLNETSOCK_ERR_SOCKSETOPT_FAILED                                 (-3003L)
643 #define SLNETSOCK_ERR_SOCKGETOPT_FAILED                                 (-3004L)
644 #define SLNETSOCK_ERR_SOCKRECVFROM_FAILED                               (-3005L)
645 #define SLNETSOCK_ERR_SOCKSENDTO_FAILED                                 (-3006L)
646 #define SLNETSOCK_ERR_SOCKSHUTDOWN_FAILED                               (-3007L)
647 #define SLNETSOCK_ERR_SOCKACCEPT_FAILED                                 (-3008L)
648 #define SLNETSOCK_ERR_SOCKBIND_FAILED                                   (-3009L)
649 #define SLNETSOCK_ERR_SOCKLISTEN_FAILED                                 (-3000L)
650 #define SLNETSOCK_ERR_SOCKCONNECT_FAILED                                (-3001L)
651 #define SLNETSOCK_ERR_SOCKGETPEERNAME_FAILED                            (-3002L)
652 #define SLNETSOCK_ERR_SOCKGETLOCALNAME_FAILED                           (-3003L)
653 #define SLNETSOCK_ERR_SOCKRECV_FAILED                                   (-3004L)
654 #define SLNETSOCK_ERR_SOCKSEND_FAILED                                   (-3005L)
655 #define SLNETSOCK_ERR_SOCKSTARTSEC_FAILED                               (-3006L)
656 
657 /* util related API's from SlNetIf_Config_t failed */
658 #define SLNETUTIL_ERR_UTILGETHOSTBYNAME_FAILED                          (-3100L)
659 
660 /*
661  * base for util error codes related to SlNetUtil_getAddrInfo and
662  * SlNetUtil_gaiStrErr
663  */
664 #define SLNETUTIL_EAI_BASE                                              (-3120L)
665 
666 /*
667  * util error codes related to SlNetUtil_getAddrInfo and SlNetUtil_gaiStrErr
668  * The numbering of these codes MUST match the order of the strErrorMsgs array
669  * in <ti/net/slnetutils.c>
670  */
671 #define SLNETUTIL_EAI_AGAIN                                             (-3121L)
672 #define SLNETUTIL_EAI_BADFLAGS                                          (-3122L)
673 #define SLNETUTIL_EAI_FAIL                                              (-3123L)
674 #define SLNETUTIL_EAI_FAMILY                                            (-3124L)
675 #define SLNETUTIL_EAI_MEMORY                                            (-3125L)
676 #define SLNETUTIL_EAI_NONAME                                            (-3126L)
677 #define SLNETUTIL_EAI_SERVICE                                           (-3127L)
678 #define SLNETUTIL_EAI_SOCKTYPE                                          (-3128L)
679 #define SLNETUTIL_EAI_SYSTEM                                            (-3129L)
680 #define SLNETUTIL_EAI_OVERFLOW                                          (-3130L)
681 #define SLNETUTIL_EAI_ADDRFAMILY                                        (-3131L)
682 
683 /* if related API's from SlNetIf_Config_t failed */
684 #define SLNETIF_ERR_IFLOADSECOBJ_FAILED                                 (-3200L)
685 #define SLNETIF_ERR_IFGETIPADDR_FAILED                                  (-3201L)
686 #define SLNETIF_ERR_IFGETCONNECTIONSTATUS_FAILED                        (-3202L)
687 #define SLNETIF_ERR_IFCREATECONTEXT_FAILED                              (-3203L)
688 
689 /*!
690 
691  Close the Doxygen group.
692  @}
693 
694 */
695 
696 #ifdef  __cplusplus
697 }
698 #endif /*  __cplusplus */
699 
700 #endif  /*  __SL_NET_ERR_H__ */
701