TOP

ASN.1/C API Return Codes

Applies to: ASN.1/C 11.0

This section provides a list of the API return values, global enumerators, and descriptions.

Code Error Description
0
PDU_DECODED
The PDU is successfully decoded.
1
MORE_BUF
The user-provided output buffer is too small.
2
NEGATIVE_UINTEGER
An INTEGER value that was constrained to be greater than zero is negative.
3
PDU_RANGE
The pdunum argument does not correspond to a PDU number generated by the ASN.1 compiler.
4
MORE_INPUT
The end of the input buffer was prematurely reached. The input->length field or the length field within the encoding is incorrect.
5
DATA_ERROR
The encoded data is structurally invalid (for example, a REAL encoding is invalid or an INTEGER value contains leading zero octets).
6
BAD_ARG
Bad input argument.
7
BAD_VERSION
There is a discrepancy between the files generated by the ASN.1 compiler and the runtime library you have linked. This is likely to occur when:
  • The files generated by a trial license compiler are linked with a non-trial runtime library or vice versa.
  • In general, compiler versions and runtime versions may be mixed. However, the output from 8.0+ compilers cannot be used with pre-8.0 runtimes, and vice versa.
  • The asn1dflt file used to identify the platform targeted by the compiler when cross-compiling does not match the actual target.
8
OUT_MEMORY
Out of memory.
9
BAD_CHOICE
The CHOICE selector is out of range.
9
PDU_MISMATCH
The PDU number that you specified does not match the tag found in the BER-encoded data. Make sure you pass the correct PDU number which corresponds to the encoded data you send to decode.
10
BAD_OBJID
An OBJECT IDENTIFIER conflicts with X.680 or the value specified is too large for the chosen C representation (if the latter is true, apply the OSS.OBJECTID LONG directive to the problematic type).
10
LIMITED
The implementation limit has been exceeded. For example, an INTEGER value is too large.
11
BAD_PTR
An unexpected NULL pointer was encountered in the input data.
12
BAD_TIME
The TIME type contains a value that is out of range.
13
INDEFINITE_NOT_SUPPORTED
The BER indefinite-length encoding is not supported.
14
MEM_ERROR
Memory violation signal was trapped.
15
BAD_TABLE
The control table is corrupt. The pointer is probably invalid.
16
TOO_LONG
An attempt was made to encode a type that exceeds the bounds set by the SIZE constraint, while strong constraint checking is disabled.
17
CONSTRAINT_VIOLATED
Subtype constraint is violated or ENUMERATED value is out of bounds.
18
FATAL_ERROR
ossinit() returns this error if the OSS ASN.1 Tools have not been installed properly on your system or if you are trying to use a feature which is not available. The encoder/decoder may return this error after experiencing a timeout when the socket memory manager is in use and the runtime compatibility flag OSS_NO_DETAIL_MM_ERROR_CODES is set (to change the allowed socket open wait time, use the ossSetTimeout() function).
19
ACCESS_SERIALIZATION_ERROR
Unable to serialize access to global data in a multi-threaded environment (applies only to Microsoft Windows).
20
NULL_TBL
ossinit() returns this error if the control table passed to it is NULL.
21
NULL_FCN
The compiler-generated code file contains a NULL pointer instead of a function address. The OssGlobal structure address is most likely invalid.
22
BAD_ENCRULES
The selected encoding rules are not supported.
23
UNAVAIL_ENCRULES
The encoding rules requested are not implemented or were not linked because the encoder/decoder function pointers were not initialized by a call to ossinit().
24
CANT_OPEN_TRACE_WINDOW
Error when opening a trace window (applies only to Microsoft Windows).
25
UNIMPLEMENTED
The function or C representation is not supported.
26
OID_DLL_NOT_LINKED
The OBJECT IDENTIFIER DLL was not linked or found (applies only to Microsoft Windows).
27
CANT_OPEN_TRACE_FILE
Unable to open trace file.
28
TRACE_FILE_ALREADY_OPEN
You are trying to open a trace file which is already open.
29
TABLE_MISMATCH
C++ API: The PDUcls() function was called with an ossControl object which refers to a control table different from the one that the PDU was defined in.
30
TYPE_NOT_SUPPORTED
The ASN.1 type is not supported.
31
REAL_DLL_NOT_LINKED
The REAL DLL was not linked or found (applies only to Microsoft Windows).
32
REAL_CODE_NOT_LINKED
The REAL code was not linked.
33
OUT_OF_RANGE
Parameter value range error.
34
COPIER_DLL_NOT_LINKED
The value copier DLL was not linked or found (applies only to Microsoft Windows).
35
CONSTRAINT_DLL_NOT_LINKED
The constraint checker DLL was not linked or found (applies only to Microsoft Windows) or constraint information was not found (specify the NOCONSTRAIN flag).
36
COMPARATOR_DLL_NOT_LINKED
The value comparator DLL was not linked or found (applies only to Microsoft Windows).
37
COMPARATOR_CODE_NOT_LINKED
The value comparator code was not linked.
38
MEM_MGR_DLL_NOT_LINKED
The memory manager DLL was not linked or found (applies only to Microsoft Windows).
39
TRACING_CODE_NOT_LINKED
The BER/DER/PER/UPER encoder/decoder DLL was not linked or found or static code was not initialized.
40
OPEN_TYPE_USER_FIELD_ERROR
The error code was returned by a user-defined open type user field copy or compare function.
41
API_DLL_NOT_LINKED
The API DLL was not linked or found (applies only to Microsoft Windows).
42
BERDER_DLL_NOT_LINKED
The BER/DER DLL was not linked or found (applies only to Microsoft Windows).
43
PER_DLL_NOT_LINKED
The PER DLL was not linked or found (applies only to Microsoft Windows).
44
OPEN_TYPE_ERROR
Error in automatic encoding/decoding/copying an open type value.
45
MUTEX_NOT_CREATED
Mutex was not created for serializing access to global data.
46
CANT_CLOSE_TRACE_FILE
Unable to close trace file.
47
CANT_SET_START_BUF
The initial buffer cannot be set because it already exists.
48
START_BUF_NOT_SET
An attempt was made to get the trailing decoder buffer with undecoded data, but it has not been set.
49
INFO_OBJECT_SET_TABLE_COPY_ERROR
Error when copying information on the object set table.
50
INFO_OBJECT_ALREADY_EXISTS
The information object already exists.
51
INFO_OBJECT_UNIQUE_FIELD_NOT_FOUND
The unique field was not found in the information object set.
52
INFO_OBJECT_NOT_FOUND
The information object was not found.
53
INFO_OBJECT_SET_NOT_EXTENSIBLE
The information object set is not extensible.
54
ERROR_READING_FROM_DECODER_INPUT_FILE
Error reading from decoder input file.
55
DECODER_INPUT_FILE_ALREADY_OPEN
Decoder input file is already open.
56
CANT_CLOSE_DECODER_INPUT_FILE
Unable to close the decoder input file.
57
CANT_OPEN_DECODER_INPUT_FILE
Unable to open the decoder input file.
58
ENCODER_OUTPUT_FILE_ALREADY_OPEN
The encoder output file is already open.
59
CANT_CLOSE_ENCODER_OUTPUT_FILE
Unable to close the encoder output file.
60
CANT_OPEN_ENCODER_OUTPUT_FILE
Unable to open the encoder output file.
61
CANT_CLOSE_FROM_ASCII
Error when closing iconv() tables.
62
CANT_CLOSE_TO_ASCII
Error when closing iconv() tables.
63
ASCII_EBCDIC_CONV_ERROR
Error when calling iconv().
64
CANT_OPEN_FROM_ASCII
Error when opening iconv() tables.
65
CANT_OPEN_TO_ASCII
Error when opening iconv() tables.
66
TYPE_CONSTRAINT
The type constraint is violated.
67
VALUE_NOT_AMONG_ENUMERATED_CONSTRAINT
The value is not among the ENUMERATED.
68
COMPONENT_RELATION_CONSTRAINT
The component relation constraint is violated.
69
TABLE_CONSTRAINT
The table constraint is violated.
70
PRESENCE_CONSTRAINT
The presence constraint is violated.
71
ABSENCE_CONSTRAINT
The absence constraint is violated.
72
PERMITTED_ALPHABET_CONSTRAINT
The permitted alphabet constraint is violated.
73
SIZE_CONSTRAINT_SETOF_SEQOF
The size constraint is violated for SET OF or SEQUENCE OF.
74
SIZE_CONSTRAINT_STRING
The size constraint is violated for a string value.
75
VALUE_RANGE_CONSTRAINT_REAL
The value range constraint is violated for REAL.
76
VALUE_RANGE_CONSTRAINT_UNSIGNED_INTEGER
The value range constraint is violated for an unsigned INTEGER.
77
VALUE_RANGE_CONSTRAINT_SIGNED_INTEGER
The value range constraint is violated for a signed INTEGER.
78
SINGLE_VALUE_CONSTRAINT_COMPLEX_TYPE
The single value constraint is violated for SET, SEQUENCE, CHOICE, SET OF, or SEQUENCE OF.
79
SINGLE_VALUE_CONSTRAINT_STRING
The single value constraint is violated for a string value.
80
SINGLE_VALUE_CONSTRAINT_REAL
The single value constraint is violated for REAL.
81
SINGLE_VALUE_CONSTRAINT_UNSIGNED_INTEGER
The single value constraint is violated for an unsigned INTEGER.
82
SINGLE_VALUE_CONSTRAINT_SIGNED_INTEGER
The single value constraint is violated for a signed INTEGER.
83
USER_CONSTRAINT_FUNCTION_ERROR
The user-defined constraint function returned a non-zero value.
84
PRINT_DLL_NOT_LINKED
The PER tracing DLL was not linked or found (applies only to Microsoft Windows).
85
EOF_INPUT_FILE
The decoder reached the end of the input file.
86
CANT_OPEN_INPUT_FILE
The SOED encoder/decoder linked with the file or socket memory manager cannot get data from the specified input source (the OSS_FILE marked object or decoder input file).
87
OSS_LEAN_BAD_VERSION
The control-table passed to ossinit() is not compatible with the Lean Encoder/Decoder.
88
OSS_LEAN_AUTOMATIC_ENCDEC_NOT_SUPPORTED
An attempt was made to enable automatic encoding/decoding of open types, but the version of the LED in use does not support it.
89
OSS_LEAN_RELAYSAFE_NOT_SUPPORTED
The -relaySafe ASN.1 compiler option was specified, but the current version of LED does not support it.
90
OSS_LEAN_DER_ENCODER_NOT_SUPPORTED
An attempt was made to set the OSS_DER encoding rules flag; however, the current version of LED does not support it.
91
OSS_LEAN_REALTYPE_NOT_SUPPORTED
An attempt was made to use a representation of the REAL type; however, this is not supported.
92
OSS_LEAN_REMOVE_NOT_SUPPORTED
An attempt was made to apply the ASN1.Remove directive to the specification, but the current version of LED does not support it.
93
OSS_LEAN_NOCOPY_NOT_SUPPORTED
An attempt was made to apply the OSS.OBJHANDLE | OSS.NOCOPY directive to the specification, but the current version of the LED does not support it.
94
OSS_LEAN_DEFERDECODING_NOT_SUPPORTED
An attempt was made to apply the ASN1.DeferDecoding directive to the specification, but the current version of the LED does not support it.
96
OSS_LEAN_TRUNCATE_SOF_NOT_SUPPORTED
An attempt was made to apply the OSS.Truncate directive to the specification, but the version of the current LED in use does not support it.
97
OSS_LEAN_POINTER_NOT_ SUPPORTED
The POINTER directive cannot be used with the version of the LED runtime in use as it is not supported.
97
CANT_LOAD_DYNLIBRARY
Unable to load a control table or a code file as a shared library.
99
XER_DLL_NOT_LINKED
The XER DLL was not linked or found (applies only to Microsoft Windows).
100
PATTERN_CONSTRAINT
The pattern constraint is violated.
101
PATTERN_CONSTRAINT_NOT_LINKED
The pattern constraint code was not linked.
102
NOCOPY_FRAGMENTED
The OSS.OBJHANDLE | OSS.NOCOPY directive was applied to an item that has fragmented encodings (usually occurs when the CER encoder is used).
103
BAD_OBJIDNODE
The OBJECT IDENTIFIER conflicts with X.680 or the value specified is too large for the chosen C representation - in this case, apply the --<OSS.OBJECTID LONG>-- directive to the type.
104
ASN1_COMPILER_DLL_NOT_LINKED
The dynamic control table creation DLL was not linked.
105
ASN1_COMPILING_FAILED
The dynamic control table creation routines detected syntax errors in the input ASN.1 specification.
106
TOO_MANY_CMD_LINE_OPTIONS
The number of input command line options exceeds the internal limit. Instead, use the -commandFile option.
107
OSS_LEAN_LONGLONG_NOT_SUPPORTED
An attempt was made to use a 64-bit representation of an INTEGER type, but the version of the LED in use does not support it.
108
CONSTRUCTED_NESTING_LIMIT_EXCEEDED
The nesting level of constructed string encodings exceeds the limit.
109
SEQ_SET_NESTING_LIMIT_EXCEEDED
The nesting level of encoding of SET exceeds the limit.
110
EXER_DLL_NOT_LINKED
The E-XER DLL was not linked or found (applies only to Microsoft Windows).
111
DEFAULT_PREFIX_NOT_ALLOWED
It is returned by ossSetNamespacePrefix() when its prefix parameter is NULL and when the schema does not allow the use of default namespaces due to ambiguities.
112
UNKNOWN_NAMESPACE_URI
It is returned by ossSetNamespacePrefix() and ossGetNamespacePrefix() when the NAMESPACE parameter is invalid as an URI, or it is not used in the schema.
113
INVALID_PREFIX
It is returned by ossSetNamespacePrefix() when its prefix parameter is invalid (not NCName).
114
PREFIX_ALREADY_ASSIGNED
It is returned by ossSetNamespacePrefix() when its prefix parameter was already assigned to a different namespace URI (also used when a NULL prefix is assigned to the second namespace).
115
COMPRESS_ERROR
A compression or decompression error occurred. Note that your custom compression/decompression function must return a negative value.
117
OSS_LEAN_COMPRESSION_NOT_SUPPORTED
An attempt is made to use post-encoding data compression/encryption and pre-decoding data decompression/decryption, but the version of the LED in use does not support it.
120
OSS_LEAN_ZLIB_NOT_SUPPORTED
The -compress ASN.1 compiler option was specified, but the version of the LED in use does not support zlib compression.
121
CANT_LOAD_ZLIB_DLL
ZLIB1.DLL was not found in PATH or it does not provide the required functions (applies only to Microsoft Windows).
122
BAD_OID_IRI
The OID internationalized resource identifier conflicts with X.680 or X.660.
123
SINGLE_VALUE_CONSTRAINT
The single value constraint is violated for the OBJECT IDENTIFIER/RELATIVE-OID/OID-IRI/RELATIVE-OID-IRI/HUGE INTEGER/TIME type.
125
CONVERSION_NOT_POSSIBLE
The ossBinary2XML()/ossXML2Binary() or ossBinary2JSON()/ossJSON2Binary() function detects that the input message contains an encoding that cannot be converted.
130
OSS_TIMEOUT_EXPIRED or
TIMEOUT_READING_FROM_SOCKET
The decoder or ossSkipPadBytes() was unable to read from the socket due to an exceeded timeout or an error reading from the socket.
131
ASN1_COMPILING_LICENSE_ERROR
The dynamic control table creation routine detected a license error. See the ASN.1 compiler output for the precise error message.
132
ASN1_COMPILING_INPUT_OUTPUT_ERROR
The dynamic control table creation routine detected an input/output error during opening, reading, or writing files. See the ASN.1 compiler output for the precise error message.
133
CANT_CLOSE_INPUT_FILE
The OSS memory manager cannot close input file.
134
CANT_OPEN_OUTPUT_FILE
The OSS memory manager cannot open output file.
135
CANT_CLOSE_OUTPUT_FILE
The OSS memory manager cannot close output file.
136
ERROR_WRITING_TO_FILE
The OSS memory manager detected a file write error.
137
ERROR_READING_FROM_FILE
The OSS memory manager detected a file read error.
138
CANT_OPEN_TEMPORARY_FILE
The OSS memory manager cannot open the temporary file.
139
DEFERRED_VALUE_IN_BUFFER
The OSS memory manager detected the part of a deferred value in the initial buffer.
140
INCORRECT_DEFERRED_VALUE
The OSS memory manager detected incorrect deferred value in the initial buffer.
141
ERROR_WRITING_TO_SOCKET
The OSS memory manager detected a socket write error.
142
ERROR_READING_FROM_SOCKET
The OSS memory manager detected a socket read error.
143
CANT_LOAD_SOCKET_DLL
The socket DLL was not found in PATH (applies only to Microsoft Windows).
144
CANT_GET_PROC_ADDRESS
The socket DLL does not provide the required functions (applies only to Microsoft Windows).
145
INVALID_SOCKET_HANDLE
The OSS memory manager detected an invalid socket handle.
146
UNRECOGNIZED_MEMORY_OBJECT
The OSS memory manager detected an unknown marked memory object.
147
TIMEOUT_WRITING_TO_SOCKET
The OSS socket memory manager or API function was unable to write to the socket due to an exceeded timeout.


This documentation applies to the OSS® ASN.1 Tools for C release 11.0 and later.

Copyright © 2020 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS® ASN.1 Tools for C is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for C are available to you.