55 #ifndef _SNMP_SNMPERRS_H_ 56 #define _SNMP_SNMPERRS_H_ 61 #ifdef SNMP_PP_NAMESPACE 72 #define SNMP_ERROR_SUCCESS 0 73 #define SNMP_ERROR_TOO_BIG 1
74 #define SNMP_ERROR_NO_SUCH_NAME 2
75 #define SNMP_ERROR_BAD_VALUE 3
76 #define SNMP_ERROR_READ_ONLY 4
77 #define SNMP_ERROR_GENERAL_VB_ERR 5
78 #define SNMP_ERROR_NO_ACCESS 6
79 #define SNMP_ERROR_WRONG_TYPE 7
80 #define SNMP_ERROR_WRONG_LENGTH 8
81 #define SNMP_ERROR_WRONG_ENCODING 9
82 #define SNMP_ERROR_WRONG_VALUE 10
83 #define SNMP_ERROR_NO_CREATION 11
84 #define SNMP_ERROR_INCONSIST_VAL 12
85 #define SNMP_ERROR_RESOURCE_UNAVAIL 13
86 #define SNMP_ERROR_COMITFAIL 14
87 #define SNMP_ERROR_COMMITFAIL 14
88 #define SNMP_ERROR_UNDO_FAIL 15
89 #define SNMP_ERROR_AUTH_ERR 16
90 #define SNMP_ERROR_NOT_WRITEABLE 17
91 #define SNMP_ERROR_INCONSIS_NAME 18
101 #define SNMP_CLASS_SUCCESS 0 102 #define SNMP_CLASS_ERROR -1
103 #define SNMP_CLASS_RESOURCE_UNAVAIL -2
104 #define SNMP_CLASS_INTERNAL_ERROR -3
105 #define SNMP_CLASS_UNSUPPORTED -4
108 #define SNMP_CLASS_TIMEOUT -5 109 #define SNMP_CLASS_ASYNC_RESPONSE -6
110 #define SNMP_CLASS_NOTIFICATION -7
111 #define SNMP_CLASS_SESSION_DESTROYED -8
114 #define SNMP_CLASS_INVALID -10 115 #define SNMP_CLASS_INVALID_PDU -11
116 #define SNMP_CLASS_INVALID_TARGET -12
117 #define SNMP_CLASS_INVALID_CALLBACK -13
118 #define SNMP_CLASS_INVALID_REQID -14
119 #define SNMP_CLASS_INVALID_NOTIFYID -15
120 #define SNMP_CLASS_INVALID_OPERATION -16
121 #define SNMP_CLASS_INVALID_OID -17
122 #define SNMP_CLASS_INVALID_ADDRESS -18
123 #define SNMP_CLASS_ERR_STATUS_SET -19
126 #define SNMP_CLASS_TL_UNSUPPORTED -20 127 #define SNMP_CLASS_TL_IN_USE -21
128 #define SNMP_CLASS_TL_FAILED -22
129 #define SNMP_CLASS_TL_ACCESS_DENIED -23
132 #define SNMP_CLASS_SHUTDOWN -24 135 #define SNMP_CLASS_BADVERSION -50 136 #define SNMP_CLASS_ASN1ERROR -51
139 #define MAX_POS_ERROR SNMP_ERROR_INCONSIS_NAME 140 #define MAX_NEG_ERROR SNMP_CLASS_SHUTDOWN 143 #ifdef _INCLUDE_SNMP_ERR_STRINGS 153 static const char * pErrs[] = {
155 "SNMP: Response PDU Too Big",
156 "SNMP: Variable does not exist",
157 "SNMP: Cannot modify variable: Bad Value",
158 "SNMP: Cannot modify object, Read Only",
159 "SNMP: Cannot perform operation, General Error",
160 "SNMP: Cannot access variable, No Access",
161 "SNMP: Cannot create/modify variable, Wrong Type",
162 "SNMP: Cannot create/set variable, Wrong Length",
163 "SNMP: Cannot create/set variable, Wrong Encoding",
164 "SNMP: Cannot create/set variable, Wrong Value",
165 "SNMP: Cannot create variable, Creation Not Allowed",
166 "SNMP: Cannot create/set variable, Inconsistent Value",
167 "SNMP: Cannot create/set variable, Resource Unavailable",
168 "SNMP: Cannot create/set variable, Commit Failed",
169 "SNMP: Cannot create/set variable, Undo Failed",
170 "SNMP: Cannot perform operation, Authorization Error",
171 "SNMP: Cannot create/set variable, Not Writable",
172 "SNMP: Cannot create variable, Inconsistent Name",
173 "SNMP: Unknown Error Status" 177 static const char * nv3Errs[] = {
178 "SNMPv3: v3MP error",
180 "SNMPv3: Unsupported Security Model",
181 "SNMPv3: Message not in Time Window",
182 "SNMPv3: received same Message twice",
183 "SNMPv3: Invalid Message",
184 "SNMPv3: Invalid EngineID",
185 "SNMPv3: v3MP not initialized",
186 "SNMPv3: Parse Error",
187 "SNMPv3: Received Message with unknown MsgID",
188 "SNMPv3: Message does not match known message",
189 "SNMPv3: Community format error",
190 "SNMPv3: Unknown UserName",
191 "SNMPv3: Build error",
192 "SNMPv3: USM: error",
193 "SNMPv3: Unknown pdu handlers",
194 "SNMPv3: Unavailable Context",
195 "SNMPv3: Unknown Context",
196 "SNMPv3: Report sent",
197 "SNMPv3: Unknown error code" 200 static const char * pv3Errs[] = {
202 "SNMPv3: USM: error",
203 "SNMPv3: USM: Configfile write error",
204 "SNMPv3: USM: Unsupported SecurityLevel",
205 "SNMPv3: USM: Unknown SecurityName",
206 "SNMPv3: USM: Encryption error",
207 "SNMPv3: USM: Decryption error",
208 "SNMPv3: USM: Authentication error",
209 "SNMPv3: USM: Authentication failure",
210 "SNMPv3: USM: Parse error",
211 "SNMPv3: USM: Unknown EngineID",
212 "SNMPv3: USM: Message not in TimeWindow",
213 "SNMPv3: USM: Unsupported AuthProtocol",
214 "SNMPv3: USM: Unsupported PrivProtocol",
215 "SNMPv3: USM: Address error",
216 "SNMPv3: USM: Could not create file",
217 "SNMPv3: USM: Could not open file",
218 "SNMPv3: USM: Could not rename file",
219 "SNMPv3: USM: Could not delete file",
220 "SNMPv3: USM: Could not write into file",
221 "SNMPv3: USM: Could not read from file",
222 "SNMPv3: USM: Unknown error code" 226 static const char * nErrs[] =
230 "SNMP++: Operation failed",
231 "SNMP++: Resource unavailable",
232 "SNMP++: Internal error",
233 "SNMP++: Unsupported function",
236 "SNMP++: SNMP request timed out",
237 "SNMP++: Received SNMP Response",
239 "SNMP++: Received SNMP Notification (trap or inform)",
241 "SNMP++: Closing session with outstanding requests",
242 "Unknown error code",
245 "SNMP++: Class not valid",
246 "SNMP++: Invalid Pdu",
247 "SNMP++: Invalid Target",
248 "SNMP++: Invalid (null) Callback Function",
249 "SNMP++: Invalid Request Id",
250 "SNMP++: Invalid Notification Id",
252 "SNMP++: SNMP Operation not supported on specified Target",
253 "SNMP++: Invalid Object Identifier",
254 "SNMP++: Invalid Address",
256 "SNMP++: Agent indicates error in SNMP request",
259 "SNMP++: Transport is not supported",
260 "SNMP++: Transport is in use",
261 "SNMP++: Transport operation failed",
262 "SNMP++: Transport access denied",
263 "SNMP++: Blocked Mode Shutdown",
265 "Unknown error code",
268 #endif //_INCLUDE_SNMP_ERR_STRINGS 270 #ifdef SNMP_PP_NAMESPACE 274 #endif // _SNMP_SNMPERRS_H_