errorcodes.h Source File

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: include/ntapi/errorcodes.h Source File
errorcodes.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2023 Napatech A/S.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Napatech A/S nor the
14  * names of its contributors may be used to endorse or promote products
15  * derived from this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL NAPATECH A/S BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  *
29 
30  */
31 
32 /**
33  * @file
34  * Error codes and error strings.
35  */
36 
37 #ifndef __ERRORCODES_H__
38 #define __ERRORCODES_H__
39 
40 /** @def NT_ERRBUF_SIZE
41  * @brief Maximum error message size.
42  *
43  * Use this define when creating an error buffer to be sure that there is
44  * room for the largest error message.
45  */
46 #define NT_ERRBUF_SIZE 128
47 
48 //! @cond Doxygen_Suppress
49 
50 #ifdef _WIN32
51  #ifdef LIBNTOS_EXPORTS
52  #define DLL_API __declspec(dllexport)
53  #else
54  #ifdef LIBNTOS_USE_STATIC
55  #define DLL_API
56  #else
57  #define DLL_API __declspec(dllimport)
58  #endif
59  #endif
60 #else
61  #define DLL_API
62 #endif
63 
64 #define NT_NTERROR_ERRORS 0x10000000 // Identifies an nterror code
65 #define NT_INTERNAL_ERRORS 0x20000000 // Marking an error internal in windows
66 #define NT_SYSTEM_ERRORS 0x40000000 // Marking an error as a system error in windows
67 
68 /* Error code groups */
69 #define NT_FIRST_GENERAL_ERROR (NT_INTERNAL_ERRORS + 0x0000)
70 #define NT_FIRST_FILTER_ERROR (NT_INTERNAL_ERRORS + 0x1000)
71 #define NT_FIRST_PARSER_ERROR (NT_INTERNAL_ERRORS + 0x2000)
72 #define NT_FIRST_NIM_ERROR (NT_INTERNAL_ERRORS + 0x3000)
73 #define NT_FIRST_AVR_ERROR (NT_INTERNAL_ERRORS + 0x4000)
74 #define NT_FIRST_AFU_ERROR (NT_INTERNAL_ERRORS + 0x5000)
75 
76 /**
77  * Error codes and error strings
78  *
79  * Format: param1: Error code enum
80  * param2: Error string
81  * param3: Error log string. Used when parameters are
82  * needed in the error string for logging
83  *
84  * The Enum is named:
85  * NT_ERROR_"error description"
86  *
87  * The error string will be named:
88  * NT_ERROR_"error description"_STRING (_STRING is added)
89  *
90  * The log error string will be named:
91  * NT_ERROR_"error description"_LOG_STRING (_LOG_STRING is
92  * added)
93  *
94  * When entering a new error code:
95  * Use macro NT_MAKE_ERR_SET to add a new error group with enum
96  * snd string.
97  * Use macro NT_MAKE_ERROR2 to add a new error code with enum and
98  * string
99  * Use macro NT_MAKE_ERROR3 to add a new error code with enum,
100  * string and log string
101  *
102  */
103 
104 /* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
105  *
106  * Due to the binary compatibility old and unused error codes must not be deleted.
107  * unless the API level is increased.
108  *
109  * New error codes must be added in the bottom of a set!
110  *
111  * NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE */
112 #undef NT_SUCCESS
113 
114 typedef int NtError_t;
115 
116 #define NT_ALL_ERROR_CODES \
117 NT_MAKE_ERR_SET(NT_SUCCESS, "Success", 0) \
118 /* Non errors */ \
119 NT_MAKE_ERR_SET(NT_STATUS_TIMEOUT, "Timeout", NT_FIRST_GENERAL_ERROR) \
120 NT_MAKE_ERROR2(NT_STATUS_TRYAGAIN, "Resource temporarily busy, try again") \
121 NT_MAKE_ERROR2(NT_STATUS_NO_DATA, "No data") \
122 NT_MAKE_ERROR2(NT_STATUS_NO_MORE_DATA, "No more data available") \
123 NT_MAKE_ERROR2(NT_STATUS_END_OF_FILE, "EOF indicator") \
124 /* Warnings */ \
125 /* General errors */ \
126 NT_MAKE_ERROR2(NT_ERROR_UNKNOWN_ERROR, "Unknown error") \
127 NT_MAKE_ERROR2(NT_ERROR_INTERNAL_ERROR, "Internal error") \
128 NT_MAKE_ERROR2(NT_ERROR_MEMORY_ALLOCATION_FAILED, "Memory allocation failed") \
129 NT_MAKE_ERROR3(NT_ERROR_PORT_OUT_OF_RANGE, "Port out of range", "Port %d out of range. Range is [0..%d].\n") \
130 NT_MAKE_ERROR3(NT_ERROR_IPPROTOCOL_OUT_OF_RANGE, "IpProtocol out of range", "Protocol %d out of range. Range is [0..%d].\n") \
131 NT_MAKE_ERROR3(NT_ERROR_ADAPTER_OUT_OF_RANGE, "Adapter out of range", "Adapter%d out of range. Range is [0..%d].\n") \
132 NT_MAKE_ERROR2(NT_ERROR_HOSTBUFFER_RX_OUT_OF_RANGE, "RX host buffer out of range")\
133 NT_MAKE_ERROR2(NT_ERROR_HOSTBUFFER_TX_OUT_OF_RANGE, "TX host buffer out of range")\
134 NT_MAKE_ERROR2(NT_ERROR_HOSTBUFFER_INVALID_TYPE, "Invalid host buffer type")\
135 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_COMMAND, "Command is not supported for this adapter") \
136 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_SEQUENCE, "The sequence, in which the commands are issued, is illegal on this adapter") \
137 NT_MAKE_ERROR2(NT_ERROR_UNKNOWN_COMMAND, "Unknown command") \
138 NT_MAKE_ERROR2(NT_ERROR_FAILED_GETTING_FASTLOCK, "Failed to get fastlock") \
139 NT_MAKE_ERROR2(NT_ERROR_FAILED_RELEASING_FASTLOCK, "Failed to release fastlock") \
140 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_NOT_STARTED, "NT Service is not started") \
141 NT_MAKE_ERROR2(NT_ERROR_INVALID_STREAM_POINTER, "Stream pointer invalid") \
142 NT_MAKE_ERROR2(NT_ERROR_INVALID_STREAM_HANDLE, "Stream handle invalid") \
143 NT_MAKE_ERROR2(NT_ERROR_WRONG_STREAM_TYPE, "Wrong stream type") \
144 NT_MAKE_ERROR2(NT_ERROR_ILLEGAL_TIMESTAMP_TYPE, "Illegal time stamp type") \
145 NT_MAKE_ERROR2(NT_ERROR_TIMESTAMP_VS_HDR_MISMATCH, "Detected a time stamp type setting and packet descriptor type setting mismatch") \
146 NT_MAKE_ERROR2(NT_ERROR_FAILED_SETTING_TIMESTAMP_TYPE, "Failed to set time stamp type") \
147 NT_MAKE_ERROR2(NT_ERROR_FAILED_TO_START_LOGGING, "Failed to start logging") \
148 NT_MAKE_ERROR2(NT_ERROR_FAILED_TO_READ_DRIVER_LOG, "Failed to read driver log") \
149 NT_MAKE_ERROR2(NT_ERROR_FAILED_TO_CLEAR_DRIVER_LOG, "Failed to clear driver log") \
150 NT_MAKE_ERROR2(NT_ERROR_DRIVER_ERROR, "Driver error") \
151 NT_MAKE_ERROR2(NT_ERROR_OS_IPC_RMID, "Unable to mark IPC area as destroyed") \
152 NT_MAKE_ERROR2(NT_ERROR_OS_NULL_SHM, "NULL pointer passed as shared memory") \
153 NT_MAKE_ERROR2(NT_ERROR_OS_CREATE_DMA, "Failed to create DMA buffer") \
154 NT_MAKE_ERROR2(NT_ERROR_OS_REQUEST_DMA, "Failed to request DMA buffer") \
155 NT_MAKE_ERROR2(NT_ERROR_OS_RELEASE_DMA, "Failed to release DMA buffer") \
156 NT_MAKE_ERROR2(NT_ERROR_OS_DMA_STILL_MAPPED, "Failed to release DMA buffer - need to unmap before releasing") \
157 NT_MAKE_ERROR2(NT_ERROR_OS_INVALID_ADAPTER, "OS Function called with invalid adapter number") \
158 NT_MAKE_ERROR2(NT_ERROR_OS_IOCTL_INVALID_PARAM, "Ioctl called with invalid parameter") \
159 NT_MAKE_ERROR2(NT_ERROR_OS_DMA_MAP, "Failed to map DMA memory") \
160 NT_MAKE_ERROR2(NT_ERROR_OS_COMM_CREATE_INVALID_TYPE, "CommCreate: invalid eType") \
161 NT_MAKE_ERROR2(NT_ERROR_OS_ACCEPT_CLIENT_TYPE, "CommAccept: invalid eType") \
162 NT_MAKE_ERROR2(NT_ERROR_OS_RECV_MSG_SIZE, "CommRecv: Message is too big") \
163 NT_MAKE_ERROR2(NT_ERROR_OS_RECV_MSG_CONN_LOST, "CommRecv: Connection lost while receiving") \
164 NT_MAKE_ERROR2(NT_ERROR_OS_FLOCK_OVERFLOW, "Too many locks in set") \
165 NT_MAKE_ERROR2(NT_ERROR_OS_FLOCKEND_INVALID_PARAM, "FastLockEnd called with invalid parameter") \
166 NT_MAKE_ERROR2(NT_ERROR_OS_FLOCK_AQUIRE, "Failed to acquire FastLock") \
167 NT_MAKE_ERROR2(NT_ERROR_OS_FLOCK_RELEASE, "Failed to release FastLock - CRITICAL ERROR!!") \
168 NT_MAKE_ERROR2(NT_ERROR_OS_IRQ_EVENT_WAIT_PARAM, "IRQEventWait called with invalid parameter") \
169 NT_MAKE_ERROR2(NT_ERROR_OS_NAMED_EVENT_INVALID_PARAM, "NamedEvenCreate called, but named events not yet created") \
170 NT_MAKE_ERROR2(NT_ERROR_OS_NAMED_EVENT_MAXED_OUT, "NamedEvenCreate called, but no more events available") \
171 NT_MAKE_ERROR2(NT_ERROR_CONFIG_NOT_SUPPORTED, "Configuration not supported")\
172 NT_MAKE_ERROR2(NT_ERROR_CONFIG_CONFLICT, "Configuration conflict")\
173 NT_MAKE_ERROR2(NT_ERROR_LOOPBACK_NOT_IMPLEMENTED, "Loopback not implemented")\
174 NT_MAKE_ERROR2(NT_ERROR_LOOPBACK_ARG_ILLEGAL, "Loopback argument illegal")\
175 NT_MAKE_ERROR2(NT_ERROR_LOOPBACK_CONFLICT, "Loopback configuration conflict")\
176 NT_MAKE_ERROR2(NT_ERROR_IFG_CONFIG_ERROR, "IFG min or max configuration error")\
177 NT_MAKE_ERROR2(NT_ERROR_ILLEGAL_TIMESTAMP_VALUE, "Illegal time stamp value") \
178 NT_MAKE_ERROR2(NT_ERROR_OPERATION_TIMEOUT, "An operation timed out") \
179 NT_MAKE_ERROR2(NT_ERROR_OPERATION_FAILED, "An operation failed") \
180 NT_MAKE_ERROR2(NT_ERROR_32_64_BIT_MISMATCH, "A 32bit/64bit mismatch between ntservice and NTAPI") \
181 NT_MAKE_ERROR2(NT_ERROR_LOOPBACK_NOT_AVAILABLE, "Loopback not available")\
182 NT_MAKE_ERROR2(NT_ERROR_NTHW_MODULE_NOT_SUPPORTED, "Nthw module register not in FPGA") \
183 NT_MAKE_ERROR3(NT_ERROR_NUMANODE_IS_OFFLINE, "NUMANode is offline", "NUMANode %u is offline") \
184 NT_MAKE_ERROR2(NT_ERROR_BONDING_SLAVE_TS_NO_CONFIG, "Bonding Slave misses timesync configuration") \
185 NT_MAKE_ERROR2(NT_ERROR_BONDING_MASTER_NO_TS_SYNC, "Bonding Master failed initial time synchronization") \
186 NT_MAKE_ERROR2(NT_ERROR_BONDING_SLAVE_NO_TS_SYNC, "Bonding Slave failed initial time synchronization") \
187 NT_MAKE_ERROR2(NT_ERROR_PERMISSION_DENIED, "Permission denied") \
188 NT_MAKE_ERROR2(NT_ERROR_INVALID_EVENT, "Invalid of unknown event type specified") \
189 NT_MAKE_ERROR2(NT_ERROR_EVENT_RAISE_NOT_ACTIVE, "Raising events not activated. Specify a listen event on open") \
190 NT_MAKE_ERROR2(NT_ERROR_TX_RINGBUFFER_NOT_SUPPORTED, "Tx ring buffer is not supported") \
191 NT_MAKE_ERROR2(NT_ERROR_TX_RINGBUFFER_PKT_SEND_FAILED, "Tx ring buffer packet send failed") \
192 NT_MAKE_ERROR2(NT_ERROR_VALUE_OUT_OF_RANGE, "A value was out of range") \
193 NT_MAKE_ERROR2(NT_ERROR_MALFORMED_ITEM, "Malformed item") \
194 NT_MAKE_ERROR3(NT_ERROR_GROUP_OUT_OF_RANGE, "GroupId out of range", "GroupId %d out of range. Range is [0..%d].\n") \
195 NT_MAKE_ERROR2(NT_ERROR_DESCR_BIT_POSITION_OUT_OF_RANGE, "The descriptor bit position is out of range") \
196 NT_MAKE_ERROR2(NT_ERROR_TX_DESCR_MODE_UNKNOWN, "The chosen TX descriptor is unknown or unsupported") \
197 NT_MAKE_ERROR2(NT_ERROR_FILE_OPEN, "A file open operation failed") \
198 NT_MAKE_ERROR2(NT_ERROR_FILE_READ, "A file read operation failed") \
199 NT_MAKE_ERROR2(NT_ERROR_FILE_WRITE, "A file write operation failed") \
200 NT_MAKE_ERROR2(NT_ERROR_THREAD_START, "Failed starting a thread") \
201 NT_MAKE_ERROR2(NT_ERROR_DRIVER_AND_NTAPI_VERSION_MISMATCH, "Mismatch of driver and NTAPI libraries") \
202 /* Filter error codes */ \
203 NT_MAKE_ERR_SET(NT_ERROR_SPLIT, "Split", NT_FIRST_FILTER_ERROR) \
204 NT_MAKE_ERROR2(NT_ERROR_FILTER_TOO_BIG, "The filter is too big") \
205 NT_MAKE_ERROR2(NT_ERROR_IMPLICIT_EMPTY_FILTER, "Implicit empty filter") \
206 NT_MAKE_ERROR2(NT_ERROR_RETRY, "Retry") \
207 NT_MAKE_ERROR2(NT_ERROR_CONFLICTING_FILTER, "Conflicting filter") \
208 NT_MAKE_ERROR2(NT_ERROR_IMPLICIT_ALL_FILTER, "Implicit all filter") \
209 NT_MAKE_ERROR2(NT_ERROR_NOT_MERGED, "Not merged") \
210 NT_MAKE_ERROR2(NT_ERROR_INVALID_NTPLID, "Invalid NtplId") \
211 NT_MAKE_ERROR2(NT_ERROR_NTPLID_ALREADY_USED, "NtplId is already used") \
212 NT_MAKE_ERROR2(NT_ERROR_INVALID_PORT, "Invalid port") \
213 NT_MAKE_ERROR2(NT_ERROR_PORTS_NOT_ON_SAME_ADAPTER, "Ports not on same adapter") \
214 NT_MAKE_ERROR2(NT_ERROR_INVALID_HASHMODE, "Invalid HashMode option for selected HashMode") \
215 NT_MAKE_ERROR2(NT_ERROR_SLICEOFFSET_ZERO, "SliceOffset cannot be 0 without a SliceAddHeader option") \
216 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_HASHMODE, "Unsupported hash mode") \
217 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_HASHMODE_OPTION, "Unsupported hash option") \
218 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_HASHMASK, "Unsupported hash mask") \
219 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_ERROR_FILTER, "Unsupported error filter") \
220 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_PROTOCOL_FILTER, "Unsupported protocol filter") \
221 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_IPMATCH_FILTER, "Unsupported IP match filter") \
222 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_KEYMATCH_FILTER, "Unsupported keymatch filter") \
223 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_KEY_FILTER, "Unsupported key filter") \
224 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_IPMATCHLIST_FILTER, "Unsupported IP match list filter") \
225 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_PATTERN_FILTER, "Unsupported pattern filter") \
226 NT_MAKE_ERROR2(NT_ERROR_WISMODE_ENABLED_ON_DESTINATION_PORT,"Wismode is enabled on destination port") \
227 NT_MAKE_ERROR2(NT_ERROR_IPMATCHLIST_LISTTYPE_CONFLICT, "IPMatchList ListType conflict") \
228 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_IPFMODE_OPTION, "Unsupported IPFMode option") \
229 NT_MAKE_ERROR2(NT_ERROR_UNKNOWN_DATATYPE, "KeySet value has unknown datatype") \
230 NT_MAKE_ERROR2(NT_ERROR_RESOURCE_IN_USE, "Resource is in use and cannot be released/re-configured") \
231 /* Parser error codes */ \
232 NT_MAKE_ERR_SET(NT_ERROR_SYNTAX_ERROR, "Syntax error", NT_FIRST_PARSER_ERROR) \
233 NT_MAKE_ERROR2(NT_ERROR_BUFFER_TOO_LONG, "Buffer too long") \
234 NT_MAKE_ERROR3(NT_ERROR_DUPLICATE_COMMAND, "Duplicate command", "Duplicate command \"%s\"") \
235 NT_MAKE_ERROR2(NT_ERROR_PORT_RANGE_OUT_OF_RANGE, "Port option must include all ports on the adapter") \
236 NT_MAKE_ERROR3(NT_ERROR_HOSTBUFFER_OUT_OF_RANGE, "Host buffer number out of range", "Host buffer number out of range: %d. Must be between %d and %d") \
237 NT_MAKE_ERROR3(NT_ERROR_INVALID_NUMANODE_RANGE, "Invalid NUMANode range", "Invalid NUMANode range: (%d..%d)") \
238 NT_MAKE_ERROR3(NT_ERROR_NUMANODE_OUT_OF_RANGE, "NUMANode out of range", "NUMANode out of range %d. Max NUMANode is %d") \
239 NT_MAKE_ERROR3(NT_ERROR_TOO_MANY_VALUES, "Too many values", "Too many values: Max %d values allowed") \
240 NT_MAKE_ERROR3(NT_ERROR_SWAPPED_RANGE, "Illegal range", "Illegal range (%d..%d). Must be swapped") \
241 NT_MAKE_ERROR3(NT_ERROR_STREAMID_OUT_OF_RANGE, "Stream ID out of range", "Stream ID out of range %d. Max Stream ID is %d") \
242 NT_MAKE_ERROR3(NT_ERROR_MISSING_STREAMID, "Missing stream ID", "Missing stream ID") \
243 NT_MAKE_ERROR3(NT_ERROR_SOURCE_PORT_OUT_OF_RANGE, "Source port number out of range", "Source port number out of range: %d. Max port number is %d") \
244 NT_MAKE_ERROR3(NT_ERROR_DESTINATION_PORT_OUT_OF_RANGE, "Destination port number out of range", "Destination port number out of range: %d. Max port number is %d") \
245 NT_MAKE_ERROR3(NT_ERROR_PRIORITY_OUT_OF_RANGE, "Priority out of range", "Priority out of range: %d") \
246 NT_MAKE_ERROR3(NT_ERROR_TIMEOUT_OUT_OF_RANGE, "Timeout out of range", "Timeout out of range: %d. Must be between %d and %d") \
247 NT_MAKE_ERROR3(NT_ERROR_OFFSET_OUT_OF_RANGE, "Offset out of range", "Offset out of range: %d. The maximum allowed value is %d") \
248 NT_MAKE_ERROR3(NT_ERROR_ILLEGAL_COMPERATOR, "Illegal comparator used", "Illegal comparator used in \"%s\"") \
249 NT_MAKE_ERROR3(NT_ERROR_MISSING_CHAR_IN_MACRO, "Missing character in macro name", "Missing '%c' in macro name") \
250 NT_MAKE_ERROR3(NT_ERROR_ILLEGAL_CHARACTERS_IN_MACRO_NAME, "Illegal characters in macro name", "Illegal characters in macro name '%c'") \
251 NT_MAKE_ERROR3(NT_ERROR_MACRO_NAME_TOO_LONG, "Macro name is too long", "Macro name is too long: %d chars. Max length is %d chars") \
252 NT_MAKE_ERROR3(NT_ERROR_ILLEGAL_CHARACTERS_IN_MACRO_DEF, "Illegal characters in macro definition", "Illegal characters in macro definition '%c'") \
253 NT_MAKE_ERROR3(NT_ERROR_MACRO_DEF_TOO_LONG, "Macro definition is too long", "Macro definition is too long. Max length is %d") \
254 NT_MAKE_ERROR2(NT_ERROR_INVALID_ARGS_IN_MACRO_DEF, "Invalid args in macro definition") \
255 NT_MAKE_ERROR3(NT_ERROR_POWER_SWITCH_DELAY_TOO_LARGE, "Power switch delay too large", "Power switch delay too large %d. Max delay is %d") \
256 NT_MAKE_ERROR2(NT_ERROR_RESERVEDDMAPOOLSIZE_MULTIPLE_OF_4, "ReservedDMAPoolSize must be a multiple of 4") \
257 NT_MAKE_ERROR3(NT_ERROR_NUMSEGMENTS_TOO_LARGE, "NumSegments out of range", "NumSegments must be between %d and %d") \
258 NT_MAKE_ERROR3(NT_ERROR_INVALID_SEGMENT_SIZE, "Invalid segment size", "Invalid segment size. Valid values are %u, %u and %u") \
259 NT_MAKE_ERROR3(NT_ERROR_INVALID_MAX_LATENCY, "Invalid max latency", "Invalid max latency. Must be between %d and %d") \
260 NT_MAKE_ERROR2(NT_ERROR_INVALID_MAX_LATENCY2, "Invalid max latency - must be a multiple of 100") \
261 NT_MAKE_ERROR3(NT_ERROR_EXT_DESC_LENGTH_LARGE, "Extended descriptor length too large", "Extended descriptor length too large. Must be less than %d") \
262 NT_MAKE_ERROR3(NT_ERROR_TIME_SYNC_OFFSET_LARGE, "Time sync offset too large", "Time sync offset too large - must be less than %d") \
263 NT_MAKE_ERROR3(NT_ERROR_IFG_TOO_LARGE, "IFG too large", "IFG too large. Must be less than %d") \
264 NT_MAKE_ERROR3(NT_ERROR_COLOR_OUT_OF_RANGE, "Color out of range", "Color out of range: %d. Max color is %d") \
265 NT_MAKE_ERROR3(NT_ERROR_SLICEOFFSET_OUT_OF_RANGE, "Slice offset out of range", "Slice offset out of range: %d. Max frame length is %d") \
266 NT_MAKE_ERROR3(NT_ERROR_SET_DESC_PORT_OUT_OF_RANGE, "Set descriptor port out of range", "Set descriptor port out of range: %d. Max port number is: %d") \
267 NT_MAKE_ERROR3(NT_ERROR_FILENAME_TOO_LONG, "File name too long", "File name too long: %d. Max length is %d") \
268 NT_MAKE_ERROR3(NT_ERROR_HASHVALUE_OUT_OF_RANGE, "Hash value out of range", "Hash value out of range: {0x%02X:0x%02X}. Max value is 0x%02X") \
269 NT_MAKE_ERROR3(NT_ERROR_HASHSPLIT_PART_OUT_OF_RANGE, "Hash split part out of range", "Hash split part %d out of range: Must be between %d and %d") \
270 NT_MAKE_ERROR3(NT_ERROR_HASHSPLIT_VALUE_OUT_OF_RANGE, "Hash split value out of range", "Hash split value %d out of range: Must be less than %d") \
271 NT_MAKE_ERROR3(NT_ERROR_HASHSPLIT_VALUE_RANGE_ERROR, "Hash split value range is illegal", "Hash split value range (%d..%d) is illegal: Value must be less than %d and in right order") \
272 NT_MAKE_ERROR3(NT_ERROR_HASHSPLIT_VALUE_LIST_ERROR, "Hash split value illegal", "Hash split value illegal - only one value allowed") \
273 NT_MAKE_ERROR3(NT_ERROR_NUMBER_RANGE_TOO_LARGE256, "Number too large", "Number too large (%d..%d): Must be less than %d") \
274 NT_MAKE_ERROR3(NT_ERROR_NUMBER_TOO_LARGE256, "Number too large", "Number too large %d: Must be less than %d") \
275 NT_MAKE_ERROR3(NT_ERROR_TOO_MANY_EVENTS, "Too many events", "Too many events: Max %d events allowed") \
276 NT_MAKE_ERROR3(NT_ERROR_LENGTH_TOO_LARGE, "Length too large", "Length too large %d. Must be less than %d") \
277 NT_MAKE_ERROR3(NT_ERROR_DATAMASK_OUT_OF_RANGE, "Data mask out of range", "Data mask out of range [%d:%d]. Must be less or equal to %d") \
278 NT_MAKE_ERROR3(NT_ERROR_BITMASK_ILLEGAL, "Bitmask illegal", "Bitmask illegal: Second value must be less than first value [%d..%d]") \
279 NT_MAKE_ERROR3(NT_ERROR_BITMASK_ILLEGAL31, "Bitmask illegal", "Bitmask illegal: First value must be less than 31 [%d..%d]") \
280 NT_MAKE_ERROR2(NT_ERROR_MISMATCH_DATATYPE_DATAVALUE, "Mismatch between DataType and DataValue") \
281 NT_MAKE_ERROR3(NT_ERROR_DATA_OUT_OF_RANGE, "Data out of range", "Data out of range %d. Must be less or equal to %d") \
282 NT_MAKE_ERROR3(NT_ERROR_DATA_OUT_OF_RANGE_HEX, "Data out of range", "Data out of range %X. Must be less or equal to %X") \
283 NT_MAKE_ERROR3(NT_ERROR_INVALID_DATA_RANGE, "Invalid data range", "Invalid data range (%d..%d). %d must be less than %d") \
284 NT_MAKE_ERROR3(NT_ERROR_DATA_RANGE_OUT_OF_RANGE, "Data out of range", "Data out of range (%d..%d). Must be less or equal to %d") \
285 NT_MAKE_ERROR2(NT_ERROR_DATATYPE_MUST_BE_DEFINED, "Data type must be defined") \
286 NT_MAKE_ERROR2(NT_ERROR_INVALID_BYTE_STRING_0X, "Invalid byte string. Missing \"0x\"") \
287 NT_MAKE_ERROR2(NT_ERROR_FEW_CHARACTERS_BYTE_STRING, "Too few characters in byte string") \
288 NT_MAKE_ERROR2(NT_ERROR_MANY_CHARACTERS_BYTE_STRING, "Too many characters in byte string") \
289 NT_MAKE_ERROR3(NT_ERROR_ILLEGAL_STRING_MUST_BE, "Illegal string", "Illegal string - must be %d characters long") \
290 NT_MAKE_ERROR2(NT_ERROR_MISSING_OR_ILLEGAL_DATATYPE, "Missing or illegal DataType") \
291 NT_MAKE_ERROR2(NT_ERROR_IP_ADDRESS_OUT_OF_RANGE, "IP address out of range") \
292 NT_MAKE_ERROR2(NT_ERROR_MAC_ADDRESS_OUT_OF_RANGE, "MAC address out of range") \
293 NT_MAKE_ERROR2(NT_ERROR_MISSING_FILTER_EXPRESSIONS, "Missing filter expressions") \
294 NT_MAKE_ERROR2(NT_ERROR_MISSING_STREAM_ID, "Missing stream ID") \
295 NT_MAKE_ERROR2(NT_ERROR_MISSING_EVENTS, "Missing events") \
296 NT_MAKE_ERROR2(NT_ERROR_DUPLICATE_MACRO, "Duplicate macro") \
297 NT_MAKE_ERROR2(NT_ERROR_MACRO_NOT_FOUND, "Error deleting macro - macro not found") \
298 NT_MAKE_ERROR2(NT_ERROR_MACRO_NO_ARGUMENT, "Cannot find argument in data") \
299 NT_MAKE_ERROR2(NT_ERROR_INVALID_NO_OF_ARGS_IN_MACRO_DEF, "Invalid number of arguments in macro definition") \
300 NT_MAKE_ERROR2(NT_ERROR_MISSING_PAREN_IN_MACRO_DEF, "Missing brackets '(' or ')' in macro argument") \
301 NT_MAKE_ERROR2(NT_ERROR_MISSING_COMMA_IN_MACRO_DEF, "Missing comma ',' in macro argument") \
302 NT_MAKE_ERROR2(NT_ERROR_INVALID_STREAM, "Invalid stream") \
303 NT_MAKE_ERROR2(NT_ERROR_NOT_NT_CAPFILE, "File doesn't contain correct file header") \
304 NT_MAKE_ERROR2(NT_ERROR_INSUFFICIENT_DATA, "Insufficient data") \
305 NT_MAKE_ERROR2(NT_ERROR_NO_BONDING_MASTER, "No bonding master detected") \
306 NT_MAKE_ERROR2(NT_ERROR_BONDING_PLACEMENT, "Master and slave adapters have not been configured together") \
307 NT_MAKE_ERROR2(NT_ERROR_HOSTBUFFER_MERGE, "Host buffer time stamp merge error") \
308 NT_MAKE_ERROR2(NT_ERROR_NO_ADAPTERS, "No adapters located in the system") \
309 NT_MAKE_ERROR2(NT_ERROR_SENSOR_NOT_FOUND, "The sensor cannot be located") \
310 NT_MAKE_ERROR2(NT_ERROR_IMAGE_CORRUPT, "Image is corrupt") \
311 NT_MAKE_ERROR2(NT_ERROR_IMAGE_NOT_COMPATIBLE, "Image is not compatible") \
312 NT_MAKE_ERROR2(NT_ERROR_NO_SAFEMODE, "There is no safe mode support") \
313 NT_MAKE_ERROR2(NT_ERROR_IMAGE_VERIFY_FAILED, "Image verification failed") \
314 NT_MAKE_ERROR2(NT_ERROR_IMAGE_UPDATE_IN_PROGRESS, "Image update already in progress") \
315 NT_MAKE_ERROR2(NT_ERROR_PROCESS_DOES_NOT_EXIST, "Process does not exist") \
316 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_EXTENDED_DESCRIPTOR, "The extended descriptor is not supported") \
317 NT_MAKE_ERROR2(NT_ERROR_LIBRARY_NOT_COMPATIBLE, "The library is not compatible") \
318 NT_MAKE_ERROR2(NT_ERROR_INVALID_PARAMETER, "The parameter is not valid") \
319 NT_MAKE_ERROR2(NT_ERROR_SHARED_MEM_CORRUPTED, "Shared memory corrupted") \
320 NT_MAKE_ERROR2(NT_ERROR_SHARED_MEM_ILLEGAL_VERSION, "Illegal version of shared memory") \
321 NT_MAKE_ERROR2(NT_ERROR_SERVICE_ERROR, "Not able to start the service - see the log") \
322 NT_MAKE_ERROR2(NT_ERROR_SERVER_CANNOT_CONNECT, "Server cannot connect") \
323 NT_MAKE_ERROR2(NT_ERROR_NT_INIT_ALREADY_CALLED, "NT_Init has already been called") \
324 NT_MAKE_ERROR2(NT_ERROR_HOSTBUFFER_MIX, "host buffers from in-line and capture adapters cannot be merged in a streamid") \
325 NT_MAKE_ERROR2(NT_ERROR_FEATURE_NOT_SUPPORTED, "Feature not supported") \
326 NT_MAKE_ERROR2(NT_ERROR_HASHMASK_ALREADY_SET, "Hash mask already set for the specified hash mode") \
327 NT_MAKE_ERROR2(NT_ERROR_SEGMENT_MERGE_CONFLICT, "Segment interface cannot merge traffic") \
328 NT_MAKE_ERROR2(NT_ERROR_TXPORT_MISSING, "TxPort option required for in-line adapters") \
329 NT_MAKE_ERROR2(NT_ERROR_NO_AVAILABLE_HOSTBUFFER, "No available host buffer found matching the command") \
330 NT_MAKE_ERROR2(NT_ERROR_MERGE_NOT_POSSIBLE, "Merging is not possible") \
331 NT_MAKE_ERROR2(NT_ERROR_INLINE_SEGMENT_CONFLICT, "The segment interface cannot be used with in-line adapters") \
332 NT_MAKE_ERROR2(NT_ERROR_MISSING_SOURCEPORT, "Missing source port") \
333 NT_MAKE_ERROR2(NT_ERROR_MISSING_DESTINATIONPORT, "Missing destination port") \
334 NT_MAKE_ERROR2(NT_ERROR_MISSING_HASHMASKS, "Missing hash masks") \
335 NT_MAKE_ERROR2(NT_ERROR_HASHMODE_ALREADY_SET, "Hash mode is already set") \
336 NT_MAKE_ERROR2(NT_ERROR_MISSING_SETUP_OPTION, "Missing setup option") \
337 NT_MAKE_ERROR2(NT_ERROR_TIMESTAMPTYPE_MIX, "Time stamp types cannot be mixed in a stream ID") \
338 NT_MAKE_ERROR2(NT_ERROR_STREAM_LOCK_LIST, "Failed to acquire the stream list lock") \
339 NT_MAKE_ERROR2(NT_ERROR_INVALID_PACKET, "Invalid packet") \
340 NT_MAKE_ERROR2(NT_ERROR_INVALID_PACKET_SIZE, "Invalid packet size - length must be 8 bytes aligned") \
341 NT_MAKE_ERROR2(NT_ERROR_RESOURCE_UNAVAILABLE, "Resource unavailable") \
342 NT_MAKE_ERROR2(NT_ERROR_LOG_FILE_ERROR, "Unable to open log file") \
343 NT_MAKE_ERROR2(NT_ERROR_INI_FILE_ERROR, "Illegal value found in the ini-file") \
344 NT_MAKE_ERROR2(NT_ERROR_INI_FILE_INTERNAL, "Internal error reading the ini-file") \
345 NT_MAKE_ERROR2(NT_ERROR_NTAPI_VERSION_MISMATCH, "NT_Init called with version mismatch") \
346 NT_MAKE_ERROR2(NT_ERROR_NTAPI_INFO_CLIENT_NOT_INIT, "NT_InfoOpen client not initialized") \
347 NT_MAKE_ERROR2(NT_ERROR_NTAPI_INFO_CLIENT_NULL_STREAM, "NT_Info stream is NULL") \
348 NT_MAKE_ERROR2(NT_ERROR_NTAPI_INFO_INVALID_HANDLE, "NT_Info invalid handle used") \
349 NT_MAKE_ERROR2(NT_ERROR_NTAPI_INFO_INVALID_CMD, "NT_Info invalid command") \
350 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_PORT_NO_TX_SUPPORT, "Port does not support TX") \
351 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_NO_TX_BUFFERS, "No TX buffers allocated on adapter") \
352 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_TX_PORTS_INVALID, "Some TX ports specified in TX mask are invalid") \
353 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_TX_PORT_INVALID, "TX ports specified is not in TX mask") \
354 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_TX_PKT_SIZE_INVALID, "TX packet size is not supported") \
355 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_TX_GET_OPTION_INVALID, "TX get option invalid") \
356 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_TX_TSI_NOT_SUPPORTED , "Timestamp inject configured but not supported") \
357 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_TX_L3_L4_CS_NOT_SUPPORTED , "Calculation of L3 and L4 checksum configured but not supported") \
358 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_FCS_NOT_SUPPORTED , "Calculation of FCS checksum configured but not supported") \
359 NT_MAKE_ERROR2(NT_ERROR_NTAPI_STAT_GET_FAILED, "Could not receive updated statistics in a reasonable time") \
360 NT_MAKE_ERROR2(NT_ERROR_NTAPI_STAT_GET_INVALID_CMD, "NT_StatRead called with unknown command") \
361 NT_MAKE_ERROR2(NT_ERROR_NTAPI_SYSTEM_NULL_STREAM, "NT_System stream is NULL - call NT_Open to create a stream") \
362 NT_MAKE_ERROR2(NT_ERROR_NTAPI_SYSTEM_INVALID_STREAM, "NT_System stream is invalid") \
363 NT_MAKE_ERROR2(NT_ERROR_NTAPI_SYSTEM_READ_INVALID_CMD, "NT_SystemRead called with unknown command") \
364 NT_MAKE_ERROR2(NT_ERROR_NTAPI_SYSTEM_READ_NO_VPD_SUPPORT, "NT_SystemRead VPD requested, but not supported") \
365 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NET_RELEASE_INVALID_BUF, "Tried to release an invalid buffer - timed out NetxxGet call must not be released") \
366 NT_MAKE_ERROR2(NT_ERROR_NTAPI_CLOSE_WITH_INUSE_BUFFERS, "NT_NetRxClose called with pending in-use buffers") \
367 NT_MAKE_ERROR2(NT_ERROR_NT_NOT_INITIALIZED, "NT not initialized")\
368 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_LIMITED_MODE, "NT service running in limited mode due to initialization errors - command not permitted")\
369 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_STARTUP_FAILED_VPD, "NT service startup failed - VPD initialization failed")\
370 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_INI_FILE_BUSID_CLASH, "The ini-file contains adapters with same bus ID")\
371 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_INI_FILE_ADAPTER_MISSING,"The ini-file contains adapters not present")\
372 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_INI_FILE_ADPTERX_MISSING,"The ini-file [Adapter(x)] not found")\
373 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBH_TX_FAILED, "Transmit failed")\
374 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBH_UNSUPPORTED_SDRAM, "SDRAM not supported")\
375 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_NOT_RUNNING, "HBM is not running")\
376 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_NO_EMPTY_SLOT, "HBM reports no empty slot found (internal error)")\
377 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_NO_TX_HOSTBUFFER, "HBM reports no free TX host buffers found")\
378 NT_MAKE_ERROR3(NT_ERROR_NT_SERVICE_HBM_NO_TX_HOSTBUFFER_NUMA,"HBM reports no free TX host buffers found", "HBM reports no free TX host buffers found on NUMA %d (requested numa %d)")\
379 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_HOSTBUF_IDX_ERROR, "HBM failed to find host buffer index (internal error)")\
380 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_STREAMMAP_ERROR, "HBM reports no free stream maps found (internal error)")\
381 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_EGRESS_ERROR, "HBM host buffer already mapped to egress port")\
382 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_EGRESS_MAP_ERROR, "HBM error - only RX host buffers may be mapped to an egress port")\
383 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_INIT_TOO_MANY_HB, "HBMInit: too many host buffers specified")\
384 NT_MAKE_ERROR2(NT_ERROR_NT_SERVICE_HBM_INIT_NO_NUMA, "HBMInit: no NUMA nodes specified")\
385 NT_MAKE_ERROR2(NT_ERROR_CPLD_INVALID_REG, "Invalid CPLD register to read/write")\
386 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_BONDING_READ_DAUGHTER_FAILED,"Adapter bonding: daughter board read failed")\
387 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_BONDING_INLINE_ADAPTER, "Adapter bonding: In-line adapters cannot be bonded with expansion cards")\
388 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_BONDING_TRAINING, "Adapter bonding: Expansion bus training failed")\
389 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_BONDING_SLAVE_ALREADY_BONDED,"Adapter bonding: Slave already bonded")\
390 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_BONDING_SLAVE_NOT_FOUND, "Adapter bonding: Failed to find bonded slave")\
391 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_BONDING_TOO_MANY_BUFFERS, "Adapter bonding: Too many host buffers defined (Total max 32)..")\
392 NT_MAKE_ERROR2(NT_ERROR_SDRAM_INIT_FAILED, "SDRAM DDR: Initialize controller failed (internal error)")\
393 NT_MAKE_ERROR2(NT_ERROR_SDRAM_CALIB_FAILED, "SDRAM DDR: Calibration failed (internal error)")\
394 NT_MAKE_ERROR2(NT_ERROR_SDRAM_SELFTEST_FAILED, "SDRAM DDR: Self test failed (internal error)")\
395 NT_MAKE_ERROR2(NT_ERROR_SDRAM_START_FAILED, "SDRAM DDR: Start failed (internal error)")\
396 NT_MAKE_ERROR2(NT_ERROR_SDRAM_CONFIGURE_FEEDS_FAILED, "SDRAM DDR: Configure feeds failed (internal error)")\
397 NT_MAKE_ERROR2(NT_ERROR_SENSOR_ADD_FAILED, "Add sensor failed (internal error)")\
398 NT_MAKE_ERROR2(NT_ERROR_VPD_FAILED, "No VPD info")\
399 NT_MAKE_ERROR2(NT_ERROR_VPD_INIT_FLASH_READ_FAILED, "VPD init: Flash read failed")\
400 NT_MAKE_ERROR2(NT_ERROR_VPD_INIT_DEFRAG_FAILED, "VPD init: Failed defragmenting sectors (internal error)")\
401 NT_MAKE_ERROR2(NT_ERROR_VPD_SUPPLIED_MEM_TOO_SMALL, "Not enough memory in buffer for VPD info")\
402 NT_MAKE_ERROR2(NT_ERROR_RESERVED1, "Reserved")\
403 NT_MAKE_ERROR2(NT_ERROR_RESERVED2, "Reserved")\
404 NT_MAKE_ERROR2(NT_ERROR_RESERVED3, "Reserved")\
405 NT_MAKE_ERROR2(NT_ERROR_NTPL_FILTER_UNSUPP_FPGA, "NTPL: Unsupported FPGA")\
406 NT_MAKE_ERROR2(NT_ERROR_NT_TERMINATING, "NT library is terminating")\
407 NT_MAKE_ERROR2(NT_ERROR_NT_READING_FLASH_FAILED, "Reading flash failed")\
408 NT_MAKE_ERROR2(NT_ERROR_NT_WRITING_FLASH_FAILED, "Writing flash failed")\
409 NT_MAKE_ERROR2(NT_ERROR_NT_INIT_SPI_FAILED, "Initialising SPI failed")\
410 NT_MAKE_ERROR2(NT_ERROR_NT_INIT_I2C_FAILED, "Initialising I2C failed")\
411 NT_MAKE_ERROR2(NT_ERROR_RXAUI_LINK_ERROR, "RXAUI link error")\
412 NT_MAKE_ERROR2(NT_ERROR_NIM_NOT_PRESENT, "NIM not present")\
413 NT_MAKE_ERROR2(NT_ERROR_PROFILE_NOT_ALLOWED, "The adapter cannot use the requested profile")\
414 NT_MAKE_ERROR2(NT_ERROR_LOG_NOT_READY, "The log is not ready")\
415 NT_MAKE_ERROR2(NT_ERROR_MERGE_NOT_ALLOWED, "Merge between different adapter types is not allowed")\
416 NT_MAKE_ERROR2(NT_ERROR_IPF_MERGE_NOT_ALLOWED, "IPF unmatched stream merge on in-line adapter not allowed")\
417 NT_MAKE_ERROR2(NT_ERROR_TX_LASER_DISABLE_NOT_SUPPORTED, "TX laser software disable is not supported")\
418 NT_MAKE_ERROR2(NT_ERROR_TX_LASER_DISABLE_FAILED, "TX laser disable failed")\
419 NT_MAKE_ERROR2(NT_ERROR_ADAPTER_NOT_SUPPORTED, "Adapter is not supported")\
420 NT_MAKE_ERROR2(NT_ERROR_PACKET_IF_NOT_SUPP, "When running PCAP header, the packet interface is not supported")\
421 NT_MAKE_ERROR2(NT_ERROR_MULTI_DATA_MASK, "Only one data mask definition allowed")\
422 NT_MAKE_ERROR2(NT_ERROR_HOSTBUFFER_TOO_SMALL, "The host buffer is too small")\
423 NT_MAKE_ERROR2(NT_ERROR_TXPORT_SAME_ADAPTER_MISMATCH, "A TX port is specified, receiving data from a capture adapter. The TX port must be on the same adapter as the receiving port(s)")\
424 NT_MAKE_ERROR2(NT_ERROR_TXPORT_INLINE_MISMATCH, "The TX port does not match an in-line adapter")\
425 NT_MAKE_ERROR2(NT_ERROR_TXPORT_PRODUCTFAMILY_MISMATCH, "The TX port does not match an adapter of same product family")\
426 NT_MAKE_ERROR2(NT_ERROR_STREAM_PROFILE_MISMATCH, "The stream cannot merge from adapters with different profiles")\
427 NT_MAKE_ERROR2(NT_ERROR_STREAM_PRODUCTFAMILY_MISMATCH, "The stream cannot merge from adapters of different product families") \
428 NT_MAKE_ERROR3(NT_ERROR_INVALID_NUMBER, "Syntax error - invalid number", "Syntax error - invalid number \"%s\"") \
429 NT_MAKE_ERROR3(NT_ERROR_HOSTBUFFERSIZE_OUT_OF_RANGE, "Host buffer size out of range", "Host buffer size %d MByte out of range - must be between %d MByte and %d MByte") \
430 NT_MAKE_ERROR2(NT_ERROR_RETRANSMIT_PORT_FILTER_NOT_ALLOWED, "Port filter is not allowed in retransmit") \
431 NT_MAKE_ERROR2(NT_ERROR_SLICE_RETX_WITHOUT_RETRANSMIT, "Cannot setup retransmit slicer without a retransmit destination port") \
432 NT_MAKE_ERROR2(NT_ERROR_PCI_BANDWIDTH_MEASUREMENT_FAILED, "The measurement of PCI bandwidth failed - please check the log") \
433 NT_MAKE_ERROR3(NT_ERROR_SENSOR_SOURCE_NOT_SUPPORTED, "Sensor source not supported", "Sensor source %d not supported") \
434 NT_MAKE_ERROR3(NT_ERROR_SENSOR_SOURCEINDEX_OUT_OF_RANGE, "Sensor source index out of range", "Sensor source index %d out of range - range is [0..%d]\n") \
435 NT_MAKE_ERROR3(NT_ERROR_SENSOR_INDEX_OUT_OF_RANGE, "Sensor index out of range", "Sensor index %d out of range - range is [0..%d]\n") \
436 NT_MAKE_ERROR2(NT_ERROR_SENSOR_LIMITS_OUT_OF_RANGE, "Sensor limits out of range")\
437 NT_MAKE_ERROR2(NT_ERROR_FILEHEADER_ONLY_ON_SEGMENTS, "The file header can only be retrieved when using the segment interface") \
438 NT_MAKE_ERROR2(NT_ERROR_STREAMID_TXPORT_MISMATCH, "The number of stream IDs and TX ports do not match") \
439 NT_MAKE_ERROR3(NT_ERROR_INVALID_VALUE, "Invalid value used", "Invalid value %d used\n") \
440 NT_MAKE_ERROR2(NT_ERROR_UNSUPPORTED_FPGA_MODULE, "The FPGA is not supported by the adapter") \
441 NT_MAKE_ERROR2(NT_ERROR_GLOBALSYNC_MODE_NOT_SUPPORTED, "Global sync mode not supported by inline adapters") \
442 NT_MAKE_ERROR2(NT_ERROR_I2C_OPERATION_FAILED, "I2C operation failed")\
443 NT_MAKE_ERROR2(NT_ERROR_WATCHDOG_TIMEOUT_OUT_OF_RANGE, "Watchdog timeout out of range") \
444 NT_MAKE_ERROR2(NT_ERROR_DELAY_OUT_OF_RANGE, "Delay out of range") \
445 NT_MAKE_ERROR2(NT_ERROR_ABSOLUTE_TX_TIMING, "Adapter does not support absolute TX timing") \
446 NT_MAKE_ERROR2(NT_ERROR_PORT_DISABLE, "Adapter does not support disabling of the ports") \
447 NT_MAKE_ERROR2(NT_ERROR_TIMESTAMP_INJECT_OFFSET, "Adapter does not support timestamp injection offset other than start of frame") \
448 NT_MAKE_ERROR2(NT_ERROR_GLOBAL_SYNC_INVALID, "IFG cannot be changed while in Global Sync mode") \
449 NT_MAKE_ERROR2(NT_ERROR_NT_SPI_RX_BUFFER_TOO_SMALL, "SPI RX buffer too small")\
450 NT_MAKE_ERROR2(NT_ERROR_TX_TIMING_NOT_SUPPORTED, "TX timing cannot be changed for the adapter") \
451 NT_MAKE_ERROR2(NT_ERROR_TS_INJECT_OFF_MODE_NOT_SUPPORTED, "Timestamp injection offset mode cannt be changed for the adapter") \
452 NT_MAKE_ERROR2(NT_ERROR_PTP_CFG_INVALID_PARAM, "PTP parameter configuration error") \
453 NT_MAKE_ERROR2(NT_ERROR_DRIVER_VERSION_MISMATCH, "The kernel driver version does not match the the user mode driver") \
454 NT_MAKE_ERROR3(NT_ERROR_MASKNO_OUT_OF_RANGE, "Mask Number out of range", "Mask number %d out of range. Must be between %d and %d") \
455 NT_MAKE_ERROR2(NT_ERROR_NTAPI_NT_INIT_NOT_CALLED, "NTAPI is not initialized - NT_Init() has not been called") \
456 NT_MAKE_ERROR2(NT_ERROR_NTAPI_INITIALIZING, "NTAPI is initializing") \
457 NT_MAKE_ERROR2(NT_ERROR_NTAPI_TERMINATING, "NTAPI is terminating") \
458 NT_MAKE_ERROR2(NT_ERROR_OUT_OF_RESOURCES, "No more resources available") \
459 NT_MAKE_ERROR2(NT_IPC_STATUS_CONNECTION_CLOSED, "IPC connection closed")\
460 NT_MAKE_ERROR2(NT_ERROR_DMA_OUT_OF_RANGE, "DMA memory physical address out of range") \
461 NT_MAKE_ERROR2(NT_ERROR_HOST_BUFFER_MEM_TOO_BIG, "Host buffer memory size exceeded")\
462 NT_MAKE_ERROR2(NT_ERROR_PTP_NOT_ENABLED_OR_NOT_AVAIL, "PTP is not enabled or not available")\
463 NT_MAKE_ERROR2(NT_ERROR_PTP_DEL_ASYM_OUT_OF_RANGE, "PTP delay asymmetry out of range")\
464 NT_MAKE_ERROR3(NT_ERROR_KEYLENGTH_OUT_OF_RANGE, "Key length out of range", "Key length out of range: %d. Must be less than or equal to %d") \
465 NT_MAKE_ERROR2(NT_ERROR_LINK_ERROR, "Link error")\
466 NT_MAKE_ERROR3(NT_ERROR_TOO_MANY_DESTINATION_PORTS, "Too many destination ports", "Too many destination ports: Max %d ports allowed") \
467 NT_MAKE_ERROR2(NT_ERROR_FILE_EMPTY, "Empty file")\
468 NT_MAKE_ERROR3(NT_ERROR_INVALID_IDENTIFIER, "Invalid identifier used", "Invalid identifier '%s' used\n") \
469 NT_MAKE_ERROR2(NT_ERROR_OPTIONS_MISSING, "At least one option must be specified")\
470 NT_MAKE_ERROR2(NT_ERROR_PCAP_NG_VERSION_NOT_SUPPORTED, "Supplied PCAP-NG file version is not supported")\
471 NT_MAKE_ERROR2(NT_ERROR_PCAP_NG_INVALID_RESOLUTION, "Invalid time stamp resolution found in PCAP-NG file")\
472 NT_MAKE_ERROR2(NT_ERROR_PCAP_NG_INVALID_PACKET_SIZE, "Invalid packet size found in PCAP-NG file")\
473 NT_MAKE_ERROR2(NT_ERROR_CAP_FILE_NOT_RECOGNIZED, "The supplied capture file format is not recognized")\
474 NT_MAKE_ERROR2(NT_ERROR_CAP_FILE_PACKET_TOO_LARGE, "Too large packets found. Captured with LRO (Large Receive Offload) enabled?")\
475 NT_MAKE_ERROR2(NT_ERROR_CAP_FILE_STORED_LENGTH_INVALID, "Packet with invalid stored length found")\
476 NT_MAKE_ERROR2(NT_ERROR_CAP_FILE_CREATION_ERROR, "Could not open target file for file format conversion")\
477 NT_MAKE_ERROR2(NT_ERROR_CAP_FILE_CORRUPTED_ERROR, "The capture file is corrupted")\
478 NT_MAKE_ERROR2(NT_ERROR_NSEB_NOT_ACTIVE, "NSEB interface not active")\
479 NT_MAKE_ERROR3(NT_ERROR_LENGTH_OUT_OF_RANGE, "Length out of range", "Length out of range (%d..%d)")\
480 NT_MAKE_ERROR2(NT_ERROR_MISSING_KEY_ACCESS_PARTIAL_BANK, "Bank option required for PARTIAL key access")\
481 NT_MAKE_ERROR2(NT_ERROR_MISSING_KEY_ACCESS_INVALID_BANK, "Bank option invalid for SINGLE and FULL key access")\
482 /* NIM error codes */ \
483 NT_MAKE_ERR_SET(NT_ERROR_NIM_ERROR, "NIM error", NT_FIRST_NIM_ERROR) \
484 NT_MAKE_ERROR2(NT_ERROR_NIM_ID_UNHANDLED, "NIM ID unhandled") \
485 NT_MAKE_ERROR2(NT_ERROR_NIM_FUNC_NOT_SUPP, "NIM function not supported") \
486 NT_MAKE_ERROR2(NT_ERROR_NIM_OPTION_NOT_SUPP, "NIM option not supported") \
487 NT_MAKE_ERROR2(NT_ERROR_NIM_NUMBER_OUT_OF_RANGE, "NIM number out of range") \
488 NT_MAKE_ERROR2(NT_ERROR_NIM_ADDRESS_OUT_OF_RANGE, "NIM address out of range") \
489 NT_MAKE_ERROR2(NT_ERROR_NIM_INTERNAL_ERROR, "NIM internal error") \
490 NT_MAKE_ERROR2(NT_ERROR_NIM_FUNC_FAILED, "NIM function failed") \
491 NT_MAKE_ERROR2(NT_ERROR_NIM_INSUFF_ARRAY_SIZE, "NIM insufficient array size") \
492 NT_MAKE_ERROR2(NT_ERROR_NIM_NOT_RECOGNISED, "NIM not recognised") \
493 NT_MAKE_ERROR2(NT_ERROR_NIM_PN_NOT_RECOGNISED, "NIM product number not recognised") \
494 NT_MAKE_ERROR2(NT_ERROR_NIM_PWR_CLASS_NOT_SUPPORTED, "NIM power class not supported") \
495 NT_MAKE_ERROR2(NT_ERROR_NIM_TYPE_NOT_SUPPORTED, "NIM type is not supported") \
496 NT_MAKE_ERROR2(NT_ERROR_NIM_NOT_ACCESSIBLE, "NIM not accessible") \
497 /* AVR error codes */ \
498 NT_MAKE_ERR_SET(NT_ERROR_AVR_ERROR, "AVR error", NT_FIRST_AVR_ERROR) \
499 NT_MAKE_ERROR2(NT_ERROR_AVR_RX_BUFFER_TOO_SMALL, "AVR RX buffer too small")\
500 NT_MAKE_ERROR2(NT_ERROR_AVR_OPCODE_RETURNED_ERROR, "AVR Opcode did not succeed and returned an error")\
501 NT_MAKE_ERROR2(NT_ERROR_AVR_UNKNOWN_OPCODE_RETURNED, "AVR did not know the opcode requested")\
502 NT_MAKE_ERROR2(NT_ERROR_AVR_RETURNED_DATA_COUNT_MISMATCH, "AVR returned an unexpected number of data bytes")\
503 NT_MAKE_ERROR2(NT_ERROR_AVR_LOG_VERSION_UNHANDLED, "AVR log version unhandled")\
504 NT_MAKE_ERROR2(NT_ERROR_AVR_LOG_INCONSISTENCY, "AVR log inconsistency")\
505 NT_MAKE_ERROR2(NT_ERROR_AVR_SENSOR_DATA_NOT_UPDATED, "AVR did not update sensor data")\
506 /* AFU error codes */ \
507 NT_MAKE_ERR_SET(NT_ERROR_AFU_ERROR, "AFU error", NT_FIRST_AFU_ERROR) \
508 NT_MAKE_ERROR2(NT_ERROR_AFU_FILE_HANDLING, "AFU File handling error")\
509 NT_MAKE_ERROR2(NT_ERROR_AFU_INVALID_PARAM, "AFU Invalid parameter supplied")\
510 NT_MAKE_ERROR2(NT_ERROR_AFU_BUSY, "AFU Resource is busy")\
511 NT_MAKE_ERROR2(NT_ERROR_AFU_EXCEPTION, "AFU An exception occurred")\
512 NT_MAKE_ERROR2(NT_ERROR_AFU_NOT_FOUND, "AFU A required resource was not found ")\
513 NT_MAKE_ERROR2(NT_ERROR_AFU_NOT_SUPPORTED, "AFU Requested operation is not supported")\
514 NT_MAKE_ERROR2(NT_ERROR_AFU_NO_DRIVER, "AFU Driver is not loaded")\
515 NT_MAKE_ERROR2(NT_ERROR_AFU_NO_DAEMON, "AFU FPGA Daemon (fpgad) is not running")\
516 NT_MAKE_ERROR2(NT_ERROR_AFU_NO_ACCESS, "AFU Insufficient privileges or permissions")\
517 NT_MAKE_ERROR2(NT_ERROR_AFU_RECONF_ERROR, "AFU Error while reconfiguring FPGA")\
518 // !!!Dont add non-AFU error code here
519 
520 //OBS!
521 //Before adding a new error code please consider if any of the groups already
522 //defined (using NT_MAKE_ERR_SET) can contain it which they can under most
523 //circumstances. If it is something completely new then consider defining a new group
524 
525 
526 /**
527  * Make error table macro
528  * a: Name of the error enum
529  * b: Error string
530  */
531 #define NT_MAKE_ERROR2(a, b) a,
532 /**
533  * Make error table macro
534  * a: Name of the error enum
535  * b: Error string
536  * c: Error log string
537  */
538 #define NT_MAKE_ERROR3(a, b, c) a,
539 /**
540  * Make error table macro
541  * a: Name of the error enum
542  * b: Error string
543  * c: Enum start value of new error group
544  */
545 #define NT_MAKE_ERR_SET(a, b, c) a = c,
546 
547 /****************************************************************************/
548 /* Make error code enums */
549 /****************************************************************************/
550 enum NtErrorCodes_e {
551  NT_ALL_ERROR_CODES
552 };
553 
554 /****************************************************************************/
555 /* Make error external definition strings for matching to an error code */
556 /****************************************************************************/
557 #undef NT_MAKE_ERROR2
558 #undef NT_MAKE_ERROR3
559 #undef NT_MAKE_ERR_SET
560 #define NT_MAKE_ERROR2(a, b) DLL_API extern char a##_STRING[];
561 #define NT_MAKE_ERROR3(a, b, c) DLL_API extern char a##_STRING[];
562 #define NT_MAKE_ERR_SET(a, b, c) DLL_API extern char a##_STRING[];
563 
564 NT_ALL_ERROR_CODES
565 
566 /****************************************************************************/
567 /* Make error external definition strings for logging (with parameters) */
568 /****************************************************************************/
569 #undef NT_MAKE_ERROR2
570 #undef NT_MAKE_ERROR3
571 #undef NT_MAKE_ERR_SET
572 #define NT_MAKE_ERROR2(a, b)
573 #define NT_MAKE_ERROR3(a, b, c) DLL_API extern char a##_LOG_STRING[];
574 #define NT_MAKE_ERR_SET(a, b, c)
575 
576 NT_ALL_ERROR_CODES
577 
578 /****************************************************************************/
579 /* Macros for getting error codes and error strings */
580 /****************************************************************************/
581 
582 #define NT_GET_ERROR_STRING(a) a##_STRING
583 #define NT_GET_LOG_ERROR_STRING(a) a##_LOG_STRING
584 
585 /****************************************************************************/
586 /* Windows specific macros */
587 /****************************************************************************/
588 #ifdef _WIN32
589 #define NT_GET_SYSTEM_ERRORS (GetLastError() | NT_SYSTEM_ERRORS)
590 #define NT_GET_SOCKET_ERRORS (WSAGetLastError() | NT_SYSTEM_ERRORS)
591 #endif
592 
593 //! @endcond
594 
595 #endif /* __ERRORCODES_H__ */