1 /*******************************
2 * file: netapi_err.h
3 * purpose: netapi error codes
4 **************************************************************
5 * @file netapi.h
6 *
7 * @brief DESCRIPTION: netapi Error Definitions for user space transport
8 * library
9 *
10 * REVISION HISTORY: rev 0.0.1
11 *
12 * Copyright (c) Texas Instruments Incorporated 2013
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 *
18 * Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 *
21 * Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the
24 * distribution.
25 *
26 * Neither the name of Texas Instruments Incorporated nor the names of
27 * its contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 ******************************/
44 #ifndef __NETAPI_ERR__
45 #define __NETAPI_ERR__
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
51 /**
52 * @ingroup cfg_constants
53 * @brief One per thread/core, used in most NETAPI function calls, returned from call to netapi_init().
54 */
55 typedef void * NETAPI_T;
59 /**
60 * @defgroup netapi_RetValue NETAPI API Return Values
61 * @ingroup netapi
62 */
63 /** @ingroup nwal_RetValue */
64 typedef int16_t netapi_RetValue;
66 /** @defgroup netapi_errors NETAPI Error Return Values
67 * @ingroup netapi
68 */
70 /**
71 * @def NETAPI_ERR_OK
72 * @ingroup netapi_errors
73 * No error
74 */
75 #define NETAPI_ERR_OK 0
77 /**
78 * @def NETAPI_ERR_NOMEM
79 * @ingroup netapi_errors
80 * @brief out of memory error
81 */
82 #define NETAPI_ERR_NOMEM -1
84 /**
85 * @def NETAPI_ERR_BAD_INPUT
86 * @ingroup netapi_errors
87 * @brief arguments or configuraiton is invalid
88 */
89 #define NETAPI_ERR_BAD_INPUT -2
91 /**
92 * @def NETAPI_ERR_QLLD
93 * @ingroup netapi_errors
94 * @brief QUEUE MANAGER Reports an error
95 */
96 #define NETAPI_ERR_QLLD -3
98 /**
99 * @def NETAPI_ERR_NOTFOUND
100 * @ingroup netapi_errors
101 * @brief the resource cannot be located
102 */
103 #define NETAPI_ERR_NOTFOUND -4
104 /**
105 * @def NETAPI_ERR_BUSY
106 * @ingroup netapi_errors
107 * @brief Temporarily out of resources or resource leak
108 */
109 #define NETAPI_ERR_BUSY -5
111 /**
112 * @def NETAPI_ERR_NWAL_ERR0
113 * @ingroup netapi_errors
114 * @brief NWAL subsytem reports error
115 */
116 #define NETAPI_ERR_NWAL_ERR0 -6
118 /**
119 * @def NETAPI_ERR_NOT_IMPLEMENTED
120 * @ingroup netapi_errors
121 * @brief Feature not implemented in this version
122 */
123 #define NETAPI_ERR_NOT_IMPLEMENTED -7
125 /**
126 * @def NETAPI_ERR_NORES
127 * @ingroup netapi_errors
128 * @brief no free (hw) resources available
129 */
130 #define NETAPI_ERR_NORES -8
132 /**
133 * @def NETAPI_ERR_NORES
134 * @ingroup netapi_errors
135 * @brief error returned by NETCP PA firmware
136 */
137 #define NETAPI_ERR_PA_FW -9
140 /**
141 * @def NETAPI_ERR_ALREADY_CANCELLED
142 * @ingroup netapi_errors
143 * @brief timer has already been cancelled
144 */
145 #define NETAPI_ERR_ALREADY_CANCELLED -100
147 /**
148 * @def NETAPI_ERR_NWAL_TX_ERR
149 * @ingroup netapi_errors
150 * @brief error trying to send to NWAL.
151 */
152 #define NETAPI_ERR_NWAL_TX_ERR -65536
154 #ifdef __cplusplus
155 }
156 #endif
159 #endif