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__
48 /**
49 * @ingroup cfg_constants
50 * @brief One per thread/core, used in most NETAPI function calls, returned from call to netapi_init().
51 */
52 typedef void * NETAPI_T;
56 /**
57 * @defgroup netapi_RetValue NETAPI API Return Values
58 * @ingroup netapi
59 */
60 /** @ingroup nwal_RetValue */
61 typedef int16_t netapi_RetValue;
63 /** @defgroup netapi_errors NETAPI Error Return Values
64 * @ingroup netapi
65 */
67 /**
68 * @def NETAPI_ERR_OK
69 * @ingroup netapi_errors
70 * No error
71 */
72 #define NETAPI_ERR_OK 0
74 /**
75 * @def NETAPI_ERR_NOMEM
76 * @ingroup netapi_errors
77 * @brief out of memory error
78 */
79 #define NETAPI_ERR_NOMEM -1
81 /**
82 * @def NETAPI_ERR_BAD_INPUT
83 * @ingroup netapi_errors
84 * @brief arguments or configuraiton is invalid
85 */
86 #define NETAPI_ERR_BAD_INPUT -2
88 /**
89 * @def NETAPI_ERR_QLLD
90 * @ingroup netapi_errors
91 * @brief QUEUE MANAGER Reports an error
92 */
93 #define NETAPI_ERR_QLLD -3
95 /**
96 * @def NETAPI_ERR_NOTFOUND
97 * @ingroup netapi_errors
98 * @brief the resource cannot be located
99 */
100 #define NETAPI_ERR_NOTFOUND -4
101 /**
102 * @def NETAPI_ERR_BUSY
103 * @ingroup netapi_errors
104 * @brief Temporarily out of resources or resource leak
105 */
106 #define NETAPI_ERR_BUSY -5
108 /**
109 * @def NETAPI_ERR_NWAL_ERR0
110 * @ingroup netapi_errors
111 * @brief NWAL subsytem reports error
112 */
113 #define NETAPI_ERR_NWAL_ERR0 -6
115 /**
116 * @def NETAPI_ERR_NOT_IMPLEMENTED
117 * @ingroup netapi_errors
118 * @brief Feature not implemented in this version
119 */
120 #define NETAPI_ERR_NOT_IMPLEMENTED -7
122 /**
123 * @def NETAPI_ERR_NORES
124 * @ingroup netapi_errors
125 * @brief no free (hw) resources available
126 */
127 #define NETAPI_ERR_NORES -8
129 /**
130 * @def NETAPI_ERR_NORES
131 * @ingroup netapi_errors
132 * @brief error returned by NETCP PA firmware
133 */
134 #define NETAPI_ERR_PA_FW -9
137 /**
138 * @def NETAPI_ERR_ALREADY_CANCELLED
139 * @ingroup netapi_errors
140 * @brief timer has already been cancelled
141 */
142 #define NETAPI_ERR_ALREADY_CANCELLED -100
144 /**
145 * @def NETAPI_ERR_NWAL_TX_ERR
146 * @ingroup netapi_errors
147 * @brief error trying to send to NWAL.
148 */
149 #define NETAPI_ERR_NWAL_TX_ERR -65536
152 #endif