errorcodes.h

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information

Go to the documentation of this file.

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