| RSA BSAFE Micro Edition Suite |
Streamlined security for mobile and embedded devices |
 
![]() |
00001 /* $Id: r_error.h,v 1.43 2005/05/20 05:26:24 jleiseboer Exp $ */
00002 /*
00003 * Copyright (C) 1998-2003 RSA Security Inc. All rights reserved.
00004 *
00005 * This work contains proprietary information of RSA Security.
00006 * Distribution is limited to authorized licensees of RSA
00007 * Security. Any unauthorized reproduction, distribution or
00008 * modification of this work is strictly prohibited.
00009 */
00014 #ifndef HEADER_COMMON_R_ERROR_H
00015 #define HEADER_COMMON_R_ERROR_H
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00028 /* library/lib_str.c contains the matching string table for the error
00029 * codes and should be updated whenever a new error code is added
00030 */
00031
00049 #define R_ERROR_FATAL_INTERNAL_ERROR 64
00050
00065 #define R_ERROR_BAD_PARAMETER 32
00066
00067 /* Indicates the base value for all general errors used through all products */
00068 #define R_ERROR_BASE 10000
00069
00073 #define R_ERROR_NONE 0
00074
00078 #define R_ERROR_FAILED (R_ERROR_BASE+1)
00079
00082 #define R_ERROR_IO (R_ERROR_BASE+2)
00083
00086 #define R_ERROR_PROTOCOL (R_ERROR_BASE+3)
00087
00090 #define R_ERROR_EOF (R_ERROR_BASE+4)
00091
00095 #define R_ERROR_ALLOC_FAILURE (R_ERROR_BASE+5)
00096
00100 #define R_ERROR_EVAL_RESTRICTION (R_ERROR_BASE+6)
00101
00104 #define R_ERROR_EVAL_EXPIRED (R_ERROR_BASE+7)
00105
00109 #define R_ERROR_NOT_FOUND (R_ERROR_BASE+8)
00110
00114 #define R_ERROR_NOT_AVAILABLE (R_ERROR_BASE+9)
00115
00119 #define R_ERROR_NOT_IMPLEMENTED (R_ERROR_BASE+10)
00120
00124 #define R_ERROR_NOT_SUPPORTED (R_ERROR_BASE+11)
00125
00128 #define R_ERROR_INVALID_STATE \
00129 ((R_ERROR_BASE+12) | R_ERROR_FATAL_INTERNAL_ERROR)
00130
00134 #define R_ERROR_INIT_NOT_CALLED \
00135 ((R_ERROR_BASE+13) | R_ERROR_FATAL_INTERNAL_ERROR)
00136
00139 #define R_ERROR_SHOULD_NOT_HAVE_BEEN_CALLED \
00140 ((R_ERROR_BASE+14) | R_ERROR_FATAL_INTERNAL_ERROR)
00141
00144 #define R_ERROR_METHOD_UNDEFINED \
00145 ((R_ERROR_BASE+15) | R_ERROR_FATAL_INTERNAL_ERROR)
00146
00150 #define R_ERROR_BUFFER_TOO_SMALL \
00151 ((R_ERROR_BASE+16) | R_ERROR_BAD_PARAMETER)
00152
00156 #define R_ERROR_NULL_ARG ((R_ERROR_BASE+17) | R_ERROR_BAD_PARAMETER)
00157
00161 #define R_ERROR_BAD_VALUE ((R_ERROR_BASE+18) | R_ERROR_BAD_PARAMETER)
00162
00166 #define R_ERROR_BAD_RANGE ((R_ERROR_BASE+19) | R_ERROR_BAD_PARAMETER)
00167
00171 #define R_ERROR_BAD_FORMAT ((R_ERROR_BASE+20) | R_ERROR_BAD_PARAMETER)
00172
00176 #define R_ERROR_BAD_TYPE ((R_ERROR_BASE+21) | R_ERROR_BAD_PARAMETER)
00177
00181 #define R_ERROR_BAD_DATA ((R_ERROR_BASE+22) | R_ERROR_BAD_PARAMETER)
00182
00186 #define R_ERROR_BAD_LENGTH ((R_ERROR_BASE+23) | R_ERROR_BAD_PARAMETER)
00187 /*
00188 * Indicates that the library instantiation requested is not supported.
00189 */
00190 #define R_ERROR_RCOM_LIBRARY_NOT_SUPPORTED (R_ERROR_BASE+24)
00191
00194 #define R_ERROR_DENIED (R_ERROR_BASE+25)
00195
00199 #define R_ERROR_AUTHENTICATION_REQUIRED (R_ERROR_BASE+26)
00200
00204 #define R_ERROR_MODULE_LOAD_FAILED \
00205 ((R_ERROR_BASE+27)|R_ERROR_FATAL_INTERNAL_ERROR)
00206
00207 /* Resource Manager base for errors */
00208 #define R_COM_ERR_LIB_CTX_BASE 10100
00209
00222 #define R_ERROR_EXIT_CODE(ret) \
00223 ((ret) == R_ERROR_NONE) ? 0 : 1
00224
00225 #ifdef __cplusplus
00226 }
00227 #endif
00228 #endif /* HEADER_COMMON_R_ERROR_H */
00229
00230
00231
00232