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_UNDO_FAIL 15
88 #define SNMP_ERROR_AUTH_ERR 16
89 #define SNMP_ERROR_NOT_WRITEABLE 17
90 #define SNMP_ERROR_INCONSIS_NAME 18
100 #define SNMP_CLASS_SUCCESS 0 101 #define SNMP_CLASS_ERROR -1
102 #define SNMP_CLASS_RESOURCE_UNAVAIL -2
103 #define SNMP_CLASS_INTERNAL_ERROR -3
104 #define SNMP_CLASS_UNSUPPORTED -4
107 #define SNMP_CLASS_TIMEOUT -5 108 #define SNMP_CLASS_ASYNC_RESPONSE -6
109 #define SNMP_CLASS_NOTIFICATION -7
110 #define SNMP_CLASS_SESSION_DESTROYED -8
113 #define SNMP_CLASS_INVALID -10 114 #define SNMP_CLASS_INVALID_PDU -11
115 #define SNMP_CLASS_INVALID_TARGET -12
116 #define SNMP_CLASS_INVALID_CALLBACK -13
117 #define SNMP_CLASS_INVALID_REQID -14
118 #define SNMP_CLASS_INVALID_NOTIFYID -15
119 #define SNMP_CLASS_INVALID_OPERATION -16
120 #define SNMP_CLASS_INVALID_OID -17
121 #define SNMP_CLASS_INVALID_ADDRESS -18
122 #define SNMP_CLASS_ERR_STATUS_SET -19
125 #define SNMP_CLASS_TL_UNSUPPORTED -20 126 #define SNMP_CLASS_TL_IN_USE -21
127 #define SNMP_CLASS_TL_FAILED -22
128 #define SNMP_CLASS_TL_ACCESS_DENIED -23
131 #define SNMP_CLASS_SHUTDOWN -24 134 #define SNMP_CLASS_BADVERSION -50 135 #define SNMP_CLASS_ASN1ERROR -51
138 #define MAX_POS_ERROR SNMP_ERROR_INCONSIS_NAME 139 #define MAX_NEG_ERROR SNMP_CLASS_SHUTDOWN 142 #ifdef _INCLUDE_SNMP_ERR_STRINGS 152 static const char * pErrs[] = {
154 "SNMP: Response PDU Too Big",
155 "SNMP: Variable does not exist",
156 "SNMP: Cannot modify variable: Bad Value",
157 "SNMP: Cannot modify object, Read Only",
158 "SNMP: Cannot perform operation, General Error",
159 "SNMP: Cannot access variable, No Access",
160 "SNMP: Cannot create/modify variable, Wrong Type",
161 "SNMP: Cannot create/set variable, Wrong Length",
162 "SNMP: Cannot create/set variable, Wrong Encoding",
163 "SNMP: Cannot create/set variable, Wrong Value",
164 "SNMP: Cannot create variable, Creation Not Allowed",
165 "SNMP: Cannot create/set variable, Inconsistent Value",
166 "SNMP: Cannot create/set variable, Resource Unavailable",
167 "SNMP: Cannot create/set variable, Commit Failed",
168 "SNMP: Cannot create/set variable, Undo Failed",
169 "SNMP: Cannot perform operation, Authorization Error",
170 "SNMP: Cannot create/set variable, Not Writable",
171 "SNMP: Cannot create variable, Inconsistent Name",
172 "SNMP: Unknown Error Status" 176 static const char * nv3Errs[] = {
177 "SNMPv3: v3MP error",
179 "SNMPv3: Unsupported Security Model",
180 "SNMPv3: Message not in Time Window",
181 "SNMPv3: received same Message twice",
182 "SNMPv3: Invalid Message",
183 "SNMPv3: Invalid EngineID",
184 "SNMPv3: v3MP not initialized",
185 "SNMPv3: Parse Error",
186 "SNMPv3: Received Message with unknown MsgID",
187 "SNMPv3: Message does not match known message",
188 "SNMPv3: Community format error",
189 "SNMPv3: Unknown UserName",
190 "SNMPv3: Build error",
191 "SNMPv3: USM: error",
192 "SNMPv3: Unknown pdu handlers",
193 "SNMPv3: Unavailable Context",
194 "SNMPv3: Unknown Context",
195 "SNMPv3: Report sent",
196 "SNMPv3: Unknown errorcode" 199 static const char * pv3Errs[] = {
201 "SNMPv3: USM: error",
202 "SNMPv3: USM: Configfile write error",
203 "SNMPv3: USM: Unsupported SecurityLevel",
204 "SNMPv3: USM: Unknown SecurityName",
205 "SNMPv3: USM: Encryption error",
206 "SNMPv3: USM: Decryption error",
207 "SNMPv3: USM: Authentication error",
208 "SNMPv3: USM: Authentication failure",
209 "SNMPv3: USM: Parse error",
210 "SNMPv3: USM: Unknown EngineID",
211 "SNMPv3: USM: Message not in TimeWindow",
212 "SNMPv3: USM: Unsupported AuthProtocol",
213 "SNMPv3: USM: Unsupported PrivProtocol",
214 "SNMPv3: USM: Address error",
215 "SNMPv3: USM: Could not create file",
216 "SNMPv3: USM: Could not open file",
217 "SNMPv3: USM: Could not rename file",
218 "SNMPv3: USM: Could not delete file",
219 "SNMPv3: USM: Could not write into file",
220 "SNMPv3: USM: Could not read from file",
221 "SNMPv3: USM: unknown errorcode" 225 static const char * nErrs[] =
229 "SNMP++: Operation failed",
230 "SNMP++: Resource unavailable",
231 "SNMP++: Internal error",
232 "SNMP++: Unsupported function",
235 "SNMP++: SNMP request timed out",
236 "SNMP++: Received SNMP Response",
238 "SNMP++: Received SNMP Notification (trap or inform)",
240 "SNMP++: Closing session with outstanding requests",
241 "Unknown error code",
244 "SNMP++: Class not valid",
245 "SNMP++: Invalid Pdu",
246 "SNMP++: Invalid Target",
247 "SNMP++: Invalid (null) Callback Function",
248 "SNMP++: Invalid Request Id",
249 "SNMP++: Invalid Notification Id",
251 "SNMP++: SNMP Operation not supported on specified Target",
252 "SNMP++: Invalid Object Identifier",
253 "SNMP++: Invalid Address",
255 "SNMP++: Agent indicates error in SNMP request",
258 "SNMP++: Transport is not supported",
259 "SNMP++: Transport is in use",
260 "SNMP++: Transport operation failed",
261 "SNMP++: Transport access denied",
262 "SNMP++: Blocked Mode Shutdown",
264 "Unknown error code",
267 #endif //_INCLUDE_SNMP_ERR_STRINGS 269 #ifdef SNMP_PP_NAMESPACE 273 #endif // _SNMP_SNMPERRS_H_