00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #ifndef _SNMPERRS_H
00067 #define _SNMPERRS_H
00068
00069 #include "snmp_pp/config_snmp_pp.h"
00070
00071 #ifdef SNMP_PP_NAMESPACE
00072 namespace Snmp_pp {
00073 #endif
00074
00075
00076
00077
00078
00079
00080
00081
00082 #define SNMP_ERROR_SUCCESS 0
00083 #define SNMP_ERROR_TOO_BIG 1
00084 #define SNMP_ERROR_NO_SUCH_NAME 2
00085 #define SNMP_ERROR_BAD_VALUE 3
00086 #define SNMP_ERROR_READ_ONLY 4
00087 #define SNMP_ERROR_GENERAL_VB_ERR 5
00088 #define SNMP_ERROR_NO_ACCESS 6
00089 #define SNMP_ERROR_WRONG_TYPE 7
00090 #define SNMP_ERROR_WRONG_LENGTH 8
00091 #define SNMP_ERROR_WRONG_ENCODING 9
00092 #define SNMP_ERROR_WRONG_VALUE 10
00093 #define SNMP_ERROR_NO_CREATION 11
00094 #define SNMP_ERROR_INCONSIST_VAL 12
00095 #define SNMP_ERROR_RESOURCE_UNAVAIL 13
00096 #define SNMP_ERROR_COMITFAIL 14
00097 #define SNMP_ERROR_UNDO_FAIL 15
00098 #define SNMP_ERROR_AUTH_ERR 16
00099 #define SNMP_ERROR_NOT_WRITEABLE 17
00100 #define SNMP_ERROR_INCONSIS_NAME 18
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 #define SNMP_CLASS_SUCCESS 0
00111 #define SNMP_CLASS_ERROR -1
00112 #define SNMP_CLASS_RESOURCE_UNAVAIL -2
00113 #define SNMP_CLASS_INTERNAL_ERROR -3
00114 #define SNMP_CLASS_UNSUPPORTED -4
00115
00116
00117 #define SNMP_CLASS_TIMEOUT -5
00118 #define SNMP_CLASS_ASYNC_RESPONSE -6
00119 #define SNMP_CLASS_NOTIFICATION -7
00120 #define SNMP_CLASS_SESSION_DESTROYED -8
00121
00122
00123 #define SNMP_CLASS_INVALID -10
00124 #define SNMP_CLASS_INVALID_PDU -11
00125 #define SNMP_CLASS_INVALID_TARGET -12
00126 #define SNMP_CLASS_INVALID_CALLBACK -13
00127 #define SNMP_CLASS_INVALID_REQID -14
00128 #define SNMP_CLASS_INVALID_NOTIFYID -15
00129 #define SNMP_CLASS_INVALID_OPERATION -16
00130 #define SNMP_CLASS_INVALID_OID -17
00131 #define SNMP_CLASS_INVALID_ADDRESS -18
00132 #define SNMP_CLASS_ERR_STATUS_SET -19
00133
00134
00135 #define SNMP_CLASS_TL_UNSUPPORTED -20
00136 #define SNMP_CLASS_TL_IN_USE -21
00137 #define SNMP_CLASS_TL_FAILED -22
00138
00139
00140 #define SNMP_CLASS_SHUTDOWN -23
00141
00142
00143 #define SNMP_CLASS_BADVERSION -50
00144 #define SNMP_CLASS_ASN1ERROR -51
00145
00146
00147 #define MAX_POS_ERROR SNMP_ERROR_INCONSIS_NAME
00148 #define MAX_NEG_ERROR SNMP_CLASS_SHUTDOWN
00149
00150
00151 #ifdef _INCLUDE_SNMP_ERR_STRINGS
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 static const char * pErrs[] = {
00162 "Success",
00163 "SNMP: Response PDU Too Big",
00164 "SNMP: Variable does not exist",
00165 "SNMP: Cannot modify variable: Bad Value",
00166 "SNMP: Cannot modify object, Read Only",
00167 "SNMP: Cannot perform operation, General Error",
00168 "SNMP: Cannot access variable, No Access",
00169 "SNMP: Cannot create/modify variable, Wrong Type",
00170 "SNMP: Cannot create/set variable, Wrong Length",
00171 "SNMP: Cannot create/set variable, Wrong Encoding",
00172 "SNMP: Cannot create/set variable, Wrong Value",
00173 "SNMP: Cannot create variable, Creation Not Allowed",
00174 "SNMP: Cannot create/set variable, Inconsistent Value",
00175 "SNMP: Cannot create/set variable, Resource Unavailable",
00176 "SNMP: Cannot create/set variable, Commit Failed",
00177 "SNMP: Cannot create/set variable, Undo Failed",
00178 "SNMP: Cannot perform operation, Authorization Error",
00179 "SNMP: Cannot create/set variable, Not Writable",
00180 "SNMP: Cannot create variable, Inconsistent Name",
00181 "SNMP: Unknown Error Status"
00182 };
00183
00184 #ifdef _SNMPv3
00185 static const char * nv3Errs[] = {
00186 "SNMPv3: v3MP error",
00187 "SNMPv3: v3MP ok",
00188 "SNMPv3: Unsupported Security Model",
00189 "SNMPv3: Message not in Time Window",
00190 "SNMPv3: received same Message twice",
00191 "SNMPv3: Invalid Message",
00192 "SNMPv3: Invalid EngineID",
00193 "SNMPv3: v3MP not initialized",
00194 "SNMPv3: Parse Error",
00195 "SNMPv3: Received Message with unknown MsgID",
00196 "SNMPv3: Message does not match known message",
00197 "SNMPv3: Community format error",
00198 "SNMPv3: Unknown UserName",
00199 "SNMPv3: Build error",
00200 "SNMPv3: USM: error",
00201 "SNMPv3: Unknown pdu handlers",
00202 "SNMPv3: Unavailable Context",
00203 "SNMPv3: Unknown Context",
00204 "SNMPv3: Report sent",
00205 "SNMPv3: Unknown errorcode"
00206 };
00207
00208 static const char * pv3Errs[] = {
00209 "SNMPv3: USM: ok",
00210 "SNMPv3: USM: error",
00211 "SNMPv3: USM: Configfile write error",
00212 "SNMPv3: USM: Unsupported SecurityLevel",
00213 "SNMPv3: USM: Unknown SecurityName",
00214 "SNMPv3: USM: Encryption error",
00215 "SNMPv3: USM: Decryption error",
00216 "SNMPv3: USM: Authentication error",
00217 "SNMPv3: USM: Authentication failure",
00218 "SNMPv3: USM: Parse error",
00219 "SNMPv3: USM: Unknown EngineID",
00220 "SNMPv3: USM: Message not in TimeWindow",
00221 "SNMPv3: USM: Unsupported AuthProtocol",
00222 "SNMPv3: USM: Unsupported PrivProtocol"
00223 "SNMPv3: USM: Address error",
00224 "SNMPv3: USM: Could not create file",
00225 "SNMPv3: USM: Could not open file",
00226 "SNMPv3: USM: Could not rename file",
00227 "SNMPv3: USM: Could not delete file",
00228 "SNMPv3: USM: Could not write into file",
00229 "SNMPv3: USM: Could not read from file",
00230 "SNMPv3: USM: unknown errorcode"
00231 };
00232 #endif
00233
00234 static const char * nErrs[] =
00235 {
00236
00237 "SNMP++: Success",
00238 "SNMP++: Operation failed",
00239 "SNMP++: Resource unavailable",
00240 "SNMP++: Internal error",
00241 "SNMP++: Unsupported function",
00242
00243
00244 "SNMP++: SNMP request timed out",
00245 "SNMP++: Received SNMP Response",
00246
00247 "SNMP++: Received SNMP Notification (trap or inform)",
00248
00249 "SNMP++: Closing session with outstanding requests",
00250 "Unknown error code",
00251
00252
00253 "SNMP++: Class not valid",
00254 "SNMP++: Invalid Pdu",
00255 "SNMP++: Invalid Target",
00256 "SNMP++: Invalid (null) Callback Function",
00257 "SNMP++: Invalid Request Id",
00258 "SNMP++: Invalid Notification Id",
00259
00260 "SNMP++: SNMP Operation not supported on specified Target",
00261 "SNMP++: Invalid Object Identifier",
00262 "SNMP++: Invalid Address",
00263
00264 "SNMP++: Agent indicates error in SNMP request",
00265
00266
00267 "SNMP++: Transport is not supported",
00268 "SNMP++: Transport is in use",
00269 "SNMP++: Transport operation failed",
00270 "SNMP++: Blocked Mode Shutdown",
00271
00272 "Unknown error code",
00273 };
00274
00275 #endif //_INCLUDE_SNMP_ERR_STRINGS
00276
00277 #ifdef SNMP_PP_NAMESPACE
00278 };
00279 #endif
00280
00281 #endif //_SNMPERRS_H